|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jrdf.parser.mem.ParserBlankNodeFactoryImpl
A factory for BlankNodes that uses a Map to keep track of the BlankNodes
that have been allocated by createBlankNode(String)
so that the
same BlankNode object can be returned for a given nodeID
.
Constructor Summary | |
ParserBlankNodeFactoryImpl(GraphElementFactory newValueFactory)
Create a new blank node factory with the given value factory. |
Method Summary | |
void |
clear()
Clears the internal Map. |
BlankNode |
createBlankNode()
Always creates a new BlankNode object from the GraphElementFactory. |
BlankNode |
createBlankNode(String nodeID)
Returns the BlankNode for a nodeID that has not been seen
before or calls the GraphElementFactory to create a new BlankNode
otherwise. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ParserBlankNodeFactoryImpl(GraphElementFactory newValueFactory)
newValueFactory
- factory to create nodes with.Method Detail |
public BlankNode createBlankNode() throws GraphElementFactoryException
createBlankNode
in interface ParserBlankNodeFactory
GraphElementFactoryException
- if it fails to create a new blank node.public BlankNode createBlankNode(String nodeID) throws GraphElementFactoryException
nodeID
that has not been seen
before or calls the GraphElementFactory to create a new BlankNode
otherwise.
createBlankNode
in interface ParserBlankNodeFactory
nodeID
- the node that labels the bNode in the file being parsed.
GraphElementFactoryException
- if it fails to create a new blank node.public void clear()
clear
in interface ParserBlankNodeFactory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |