Documentation of 'org.encog.bot.browse.range.DocumentRange' Java class
DocumentRange
org.encog.bot.browse.range

Class DocumentRange

  • Direct Known Subclasses:
    Div, Form, FormElement, Link, Span


    public class DocumentRange
    extends java.lang.Object
    Base class that represents a document range. A document range is a collection of tags that all apply to one "concept". For example, a Form, or a Link. This allows the form to collect the elements inside the form, or a link to collect the text along with the link tag.
    • Constructor Detail

      • DocumentRange

        public DocumentRange(WebPage theSource)
        Construct a document range from the specified WebPage.
        Parameters:
        theSource - The web page that this range belongs to.
    • Method Detail

      • addElement

        public final void addElement(DocumentRange element)
        Add an element.
        Parameters:
        element - The element to add.
      • getBegin

        public final int getBegin()
        Returns:
        The beginning index.
      • getClassAttribute

        public final java.lang.String getClassAttribute()
        Returns:
        the classAttribute
      • getElements

        public final java.util.List<DocumentRange> getElements()
        Returns:
        The elements of this document range.
      • getEnd

        public final int getEnd()
        Returns:
        The ending index.
      • getIdAttribute

        public final java.lang.String getIdAttribute()
        Returns:
        the idAttribute
      • getParent

        public final DocumentRange getParent()
        Returns:
        The web page that owns this class.
      • getSource

        public final WebPage getSource()
        Returns:
        The web page that this range is owned by.
      • getTextOnly

        public final java.lang.String getTextOnly()
        Get the text from this range.
        Returns:
        The text from this range.
      • setBegin

        public final void setBegin(int theBegin)
        Set the beginning index.
        Parameters:
        theBegin - The beginning index.
      • setClassAttribute

        public final void setClassAttribute(java.lang.String theClassAttribute)
        Parameters:
        theClassAttribute - the classAttribute to set
      • setEnd

        public final void setEnd(int theEnd)
        Set the ending index.
        Parameters:
        theEnd - The ending index.
      • setIdAttribute

        public final void setIdAttribute(java.lang.String id)
        Parameters:
        id - the idAttribute to set
      • setParent

        public final void setParent(DocumentRange theParent)
        Set the parent.
        Parameters:
        theParent - The parent.
      • setSource

        public final void setSource(WebPage theSource)
        Set the source web page.
        Parameters:
        theSource - The source web page.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.