|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.any23.extractor.xpath.TemplateXPathExtractionRuleImpl
public class TemplateXPathExtractionRuleImpl
Default implementation of XPathExtractionRule
.
Constructor Summary | |
---|---|
TemplateXPathExtractionRuleImpl(String name,
String uriRegex)
|
Method Summary | |
---|---|
boolean |
acceptURI(org.openrdf.model.URI uri)
Checks if the rule can be applied on the given document URI. |
void |
add(QuadTemplate template)
Adds a QuadTemplate to the rule. |
void |
add(Variable variable)
Adds a variable to the template. |
String |
getName()
|
String |
getUriRegex()
|
void |
process(Document in,
ExtractionResult er)
Processes this extraction rule on the given document. |
boolean |
remove(QuadTemplate template)
Removes a quad template from the rule. |
boolean |
remove(Variable variable)
Removes a variable from the template. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TemplateXPathExtractionRuleImpl(String name, String uriRegex)
Method Detail |
---|
public String getUriRegex()
public void add(Variable variable)
TemplateXPathExtractionRule
add
in interface TemplateXPathExtractionRule
variable
- variable to be added.public boolean remove(Variable variable)
TemplateXPathExtractionRule
remove
in interface TemplateXPathExtractionRule
variable
- variable to be removed.
true if the variable
argument was found.
public void add(QuadTemplate template)
TemplateXPathExtractionRule
QuadTemplate
to the rule.
add
in interface TemplateXPathExtractionRule
template
- template instance to be added.public boolean remove(QuadTemplate template)
TemplateXPathExtractionRule
remove
in interface TemplateXPathExtractionRule
template
- template to be removed.
true
if the template
argument was found.public String getName()
getName
in interface TemplateXPathExtractionRule
getName
in interface XPathExtractionRule
public boolean acceptURI(org.openrdf.model.URI uri)
XPathExtractionRule
acceptURI
in interface XPathExtractionRule
uri
- input document URI.
true
if applied, false
otherwise.public void process(Document in, ExtractionResult er)
XPathExtractionRule
process
in interface XPathExtractionRule
in
- input document to be processed.er
- output result writer.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |