org.d2rq.nodes
Class TypedNodeMaker

java.lang.Object
  extended by org.d2rq.nodes.TypedNodeMaker
All Implemented Interfaces:
NodeMaker

public class TypedNodeMaker
extends Object
implements NodeMaker

A NodeMaker that produces nodes from an underlying ValueMaker according to a TypedNodeMaker.NodeType. TODO: isUnique() should probably not be stored here, but derived from unique key information in the underlying table(s). d2rq:containsDuplicates should be treated as asserting a unique key.

Author:
Richard Cyganiak (richard@cyganiak.de)

Nested Class Summary
static interface TypedNodeMaker.NodeType
           
 
Nested classes/interfaces inherited from interface org.d2rq.nodes.NodeMaker
NodeMaker.EmptyNodeMaker
 
Field Summary
static TypedNodeMaker.NodeType BLANK
           
static TypedNodeMaker.NodeType PLAIN_LITERAL
           
static TypedNodeMaker.NodeType URI
           
static TypedNodeMaker.NodeType XSD_BOOLEAN
           
static TypedNodeMaker.NodeType XSD_DATE
           
static TypedNodeMaker.NodeType XSD_DATETIME
           
static TypedNodeMaker.NodeType XSD_TIME
           
 
Fields inherited from interface org.d2rq.nodes.NodeMaker
EMPTY
 
Constructor Summary
TypedNodeMaker(TypedNodeMaker.NodeType nodeType, ValueMaker valueMaker)
           
 
Method Summary
 void accept(NodeMakerVisitor visitor)
           
 void describeSelf(NodeSetFilter c)
           
 TypedNodeMaker.NodeType getNodeType()
           
 ValueMaker getValueMaker()
           
static TypedNodeMaker.NodeType languageLiteral(String language)
           
 Node makeNode(ResultRow tuple)
           
 List<OrderOp.OrderSpec> orderSpecs(boolean ascending)
          Returns expressions (with possible ASC/DESC marker) that re necessary for ordering a relation by the nodes in this NodeMaker.
 Set<ProjectionSpec> projectionSpecs()
           
 String toString()
           
static TypedNodeMaker.NodeType typedLiteral(RDFDatatype datatype)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

URI

public static final TypedNodeMaker.NodeType URI

BLANK

public static final TypedNodeMaker.NodeType BLANK

PLAIN_LITERAL

public static final TypedNodeMaker.NodeType PLAIN_LITERAL

XSD_DATE

public static final TypedNodeMaker.NodeType XSD_DATE

XSD_TIME

public static final TypedNodeMaker.NodeType XSD_TIME

XSD_DATETIME

public static final TypedNodeMaker.NodeType XSD_DATETIME

XSD_BOOLEAN

public static final TypedNodeMaker.NodeType XSD_BOOLEAN
Constructor Detail

TypedNodeMaker

public TypedNodeMaker(TypedNodeMaker.NodeType nodeType,
                      ValueMaker valueMaker)
Method Detail

languageLiteral

public static TypedNodeMaker.NodeType languageLiteral(String language)

typedLiteral

public static TypedNodeMaker.NodeType typedLiteral(RDFDatatype datatype)

getNodeType

public TypedNodeMaker.NodeType getNodeType()

getValueMaker

public ValueMaker getValueMaker()

projectionSpecs

public Set<ProjectionSpec> projectionSpecs()
Specified by:
projectionSpecs in interface NodeMaker

describeSelf

public void describeSelf(NodeSetFilter c)
Specified by:
describeSelf in interface NodeMaker

makeNode

public Node makeNode(ResultRow tuple)
Specified by:
makeNode in interface NodeMaker

orderSpecs

public List<OrderOp.OrderSpec> orderSpecs(boolean ascending)
Description copied from interface: NodeMaker
Returns expressions (with possible ASC/DESC marker) that re necessary for ordering a relation by the nodes in this NodeMaker. Uses SPARQL semantics for ordering.

Specified by:
orderSpecs in interface NodeMaker

toString

public String toString()
Overrides:
toString in class Object

accept

public void accept(NodeMakerVisitor visitor)
Specified by:
accept in interface NodeMaker