de.fuberlin.wiwiss.d2rq.values
Interface ValueMaker

All Known Implementing Classes:
BlankNodeID, Column, ConstantValueMaker, Pattern, SQLExpressionValueMaker, ValueDecorator

public interface ValueMaker

Describes a set of strings that are obtained in some way from one or more database columns.

Typical implementations are Attribute (describing the set of strings contained in one database column), Pattern (describing the set of strings that is obtained by sticking the values of several database fields into a string pattern), and BlankNodeID (similar).

There are several other ValueSources that modify the behaviour of another underlying ValueSource, implementing the Decorator pattern. This includes TranslationTable.TranslatingValueSource (translates values using a translation table or translation class) and the various value restrictions (@link RegexRestriction et. al.).

ValueSources are used by NodeMakers. A node maker wraps the strings into Jena nodes, thus creating a description of a set of RDF nodes.

Author:
Richard Cyganiak (richard@cyganiak.de)

Field Summary
static ValueMaker NULL
          A value maker that never produces a value.
 
Method Summary
 void describeSelf(NodeSetFilter c)
           
 String makeValue(ResultRow row)
          Retrieves a value from a database row according to some rule or pattern.
 List<OrderSpec> orderSpecs(boolean ascending)
           
 Set<ProjectionSpec> projectionSpecs()
          Returns a set of all ProjectionSpecs containing data necessary for this ValueSource.
 ValueMaker renameAttributes(ColumnRenamer renamer)
           
 Expression valueExpression(String value)
          A SQL expression that selects only rows where this value maker produces the specified value.
 

Field Detail

NULL

static final ValueMaker NULL
A value maker that never produces a value.

Method Detail

valueExpression

Expression valueExpression(String value)
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.

Parameters:
value - A value
Returns:
An expression that selects rows that produce this value

projectionSpecs

Set<ProjectionSpec> projectionSpecs()
Returns a set of all ProjectionSpecs containing data necessary for this ValueSource.

Returns:
a set of ProjectionSpecs

makeValue

String makeValue(ResultRow row)
Retrieves a value from a database row according to some rule or pattern.

Parameters:
row - the database row
Returns:
a value created from the row

describeSelf

void describeSelf(NodeSetFilter c)

renameAttributes

ValueMaker renameAttributes(ColumnRenamer renamer)

orderSpecs

List<OrderSpec> orderSpecs(boolean ascending)