de.fuberlin.wiwiss.d2rq.values
Class ConstantValueMaker
java.lang.Object
de.fuberlin.wiwiss.d2rq.values.ConstantValueMaker
- All Implemented Interfaces:
- ValueMaker
public class ConstantValueMaker
- extends Object
- implements ValueMaker
A pseudo value maker that produces a constant value
regardless of the underlying relation.
Note that FixedNodeMaker
doesn't use an instance
of this class, but handles the constantness of its
underlying values directly.
This class is only used where we need to produce constant
strings, rather than constant RDF nodes.
- Author:
- Richard Cyganiak (richard@cyganiak.de)
Fields inherited from interface de.fuberlin.wiwiss.d2rq.values.ValueMaker |
NULL |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantValueMaker
public ConstantValueMaker(String constant)
valueExpression
public Expression valueExpression(String value)
- Description copied from interface:
ValueMaker
- A SQL expression that selects only rows where this value maker
produces the specified value.
Expression.FALSE
if this
value maker is incapable of producing the value.
- Specified by:
valueExpression
in interface ValueMaker
- Parameters:
value
- A value
- Returns:
- An expression that selects rows that produce this value
projectionSpecs
public Set<ProjectionSpec> projectionSpecs()
- Description copied from interface:
ValueMaker
- Returns a set of all
ProjectionSpec
s containing data necessary
for this ValueSource.
- Specified by:
projectionSpecs
in interface ValueMaker
- Returns:
- a set of
ProjectionSpec
s
makeValue
public String makeValue(ResultRow row)
- Description copied from interface:
ValueMaker
- Retrieves a value from a database row according to some rule or pattern.
- Specified by:
makeValue
in interface ValueMaker
- Parameters:
row
- the database row
- Returns:
- a value created from the row
describeSelf
public void describeSelf(NodeSetFilter c)
- Specified by:
describeSelf
in interface ValueMaker
renameAttributes
public ValueMaker renameAttributes(ColumnRenamer renamer)
- Specified by:
renameAttributes
in interface ValueMaker
orderSpecs
public List<OrderSpec> orderSpecs(boolean ascending)
- Specified by:
orderSpecs
in interface ValueMaker