public class SimpleTripleCreator extends Object implements TripleCreator
TripleCreator implementation relying on a base graph Id and
a list of URI templates of the existing graphs. Node that it makes this class
being bound to a single graph.| Modifier and Type | Field and Description |
|---|---|
protected String[] |
accessUriTemplates |
protected int |
baseGraphId |
protected String[] |
resourceUriTemplates |
| Constructor and Description |
|---|
SimpleTripleCreator(int baseGraphId,
String[] resourceUriTemplates,
String[] accessUriTemplates)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.jena.graph.Node |
createNode(int nodeId,
int externalId,
int extGraphId,
boolean isProperty)
Creates a
Node instance based on the given information. |
org.apache.jena.graph.Triple |
createTriple(int sourceId,
int propertyId,
int targetId,
int targetExtId,
int targetExtGraphId) |
protected int baseGraphId
protected String[] resourceUriTemplates
protected String[] accessUriTemplates
public SimpleTripleCreator(int baseGraphId,
String[] resourceUriTemplates,
String[] accessUriTemplates)
baseGraphId - the graph Id of nodes that are not external nodes of the graph for
which this triple creator is used.uriTemplates - a mapping from graph Ids to domain names.public org.apache.jena.graph.Triple createTriple(int sourceId,
int propertyId,
int targetId,
int targetExtId,
int targetExtGraphId)
createTriple in interface TripleCreatorpublic org.apache.jena.graph.Node createNode(int nodeId,
int externalId,
int extGraphId,
boolean isProperty)
Node instance based on the given information.nodeId - the internal Id of the nodeexternalId - the external Id of the node if it belongs to a different graph or
-1 if it is an internal nodeextGraphId - the Id of the graph to which this node belongs to or -1 if
it is an internal nodeisProperty - a flag indicating whether the node is a propertyNode instanceCopyright © 2019–2020. All rights reserved.