protected UpdateDropClear(String iri, boolean silent) { this(Target.create(iri), silent) ; }
protected UpdateDropClear(Node target, boolean silent) { this(Target.create(target), silent) ; }
final public Target GraphRefAll() throws ParseException { Node iri ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GRAPH: iri = GraphRef(); {if (true) return Target.create(iri) ;} break; case DFT: jj_consume_token(DFT); {if (true) return Target.DEFAULT ;} break; case NAMED: jj_consume_token(NAMED); {if (true) return Target.NAMED ;} break; case ALL: jj_consume_token(ALL); {if (true) return Target.ALL ;} break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
final public Target GraphRefAll() throws ParseException { Node iri ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GRAPH: iri = GraphRef(); {if (true) return Target.create(iri) ;} break; case DFT: jj_consume_token(DFT); {if (true) return Target.DEFAULT ;} break; case NAMED: jj_consume_token(NAMED); {if (true) return Target.NAMED ;} break; case ALL: jj_consume_token(ALL); {if (true) return Target.ALL ;} break; default: jj_la1[55] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
final public Target GraphOrDefault() throws ParseException { String iri ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DFT: jj_consume_token(DFT); {if (true) return Target.DEFAULT ;} break; case IRIref: case PNAME_NS: case PNAME_LN: case GRAPH: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GRAPH: jj_consume_token(GRAPH); break; default: jj_la1[53] = jj_gen; ; } iri = iri(); {if (true) return Target.create(createNode(iri)) ;} break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
final public Target GraphOrDefault() throws ParseException { String iri ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DFT: jj_consume_token(DFT); {if (true) return Target.DEFAULT ;} break; case IRIref: case PNAME_NS: case PNAME_LN: case GRAPH: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GRAPH: jj_consume_token(GRAPH); break; default: jj_la1[57] = jj_gen; ; } iri = iri(); {if (true) return Target.create(createNode(iri)) ;} break; default: jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
@Test public void testCopy() { // Use blank nodes (will expose any problems in serialization when spill occurs) Triple t = new Triple(org.apache.jena.graph.NodeFactory.createBlankNode(),p,o2); Triple t2 = new Triple(org.apache.jena.graph.NodeFactory.createBlankNode(),p,o1); DatasetGraph gStore = getEmptyDatasetGraph() ; // Set the threshold to in order to force spill to disk gStore.getContext().set(ARQ.spillToDiskThreshold, 0L) ; defaultGraphData(gStore, data(triple1, triple2, t)) ; namedGraphData(gStore, graphIRI, data(t2)); UpdateCopy copy = new UpdateCopy(Target.DEFAULT, Target.create(graphIRI)); UpdateAction.execute(copy, gStore); assertFalse(graphEmpty(gStore.getDefaultGraph())) ; assertFalse(graphEmpty(gStore.getGraph(graphIRI))) ; assertTrue(graphContains(gStore.getGraph(graphIRI), triple1)) ; assertTrue(graphContains(gStore.getGraph(graphIRI), triple2)) ; assertTrue(graphContains(gStore.getGraph(graphIRI), t)) ; assertFalse(graphContains(gStore.getGraph(graphIRI), t2)) ; assertTrue(gStore.getDefaultGraph().isIsomorphicWith(gStore.getGraph(graphIRI))); }