org.jrdf.graph.local.util
Interface CopyGraphUtil

All Known Implementing Classes:
CopyGraphUtilImpl

public interface CopyGraphUtil


Method Summary
 Graph copyGraph(Graph sourceGraph, Graph targetGraph)
          Copies all the triples in source graph to target graph, respecting the blank node "identifies".
 Node copyTriplesForNode(Graph sourceGraph, Graph targetGraph, Node node, Node newNode)
          Given a node, copies all the triples that include
 ObjectNode copyTriplesForObjectNode(Graph newSourceGraph, Graph newTargetGraph, ObjectNode node, ObjectNode newNode)
           
 SubjectNode copyTriplesForSubjectNode(Graph newSourceGraph, Graph newTargetGraph, SubjectNode node, SubjectNode newNode)
           
 Graph getGraph()
           
 void replaceNode(Graph newTargetGraph, Node oldNode, Node newNode)
           
 

Method Detail

copyGraph

Graph copyGraph(Graph sourceGraph,
                Graph targetGraph)
                throws GraphException
Copies all the triples in source graph to target graph, respecting the blank node "identifies".

Parameters:
sourceGraph -
targetGraph -
Returns:
a merged graph.
Throws:
GraphException

copyTriplesForNode

Node copyTriplesForNode(Graph sourceGraph,
                        Graph targetGraph,
                        Node node,
                        Node newNode)
                        throws GraphException
Given a node, copies all the triples that include. (1) triples that contain this node (2) triples in (1) & (2) that contain blank nodes (recursively)

Parameters:
sourceGraph -
targetGraph -
node - @return
Throws:
GraphException

getGraph

Graph getGraph()

copyTriplesForSubjectNode

SubjectNode copyTriplesForSubjectNode(Graph newSourceGraph,
                                      Graph newTargetGraph,
                                      SubjectNode node,
                                      SubjectNode newNode)
                                      throws GraphException
Throws:
GraphException

copyTriplesForObjectNode

ObjectNode copyTriplesForObjectNode(Graph newSourceGraph,
                                    Graph newTargetGraph,
                                    ObjectNode node,
                                    ObjectNode newNode)
                                    throws GraphException
Throws:
GraphException

replaceNode

void replaceNode(Graph newTargetGraph,
                 Node oldNode,
                 Node newNode)
                 throws GraphException
Throws:
GraphException