Package org.apache.jena.riot.lang
Class BlankNodeAllocatorGlobal
- java.lang.Object
-
- org.apache.jena.riot.lang.BlankNodeAllocatorGlobal
-
- All Implemented Interfaces:
BlankNodeAllocator
public class BlankNodeAllocatorGlobal extends java.lang.Object implements BlankNodeAllocator
Allocate blank nodes by creating a randomly generated blank node. This allocator has arbitrary sized internal state needed to record the label to node mapping.
-
-
Constructor Summary
Constructors Constructor Description BlankNodeAllocatorGlobal()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
alloc(java.lang.String label)
Allocate based on a non-null label.Node
create()
Create a fresh blank node, different from anything generated so far.void
reset()
Reset allocation state - calls toBlankNodeAllocator.alloc(java.lang.String)
orBlankNodeAllocator.create()
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:BlankNodeAllocator
Reset allocation state - calls toBlankNodeAllocator.alloc(java.lang.String)
orBlankNodeAllocator.create()
- Specified by:
reset
in interfaceBlankNodeAllocator
-
alloc
public Node alloc(java.lang.String label)
Description copied from interface:BlankNodeAllocator
Allocate based on a non-null label. Calling this twice, with the same label will generate equivalent nodes but they may not be identical (i.e they are .equals but may not be ==)- Specified by:
alloc
in interfaceBlankNodeAllocator
-
create
public Node create()
Description copied from interface:BlankNodeAllocator
Create a fresh blank node, different from anything generated so far. Will not clash with a node allocated byBlankNodeAllocator.alloc(java.lang.String)
- Specified by:
create
in interfaceBlankNodeAllocator
-
-