|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
NodeMakers represent the nodes of the virtual RDF graph created by D2RQ. One NodeMaker instance describes a set of nodes that are created from a common data source, for example a database column. NodeMakers
getColumns()
),couldFit(com.hp.hpl.jena.graph.Node)
),getColumnValues(com.hp.hpl.jena.graph.Node)
),getNode(java.lang.String[], java.util.Map)
).NodeConstraint
(matchConstraint(de.fuberlin.wiwiss.d2rq.rdql.NodeConstraint)
).
Most of the actual work is done by a chain of ValueSource
instances that lie below the NodeMaker. The NodeMaker only wraps
and unwraps the String values (URIs, literals and blank node IDs)
into/from Jena Node instances.
PropertyBridge
s as their subjects,
predicates and objects.
There are implementations for the different types of RDF nodes:
UriMaker
, LiteralMaker
and BlankNodeMaker
.
A special implementation is the FixedNodeMaker
, which
is a single-element node set.
TODO: Better name for NodeMaker: NodeSetDescription?
History:
06-16-2004: Initial version.
08-04-2004: Added couldFit, getColumns and getColumnValues
11-03-2005: Added matchConstraint
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. |
void |
matchConstraint(NodeConstraint c)
Adds constraint information to a NodeConstraint . |
Method Detail |
public void matchConstraint(NodeConstraint c)
NodeConstraint
.
In a RDQL query a shared variable generally corresponds to different
NodeMakers.
c
- NodeConstraint
public boolean couldFit(com.hp.hpl.jena.graph.Node node)
public java.util.Map getColumnValues(com.hp.hpl.jena.graph.Node 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.
node
- a concrete, non-null RDF node
Column
keys, and string values.public java.util.Set getColumns()
public com.hp.hpl.jena.graph.Node getNode(java.lang.String[] row, java.util.Map columnNameNumberMap)
row
- a database result rowcolumnNameNumberMap
- a map from Table.Column style column names
to Integers representing indices within the row array
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |