de.fuberlin.wiwiss.d2rq.map
Class FixedNodeMaker

java.lang.Object
  extended byde.fuberlin.wiwiss.d2rq.map.FixedNodeMaker
All Implemented Interfaces:
java.lang.Cloneable, NodeMaker

public class FixedNodeMaker
extends java.lang.Object
implements NodeMaker

NodeMaker that returns a fixed node.

History:
08-03-2004: Initial version of this class.

Version:
V0.2
Author:
Richard Cyganiak

Field Summary
private  com.hp.hpl.jena.graph.Node fixedNode
           
 
Constructor Summary
FixedNodeMaker(com.hp.hpl.jena.graph.Node fixedNode)
           
 
Method Summary
 boolean couldFit(com.hp.hpl.jena.graph.Node node)
          Checks if a node could fit this NodeMaker without querying the database.
 java.util.Set getColumns()
          Returns a set of all columns containing data necessary for this NodeMaker to build its nodes.
 java.util.Map getColumnValues(com.hp.hpl.jena.graph.Node node)
          Returns a map of database fields and values corresponding to the argument node.
 com.hp.hpl.jena.graph.Node getNode(java.lang.String[] row, java.util.Map columnNameNumberMap)
          Creates a new Node from a database result row.
 boolean isURIPattern()
           
 void matchConstraint(NodeConstraint c)
          Adds constraint information to a NodeConstraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fixedNode

private com.hp.hpl.jena.graph.Node fixedNode
Constructor Detail

FixedNodeMaker

public FixedNodeMaker(com.hp.hpl.jena.graph.Node fixedNode)
Method Detail

matchConstraint

public void matchConstraint(NodeConstraint c)
Description copied from interface: NodeMaker
Adds constraint information to a NodeConstraint. In a RDQL query a shared variable generally corresponds to different NodeMakers.

Specified by:
matchConstraint in interface NodeMaker
Parameters:
c -
See Also:
NodeConstraint

isURIPattern

public boolean isURIPattern()

couldFit

public boolean couldFit(com.hp.hpl.jena.graph.Node node)
Description copied from interface: NodeMaker
Checks if a node could fit this NodeMaker without querying the database.

Specified by:
couldFit in interface NodeMaker

getColumns

public java.util.Set getColumns()
Description copied from interface: NodeMaker
Returns a set of all columns containing data necessary for this NodeMaker to build its nodes.

Specified by:
getColumns in interface NodeMaker
Returns:
a set of {Column}s

getColumnValues

public java.util.Map getColumnValues(com.hp.hpl.jena.graph.Node node)
Description copied from interface: NodeMaker
Returns a map of database fields and values corresponding to the argument node.

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

Specified by:
getColumnValues in interface NodeMaker
Parameters:
node - a concrete, non-null RDF node
Returns:
a map with Column keys, and string values.

getNode

public com.hp.hpl.jena.graph.Node getNode(java.lang.String[] row,
                                          java.util.Map columnNameNumberMap)
Description copied from interface: NodeMaker
Creates a new Node from a database result row.

Specified by:
getNode in interface NodeMaker
Parameters:
row - a database result row
columnNameNumberMap - a map from Table.Column style column names to Integers representing indices within the row array
Returns:
a node created from the row, or null if a NULL value was encountered in a required field.