public boolean isOneGraph() { return target.isOneNamedGraph() ; }
private static void checkTarget(Target target) { if ( ! target.isDefault() && ! target.isOneNamedGraph() ) throw new ARQException("Illegal target: must identify a single graph: "+target) ; }
@Override public String toString() { if ( isOneNamedGraph() ) return decl.toString()+" "+FmtUtils.stringForNode(graphIRI) ; else return decl.toString() ; }
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") ; } }