Package com.complexible.stardog.jena
Class JenaSesameUtils
- java.lang.Object
-
- com.complexible.stardog.jena.JenaSesameUtils
-
public final class JenaSesameUtils extends java.lang.ObjectUtility methods for converting between the Jena and Sesame APIs
- Since:
- 0.6.9
- Version:
- 6.0
- Author:
- Michael Grove
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Function<Value,org.apache.jena.graph.Node>TO_NODEstatic java.util.function.Function<org.apache.jena.graph.Node,Value>TO_VALUEstatic java.util.function.Function<Statement,org.apache.jena.sparql.core.Quad>TOQUADstatic java.util.function.Function<org.apache.jena.graph.Triple,org.apache.jena.rdf.model.Statement>TOSTMTstatic java.util.function.Function<Statement,org.apache.jena.graph.Triple>TOTRIPLEFunction which will convert sesame statements to Jena graph Triples on the fly
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.jena.graph.NodeanonNode(BNode theBNode)Create a Jena anonymous Graph Node from the Sesame BNodestatic BNodebnode(org.apache.jena.graph.Node theNode)static org.apache.jena.riot.system.PrefixMapcreatePrefixMap(java.util.Optional<Connection> conn)static org.apache.jena.shared.PrefixMappingcreatePrefixMapping(java.util.Optional<Connection> conn)static IRIiri(org.apache.jena.graph.Node theNode)static booleanisAnyOrNull(org.apache.jena.graph.Node theNode)static Literalliteral(org.apache.jena.graph.Node theNode)static org.apache.jena.graph.NodeliteralNode(Literal theLiteral)Return a Jena Literal Graph Node from the Sesame Literalstatic org.apache.jena.rdf.model.Modelmodel(java.util.Set<Statement> theGraph)static org.apache.jena.graph.Nodenode(Value theValue)Return the equivalent Jena Graph Node for the provided Sesame Valuestatic Resourceresource(org.apache.jena.graph.Node theNode)static org.apache.jena.rdf.model.Statementstatement(Statement theStatement)static Statementstatement(org.apache.jena.graph.Triple theTriple)static org.apache.jena.rdf.model.StmtIteratorstmtIterator(java.util.Iterator<Statement> theIterator)static org.apache.jena.graph.Tripletriple(Statement theStatement)static org.apache.jena.graph.NodeuriNode(IRI theURI)static Valuevalue(org.apache.jena.graph.Node theNode)
-
-
-
Field Detail
-
TOTRIPLE
public static final java.util.function.Function<Statement,org.apache.jena.graph.Triple> TOTRIPLE
Function which will convert sesame statements to Jena graph Triples on the fly
-
TOQUAD
public static final java.util.function.Function<Statement,org.apache.jena.sparql.core.Quad> TOQUAD
-
TOSTMT
public static final java.util.function.Function<org.apache.jena.graph.Triple,org.apache.jena.rdf.model.Statement> TOSTMT
-
TO_NODE
public static final java.util.function.Function<Value,org.apache.jena.graph.Node> TO_NODE
-
TO_VALUE
public static final java.util.function.Function<org.apache.jena.graph.Node,Value> TO_VALUE
-
-
Method Detail
-
stmtIterator
public static org.apache.jena.rdf.model.StmtIterator stmtIterator(java.util.Iterator<Statement> theIterator)
-
statement
public static org.apache.jena.rdf.model.Statement statement(Statement theStatement)
-
triple
public static org.apache.jena.graph.Triple triple(Statement theStatement)
-
model
public static org.apache.jena.rdf.model.Model model(java.util.Set<Statement> theGraph)
-
node
public static org.apache.jena.graph.Node node(Value theValue)
Return the equivalent Jena Graph Node for the provided Sesame Value- Parameters:
theValue- the value- Returns:
- the Jena Node equivalent to the Sesame Value
-
literalNode
public static org.apache.jena.graph.Node literalNode(Literal theLiteral)
Return a Jena Literal Graph Node from the Sesame Literal- Parameters:
theLiteral- the literal- Returns:
- the equivalent Jena graph node for the Sesame Literal
-
anonNode
public static org.apache.jena.graph.Node anonNode(BNode theBNode)
Create a Jena anonymous Graph Node from the Sesame BNode- Parameters:
theBNode- the bnode- Returns:
- the equivalent Jena Graph node for the Sesame BNode
-
uriNode
public static org.apache.jena.graph.Node uriNode(IRI theURI)
-
value
public static Value value(org.apache.jena.graph.Node theNode)
-
isAnyOrNull
public static boolean isAnyOrNull(org.apache.jena.graph.Node theNode)
-
resource
public static Resource resource(org.apache.jena.graph.Node theNode)
-
iri
public static IRI iri(org.apache.jena.graph.Node theNode)
-
bnode
public static BNode bnode(org.apache.jena.graph.Node theNode)
-
literal
public static Literal literal(org.apache.jena.graph.Node theNode)
-
statement
public static Statement statement(org.apache.jena.graph.Triple theTriple)
-
createPrefixMapping
public static org.apache.jena.shared.PrefixMapping createPrefixMapping(java.util.Optional<Connection> conn)
-
createPrefixMap
public static org.apache.jena.riot.system.PrefixMap createPrefixMap(java.util.Optional<Connection> conn)
-
-