org.openjena.riot.lang
Class LabelToNode

java.lang.Object
  extended by org.openjena.riot.system.MapWithScope<String,com.hp.hpl.jena.graph.Node,com.hp.hpl.jena.graph.Node>
      extended by org.openjena.riot.lang.LabelToNode

public class LabelToNode
extends MapWithScope<String,com.hp.hpl.jena.graph.Node,com.hp.hpl.jena.graph.Node>

Allocation Nodes (Bnodes usually) based on the graph and label Various different policies. See SyntaxLabels.createLabelToNode() for getting a default setup.


Constructor Summary
LabelToNode(org.openjena.riot.system.MapWithScope.ScopePolicy<String,com.hp.hpl.jena.graph.Node,com.hp.hpl.jena.graph.Node> scopePolicy, org.openjena.riot.system.MapWithScope.Allocator<String,com.hp.hpl.jena.graph.Node> allocator)
           
 
Method Summary
static LabelToNode createIncremental()
          Allocation, globally scoped, that uses a incrementing field to create new nodes
static LabelToNode createScopeByDocument()
          Allocation from a single scope; just the label matters.
static LabelToNode createScopeByGraph()
          Allocation scoped by graph and label.
static LabelToNode createUseLabelAsGiven()
          Allocation using syntax label; output is unsafe for reading (use createUseLabelEncoded() for output-input).
static LabelToNode createUseLabelEncoded()
          Allocation using an encoded syntax label (i.e.
 
Methods inherited from class org.openjena.riot.system.MapWithScope
clear, create, get
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelToNode

public LabelToNode(org.openjena.riot.system.MapWithScope.ScopePolicy<String,com.hp.hpl.jena.graph.Node,com.hp.hpl.jena.graph.Node> scopePolicy,
                   org.openjena.riot.system.MapWithScope.Allocator<String,com.hp.hpl.jena.graph.Node> allocator)
Method Detail

createScopeByDocument

public static LabelToNode createScopeByDocument()
Allocation from a single scope; just the label matters.


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 (use createUseLabelEncoded() for output-input). The reverse operation is provided by NodeToLabel.createBNodeByLabelAsGiven()


createUseLabelEncoded

public static LabelToNode createUseLabelEncoded()
Allocation using an encoded syntax label (i.e. _:B<encoded> format from NodeFmtLib.encodeBNodeLabel(java.lang.String)). The reverse operation is provided by NodeToLabel.createBNodeByLabelEncoded()


createIncremental

public static LabelToNode createIncremental()
Allocation, globally scoped, that uses a incrementing field to create new nodes



Licenced under the Apache License, Version 2.0