de.fuberlin.wiwiss.d2rq.values
Class Column

java.lang.Object
  extended by de.fuberlin.wiwiss.d2rq.values.Column
All Implemented Interfaces:
ValueMaker

public class Column
extends Object
implements ValueMaker

A ValueMaker that takes its values from a single column.

Version:
$Id: Column.java,v 1.5 2006/11/02 13:01:16 cyganiak Exp $
Author:
Richard Cyganiak (richard@cyganiak.de)

Constructor Summary
Column(Attribute attribute)
           
 
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)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Column

public Column(Attribute attribute)
Method Detail

attributeConditions

public Map attributeConditions(String value)
Description copied from interface: ValueMaker
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 ValueMaker.matches(String) is false for the same value.

Specified by:
attributeConditions in interface ValueMaker
Parameters:
value - a non-null value
Returns:
a map with Attribute keys, and string values

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

matches

public boolean matches(String value)
Description copied from interface: ValueMaker
Checks if a given value fits this source without querying the database.

Specified by:
matches in interface ValueMaker

projectionAttributes

public Set projectionAttributes()
Description copied from interface: ValueMaker
Returns a set of all columns containing data necessary for this ValueSource.

Specified by:
projectionAttributes in interface ValueMaker
Returns:
a set of {Column}s

replaceColumns

public ValueMaker replaceColumns(ColumnRenamer renamer)
Specified by:
replaceColumns in interface ValueMaker

toString

public String toString()
Overrides:
toString in class Object