|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdochelper.URLRecordSet
public class URLRecordSet
The class URLRecordSet
implements the RecordSet
interface to represent a set of WebPage
to be
processed. This class is used to drive the DocHelper process by invoking
the render function on each Record
within the RecordSet
passing in the DocPattern
defined for this records set.
Record
, DocumentSection
Field Summary | |
---|---|
static java.lang.String |
DEPTH
Param key: depth |
protected java.util.regex.Pattern |
links
Pattern tp identify links |
protected java.lang.String |
name
Reference Name for this instance. |
protected java.util.HashMap<java.lang.String,java.lang.Object> |
params
Paramters for this configurable. |
private java.util.ArrayList<DocPattern> |
patterns
|
protected int |
recordSetDepth
The depth for this record set |
static java.lang.String |
ROOT_URL
Param key: URLRoot |
protected java.util.ArrayList<Record> |
rsfiles
The files that are represented by this Path and Filter. |
Constructor Summary | |
---|---|
URLRecordSet()
|
Method Summary | |
---|---|
void |
addPattern(DocPattern pattern)
Add a single pattern to be applied to this record set. |
void |
checkParams()
Checks that the parameters are correct for this File Record Set. |
void |
clearPatterns()
Empty pattern list. |
ResultNode |
execute(ResultNode doc)
Main method of URLRecordSet. |
private void |
fetchRecords(int depth,
java.lang.String rootURL)
Fetch all the URLs from root node to a depth of 'depth'. |
java.lang.String |
getName()
Name Accessors + Modifiers |
void |
init()
Initialize the Record Set. |
void |
setName(java.lang.String name)
Set the name of this Record Set. |
void |
setParam(java.lang.String paramName,
java.lang.Object value)
Add an initialization parameter to the Record Set. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ROOT_URL
public static final java.lang.String DEPTH
protected java.util.HashMap<java.lang.String,java.lang.Object> params
protected java.util.ArrayList<Record> rsfiles
protected java.lang.String name
protected int recordSetDepth
protected java.util.regex.Pattern links
private java.util.ArrayList<DocPattern> patterns
Constructor Detail |
---|
public URLRecordSet()
Method Detail |
---|
public void setParam(java.lang.String paramName, java.lang.Object value) throws IllegalParamterTypeException
setParam
in interface Configurable
paramName
- String Name of the paramter to be storedvalue
- String value of the named param
IllegalParamterTypeException
public void checkParams() throws InvalidValueException, MissingArgumentException, ResourceUnavailableException
checkParams
in interface Configurable
InvalidValueException
MissingArgumentException
ResourceUnavailableException
public void init() throws InitializationException, ResourceUnavailableException
init
in interface Configurable
ResourceUnavailableException
InitializationException
private void fetchRecords(int depth, java.lang.String rootURL)
depth
- currentDepthrootURL
- String representing starting pointpublic ResultNode execute(ResultNode doc) throws ResourceUnavailableException
execute
in interface RecordSet
doc
- The document ResultNode
onto which the results of running
this record set should be added to.
ResultNode
node with the results of the matches and
rendering appended to it.
ResourceUnavailableException
java.lang.Exception
public java.lang.String getName()
public void setName(java.lang.String name)
RecordSet
setName
in interface RecordSet
public void addPattern(DocPattern pattern)
addPattern
in interface RecordSet
pattern
- DocPettern to add to this Record Set.public void clearPatterns()
clearPatterns
in interface RecordSet
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |