public class TemplateXPathExtractionRuleImpl extends Object implements TemplateXPathExtractionRule
XPathExtractionRule
.Constructor and Description |
---|
TemplateXPathExtractionRuleImpl(String name,
String uriRegex) |
Modifier and Type | Method and Description |
---|---|
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() |
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.Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.