@Override public Graph getGraph(Node graphNode) { Graph g = graphs.get(graphNode) ; if ( g == null ) { g = getGraphCreate() ; if ( g != null ) addGraph(graphNode, g) ; } return g ; }
/** Create a new DatasetGraph that initially shares the graphs of the * givem DatasetGraph. Adding/removing graphs will only affect this * object, not the argument DatasetGraph but changed to shared * graphs are seenby both objects. */ public DatasetGraphMap(DatasetGraph dsg) { this(dsg.getDefaultGraph()) ; for ( Iterator<Node> names = dsg.listGraphNodes() ; names.hasNext() ; ) { Node gn = names.next() ; this.addGraph(gn, dsg.getGraph(gn)) ; } }
/** Create a new DatasetGraph that initially shares the graphs of the * givem DatasetGraph. Adding/removing graphs will only affect this * object, not the argument DatasetGraph but changed to shared * graphs are seenby both objects. */ public DatasetGraphMap(DatasetGraph dsg) { this(dsg.getDefaultGraph()) ; for ( Iterator<Node> names = dsg.listGraphNodes() ; names.hasNext() ; ) { Node gn = names.next() ; addGraph(gn, dsg.getGraph(gn)) ; } }
dsg.addGraph(gn, graphStore.getGraph(gn)) ;