public class DefaultBlueprintsValueFactory extends Object implements BlueprintsValueFactory
BlueprintsValueFactory
for converting
blueprints data to RDF and back again. Uses simple namespacing and URL
encoding to round trip URIs.Modifier and Type | Field and Description |
---|---|
org.openrdf.model.URI |
EDGE
URI used to represent a Edge.
|
String |
EDGE_NAMESPACE
Namespace for edges.
|
String |
GRAPH_NAMESPACE
Namespace for non vertex and edge data (property names).
|
org.openrdf.model.URI |
LABEL
URI used for labeling edges.
|
org.openrdf.model.URI |
TYPE
URI used for typing elements.
|
org.openrdf.model.URI |
VERTEX
URI used to represent a Vertex.
|
String |
VERTEX_NAMESPACE
Namespace for vertices.
|
protected org.openrdf.model.ValueFactory |
vf
The Sesame value factory for URIs and Literals.
|
Constructor and Description |
---|
DefaultBlueprintsValueFactory(String graphNamespace,
String vertexNamespace,
String edgeNamespace,
org.openrdf.model.URI type,
org.openrdf.model.URI vertex,
org.openrdf.model.URI edge,
org.openrdf.model.URI label)
Construct an instance with a simple Sesame ValueFactoryImpl.
|
DefaultBlueprintsValueFactory(org.openrdf.model.ValueFactory vf,
String graphNamespace,
String vertexNamespace,
String edgeNamespace,
org.openrdf.model.URI type,
org.openrdf.model.URI vertex,
org.openrdf.model.URI edge,
org.openrdf.model.URI label)
Construct an instance with the specified ValueFactoryImpl.
|
Modifier and Type | Method and Description |
---|---|
Object |
fromLiteral(org.openrdf.model.Literal l)
Create a blueprints property value from a datatyped literal.
|
String |
fromURI(org.openrdf.model.URI uri)
Round-trip a URI back into a graph element ID or property name.
|
org.openrdf.model.URI |
getEdgeURI()
Return the URI used to identify edges.
|
org.openrdf.model.URI |
getLabelURI()
Return the URI used for labeling edges.
|
org.openrdf.model.URI |
getTypeURI()
Return the URI used for typing elements.
|
org.openrdf.model.URI |
getVertexURI()
Return the URI used to identify vertices.
|
org.openrdf.model.URI |
toEdgeURI(Object key)
Create an edge URI from a blueprints edge id.
|
org.openrdf.model.Literal |
toLiteral(Object value)
Create a datatyped literal from a blueprints property value.
|
org.openrdf.model.URI |
toPropertyURI(String property)
Create a property URI from a blueprints property name.
|
org.openrdf.model.URI |
toURI(com.tinkerpop.blueprints.Element e)
Create an element URI from a blueprints element id.
|
org.openrdf.model.URI |
toVertexURI(Object key)
Create a vertex URI from a blueprints vertex id.
|
public final String GRAPH_NAMESPACE
public final String VERTEX_NAMESPACE
public final String EDGE_NAMESPACE
public final org.openrdf.model.URI TYPE
public final org.openrdf.model.URI VERTEX
public final org.openrdf.model.URI EDGE
public final org.openrdf.model.URI LABEL
protected final org.openrdf.model.ValueFactory vf
public DefaultBlueprintsValueFactory(String graphNamespace, String vertexNamespace, String edgeNamespace, org.openrdf.model.URI type, org.openrdf.model.URI vertex, org.openrdf.model.URI edge, org.openrdf.model.URI label)
public DefaultBlueprintsValueFactory(org.openrdf.model.ValueFactory vf, String graphNamespace, String vertexNamespace, String edgeNamespace, org.openrdf.model.URI type, org.openrdf.model.URI vertex, org.openrdf.model.URI edge, org.openrdf.model.URI label)
public org.openrdf.model.URI getTypeURI()
BlueprintsValueFactory
getTypeURI
in interface BlueprintsValueFactory
public org.openrdf.model.URI getVertexURI()
BlueprintsValueFactory
getVertexURI
in interface BlueprintsValueFactory
public org.openrdf.model.URI getEdgeURI()
BlueprintsValueFactory
getEdgeURI
in interface BlueprintsValueFactory
public org.openrdf.model.URI getLabelURI()
BlueprintsValueFactory
getLabelURI
in interface BlueprintsValueFactory
public org.openrdf.model.URI toVertexURI(Object key)
toVertexURI
in interface BlueprintsValueFactory
public org.openrdf.model.URI toEdgeURI(Object key)
toEdgeURI
in interface BlueprintsValueFactory
public org.openrdf.model.URI toURI(com.tinkerpop.blueprints.Element e)
toURI
in interface BlueprintsValueFactory
public org.openrdf.model.URI toPropertyURI(String property)
toPropertyURI
in interface BlueprintsValueFactory
public String fromURI(org.openrdf.model.URI uri)
fromURI
in interface BlueprintsValueFactory
public org.openrdf.model.Literal toLiteral(Object value)
Supports: Float, Double, Integer, Long, Boolean, Short, Byte, and String.
toLiteral
in interface BlueprintsValueFactory
public Object fromLiteral(org.openrdf.model.Literal l)
Return a graph property from a datatyped literal using its XSD datatype.
Supports: Float, Double, Integer, Long, Boolean, Short, Byte, and String.
fromLiteral
in interface BlueprintsValueFactory
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.