Package org.apache.jena.riot.lang
Class LabelToNode
- java.lang.Object
-
- org.apache.jena.riot.system.MapWithScope<java.lang.String,Node,Node>
-
- org.apache.jena.riot.lang.LabelToNode
-
public class LabelToNode extends MapWithScope<java.lang.String,Node,Node>
Allocation Nodes (Bnodes usually) based on the graph and label Various different policies. SeeSyntaxLabels.createLabelToNode()for getting a default setup; some of the others are for testing and debugging and may not generate legal RDF overall (e.g. reparsing the same file gets the same bNodes)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.jena.riot.system.MapWithScope
MapWithScope.Allocator<A,B,S>, MapWithScope.ScopePolicy<A,B,S>
-
-
Constructor Summary
Constructors Constructor Description LabelToNode(MapWithScope.ScopePolicy<java.lang.String,Node,Node> scopePolicy, MapWithScope.Allocator<java.lang.String,Node,Node> allocator)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LabelToNodecreateIncremental()Allocation, globally scoped, that uses a incrementing field to create new nodesstatic LabelToNodecreateScopeByDocumentHash()Allocation from a single scope; just the label matters.static LabelToNodecreateScopeByDocumentHash(java.util.UUID seed)Allocation from a single scope; just the label matters.static LabelToNodecreateScopeByGraph()Allocation scoped by graph and label.static LabelToNodecreateScopeGlobal()The policy up to jena 2.10.0 - problems at very large scalestatic LabelToNodecreateUseLabelAsGiven()Allocation using syntax label; output is unsafe for reading (usecreateUseLabelEncoded()for output-input).static LabelToNodecreateUseLabelEncoded()Allocation using an encoded syntax label (i.e.-
Methods inherited from class org.apache.jena.riot.system.MapWithScope
clear, create, get
-
-
-
-
Constructor Detail
-
LabelToNode
public LabelToNode(MapWithScope.ScopePolicy<java.lang.String,Node,Node> scopePolicy, MapWithScope.Allocator<java.lang.String,Node,Node> allocator)
-
-
Method Detail
-
createScopeByDocumentHash
public static LabelToNode createScopeByDocumentHash()
Allocation from a single scope; just the label matters. This is the RDF syntax correct policy.
-
createScopeByDocumentHash
public static LabelToNode createScopeByDocumentHash(java.util.UUID seed)
Allocation from a single scope; just the label matters. Use this policy if repeated runs must give identical allocations- Parameters:
seed- Seed
-
createScopeGlobal
public static LabelToNode createScopeGlobal()
The policy up to jena 2.10.0 - problems at very large scale
-
createScopeByGraph
public static LabelToNode createScopeByGraph()
Allocation scoped by graph and label.
-
createUseLabelAsGiven
public static LabelToNode createUseLabelAsGiven()
Allocation using syntax label; output is unsafe for reading (usecreateUseLabelEncoded()for output-input). The reverse operation is provided byNodeToLabel.createBNodeByLabelAsGiven()but the pair is unsafe for output-input. Use encoded labels for that. The main purpose of this LabelToNode is to preserve the used label for debugging.
-
createUseLabelEncoded
public static LabelToNode createUseLabelEncoded()
Allocation using an encoded syntax label (i.e. _:B<encoded> format fromNodeFmtLib.encodeBNodeLabel(java.lang.String)). The reverse operation is provided byNodeToLabel.createBNodeByLabelEncoded(). This pair should be used to write out and recover blank node by internal id.
-
createIncremental
public static LabelToNode createIncremental()
Allocation, globally scoped, that uses a incrementing field to create new nodes
-
-