de.fuberlin.wiwiss.d2rq.values
Interface ValueMaker

All Known Implementing Classes:
BlankNodeID, Column, Pattern, 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.

Version:
$Id: ValueMaker.java,v 1.6 2007/10/23 14:30:33 cyganiak Exp $
Author:
Richard Cyganiak (richard@cyganiak.de)

Method Summary
 Map attributeConditions(String value)
          Returns a map of database fields and values corresponding to the argument.
 void describeSelf(NodeSetFilter c)
           
 String makeValue(ResultRow row)
          Retrieves a value from a database row according to some rule or pattern.
 boolean matches(String value)
          Checks if a given value fits this source without querying the database.
 Set projectionAttributes()
          Returns a set of all columns containing data necessary for this ValueSource.
 ValueMaker replaceColumns(ColumnRenamer renamer)
           
 

Method Detail

matches

boolean matches(String value)
Checks if a given value fits this source without querying the database.


attributeConditions

Map attributeConditions(String value)
Returns a map of database fields and values corresponding to the argument.

For example, a ValueSource that corresponds directly to a single DB column would return a single-entry map with that column as the key, and value as the value.

The result is undefined if matches(String) is false for the same value.

Parameters:
value - a non-null value
Returns:
a map with Attribute keys, and string values

projectionAttributes

Set projectionAttributes()
Returns a set of all columns containing data necessary for this ValueSource.

Returns:
a set of {Column}s

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)

replaceColumns

ValueMaker replaceColumns(ColumnRenamer renamer)