Package org.apache.any23.extractor.xpath
Class Term<T extends org.eclipse.rdf4j.model.Value>
- java.lang.Object
-
- org.apache.any23.extractor.xpath.Term<T>
-
- Direct Known Subclasses:
TemplateGraph
,TemplateObject
,TemplatePredicate
,TemplateSubject
public abstract class Term<T extends org.eclipse.rdf4j.model.Value> extends Object
Represents a generic template term.- Author:
- Michele Mostarda (mostarda@fbk.eu)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getInternalValue()
T
getValue(Map<String,String> varMapping)
Returns the value represented by thisTerm
given thevarMapping
, the #isVar and #internalValue parameters.protected abstract T
getValueInternal(String value)
boolean
isVar()
String
toString()
-
-
-
Constructor Detail
-
Term
protected Term(String internalValue, boolean isVar)
Constructor.- Parameters:
internalValue
- internal term value.isVar
- if true theinternalValue
is a variable name, otherwise is a constant.
-
-
Method Detail
-
getInternalValue
public String getInternalValue()
- Returns:
- the internal value.
-
isVar
public boolean isVar()
- Returns:
- the isVar flag value.
-
getValue
public T getValue(Map<String,String> varMapping)
Returns the value represented by thisTerm
given thevarMapping
, the #isVar and #internalValue parameters.- Parameters:
varMapping
- a map representing values of variables.- Returns:
- the value for this term.
-
-