public Node getGraph() { return target.getGraph() ; }
/** Remove the target graph */ protected static void gsDrop(DatasetGraph dsg, Target target, boolean isSilent) { if ( target.isDefault() ) dsg.getDefaultGraph().clear(); else dsg.removeGraph(target.getGraph()); }
protected static Graph graph(DatasetGraph datasetGraph, Target target) { if ( target.isDefault() ) return datasetGraph.getDefaultGraph(); if ( target.isOneNamedGraph() ) return graph(datasetGraph, target.getGraph()); error("Target does not name one graph: " + target); return null; }
protected void printTargetUpdate2(Target target) { if ( target.isDefault() ) { out.print("DEFAULT") ; } else if ( target.isOneNamedGraph() ) { //out.print("GRAPH ") ; String s = FmtUtils.stringForNode(target.getGraph(), sCxt) ; out.print(s) ; } else { out.print("Target BROKEN / Update2") ; throw new ARQException("Malformed Target / Update2") ; } }
private boolean validBinaryGraphOp(UpdateBinaryOp update) { if ( update.getSrc().isDefault() ) return true; if ( update.getSrc().isOneNamedGraph() ) { Node gn = update.getSrc().getGraph(); if ( !datasetGraph.containsGraph(gn) ) { if ( !update.getSilent() ) error("No such graph: " + gn); return false; } return true; } error("Invalid source target for oepration; " + update.getSrc()); return false; }
protected void printTarget(Target target) { if ( target.isAll() ) { out.print("ALL") ; } else if ( target.isAllNamed() ) { out.print("NAMED") ; } else if ( target.isDefault() ) { out.print("DEFAULT") ; } else if ( target.isOneNamedGraph() ) { out.print("GRAPH ") ; String s = FmtUtils.stringForNode(target.getGraph(), sCxt) ; out.print(s) ; } else { out.print("Target BROKEN") ; throw new ARQException("Malformed Target") ; } }