org.jrdf.graph.local.util
Class GraphToGraphMapperImpl

java.lang.Object
  extended by org.jrdf.graph.local.util.GraphToGraphMapperImpl
All Implemented Interfaces:
GraphToGraphMapper

public class GraphToGraphMapperImpl
extends Object
implements GraphToGraphMapper


Constructor Summary
GraphToGraphMapperImpl(Graph newGraph, MapFactory mapFactory, SortedSetFactory sFac)
           
 
Method Summary
 void addTripleToGraph(Triple triple)
          Converts a triple from one graph and puts it into the target graph.
 Node createNewNode(Node node)
           
 Graph createNewTriples(Iterator<Triple> it)
           
 Graph getGraph()
          Returns the target graph.
 void replaceNode(Node node, Node newNode)
           
 void replaceObjectNode(Node node, Node newNode)
           
 void replacePredicateNode(Node node, Node newNode)
           
 void replaceSubjectNode(Node node, Node newNode)
           
 void updateBlankNodes(Triple triple)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphToGraphMapperImpl

public GraphToGraphMapperImpl(Graph newGraph,
                              MapFactory mapFactory,
                              SortedSetFactory sFac)
Method Detail

getGraph

public Graph getGraph()
Description copied from interface: GraphToGraphMapper
Returns the target graph.

Specified by:
getGraph in interface GraphToGraphMapper
Returns:
the target graph.

addTripleToGraph

public void addTripleToGraph(Triple triple)
                      throws GraphException
Description copied from interface: GraphToGraphMapper
Converts a triple from one graph and puts it into the target graph.

Specified by:
addTripleToGraph in interface GraphToGraphMapper
Parameters:
triple - The source graph triple.
Throws:
GraphElementFactoryException - if there was an error creating the new resources.
GraphException - if there was an error adding the new resources.

updateBlankNodes

public void updateBlankNodes(Triple triple)
                      throws GraphElementFactoryException
Specified by:
updateBlankNodes in interface GraphToGraphMapper
Throws:
GraphElementFactoryException

createNewTriples

public Graph createNewTriples(Iterator<Triple> it)
                       throws GraphException
Specified by:
createNewTriples in interface GraphToGraphMapper
Throws:
GraphException

createNewNode

public Node createNewNode(Node node)
                   throws GraphElementFactoryException
Specified by:
createNewNode in interface GraphToGraphMapper
Throws:
GraphElementFactoryException

replaceNode

public void replaceNode(Node node,
                        Node newNode)
                 throws GraphException
Specified by:
replaceNode in interface GraphToGraphMapper
Throws:
GraphException

replaceObjectNode

public void replaceObjectNode(Node node,
                              Node newNode)
                       throws GraphException
Specified by:
replaceObjectNode in interface GraphToGraphMapper
Throws:
GraphException

replacePredicateNode

public void replacePredicateNode(Node node,
                                 Node newNode)
                          throws GraphException
Specified by:
replacePredicateNode in interface GraphToGraphMapper
Throws:
GraphException

replaceSubjectNode

public void replaceSubjectNode(Node node,
                               Node newNode)
                        throws GraphException
Specified by:
replaceSubjectNode in interface GraphToGraphMapper
Throws:
GraphException