|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.bot.browse.WebPage
public class WebPage
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 Summary | |
---|---|
WebPage()
|
Method Summary | |
---|---|
void |
addContent(DocumentRange span)
Add to the content collection. |
void |
addDataUnit(DataUnit unit)
Add a data unit to the collection. |
DocumentRange |
find(Class<?> c,
int index)
Find the specified DocumentRange subclass in the contents list. |
Link |
findLink(String str)
Find the link that contains the specified string. |
List<DocumentRange> |
getContents()
|
List<DataUnit> |
getData()
|
int |
getDataSize()
Get the number of data items in this collection. |
DataUnit |
getDataUnit(int i)
Get the DataUnit unit at the specified index. |
DocumentRange |
getTitle()
Get the title for this document. |
void |
setTitle(DocumentRange theTitle)
Set the title of this document. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WebPage()
Method Detail |
---|
public final void addContent(DocumentRange span)
span
- The range to add to the collection.public final void addDataUnit(DataUnit unit)
unit
- The data unit to load.public final DocumentRange find(Class<?> c, int index)
c
- The class type to search for.index
- The index to search from.
public final Link findLink(String str)
str
- The string to search for.
public final List<DocumentRange> getContents()
public final List<DataUnit> getData()
public final int getDataSize()
public final DataUnit getDataUnit(int i)
i
- The index to use.
public final DocumentRange getTitle()
public final void setTitle(DocumentRange theTitle)
theTitle
- The DocumentRange that specifies the title.public final String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |