Documentation of 'org.encog.bot.browse.WebPage' Java class
WebPage
org.encog.bot.browse

Class WebPage



  • public class WebPage
    extends java.lang.Object
    Holds a web page that was loaded by the Browse class. Web pages are made up of DataUnits and contents, which are ranges of data units. The data units are basically tags and blocks of text. The contents collection uses DocumentRange objects to assign meatning to the lower level DataObjects.
    • Constructor Detail

      • WebPage

        public WebPage()
    • Method Detail

      • addContent

        public final void addContent(DocumentRange span)
        Add to the content collection.
        Parameters:
        span - The range to add to the collection.
      • addDataUnit

        public final void addDataUnit(DataUnit unit)
        Add a data unit to the collection.
        Parameters:
        unit - The data unit to load.
      • find

        public final DocumentRange find(java.lang.Class<?> c,
                                        int index)
        Find the specified DocumentRange subclass in the contents list.
        Parameters:
        c - The class type to search for.
        index - The index to search from.
        Returns:
        The document range that was found.
      • findLink

        public final Link findLink(java.lang.String str)
        Find the link that contains the specified string.
        Parameters:
        str - The string to search for.
        Returns:
        The link that contains the specified string.
      • getContents

        public final java.util.List<DocumentRange> getContents()
        Returns:
        The contents in a list collection.
      • getData

        public final java.util.List<DataUnit> getData()
        Returns:
        The data units in a list collection.
      • getDataSize

        public final int getDataSize()
        Get the number of data items in this collection.
        Returns:
        The size of the data unit.
      • getDataUnit

        public final DataUnit getDataUnit(int i)
        Get the DataUnit unit at the specified index.
        Parameters:
        i - The index to use.
        Returns:
        The DataUnit found at the specified index.
      • getTitle

        public final DocumentRange getTitle()
        Get the title for this document.
        Returns:
        The DocumentRange that specifies the title of this document.
      • setTitle

        public final void setTitle(DocumentRange theTitle)
        Set the title of this document.
        Parameters:
        theTitle - The DocumentRange that specifies the title.
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.