final public Update Create() throws ParseException { Node iri ; boolean silent = false ; jj_consume_token(CREATE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SILENT: jj_consume_token(SILENT); silent=true ; break; default: jj_la1[48] = jj_gen; ; } iri = GraphRef(); {if (true) return new UpdateCreate(iri, silent) ;} throw new Error("Missing return statement in function"); }
@Override public void visit(UpdateCreate update) { Node g = update.getGraph(); if ( g == null ) return; if ( datasetGraph.containsGraph(g) ) { if ( !alwaysSilent && !update.isSilent() ) error("Graph store already contains graph : " + g); return; } // In-memory specific datasetGraph.addGraph(g, GraphFactory.createDefaultGraph()); }
final public Update Create() throws ParseException { Node iri ; boolean silent = false ; jj_consume_token(CREATE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SILENT: jj_consume_token(SILENT); silent=true ; break; default: jj_la1[44] = jj_gen; ; } iri = GraphRef(); {if (true) return new UpdateCreate(iri, silent) ;} throw new Error("Missing return statement in function"); }
@Test public void testCreateDrop2() { DatasetGraph gStore = getEmptyDatasetGraph() ; Update u = new UpdateCreate(graphIRI) ; UpdateAction.execute(u, gStore) ; u = new UpdateCreate(graphIRI, true) ; UpdateAction.execute(u, gStore) ; // JENA-1068 // assertTrue(gStore.containsGraph(graphIRI)) ; assertTrue(graphEmpty(gStore.getGraph(graphIRI))) ; u = new UpdateDrop(graphIRI) ; UpdateAction.execute(u, gStore) ; assertFalse(gStore.containsGraph(graphIRI)) ; u = new UpdateDrop(graphIRI, true) ; UpdateAction.execute(u, gStore) ; }
@Test public void testCreateDrop1() Update u = new UpdateCreate(graphIRI) ;