Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.bot.browse.range
Class DocumentRange

    java.lang.Object
      org.encog.bot.browse.range.DocumentRange

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

    public class DocumentRange

extends 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.

Author:
  jheaton

Constructor Summary
`DocumentRange(WebPage theSource)` Construct a document range from the specified WebPage.

Method Summary
`void` | `addElement(DocumentRange element)` Add an element.
`int` | `getBegin()`
`String` | `getClassAttribute()`
`List<DocumentRange>` | `getElements()`
`int` | `getEnd()`
`String` | `getIdAttribute()`
`DocumentRange` | `getParent()`
`WebPage` | `getSource()`
`String` | `getTextOnly()` Get the text from this range.
`void` | `setBegin(int theBegin)` Set the beginning index.
`void` | `setClassAttribute(String theClassAttribute)`
`void` | `setEnd(int theEnd)` Set the ending index.
`void` | `setIdAttribute(String id)`
`void` | `setParent(DocumentRange theParent)` Set the parent.
`void` | `setSource(WebPage theSource)` Set the source web page.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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 String getClassAttribute()

  Returns:
    the classAttribute

### getElements

    public final List<DocumentRange> getElements()

  Returns:
    The elements of this document range.

### getEnd

    public final int getEnd()

  Returns:
    The ending index.

### getIdAttribute

    public final 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 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(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(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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All Rights Reserved.