@Override public void send(Update update) { // ---- check USING/USING NAMED/WITH not used. // ---- update request to have USING/USING NAMED if ( null != usingList && usingList.usingIsPresent() ) { if ( update instanceof UpdateWithUsing ) { UpdateWithUsing upu = (UpdateWithUsing)update ; if ( upu.getUsing().size() != 0 || upu.getUsingNamed().size() != 0 || upu.getWithIRI() != null ) throw new UpdateException("SPARQL Update: Protocol using-graph-uri or using-named-graph-uri present where update request has USING, USING NAMED or WITH") ; for ( Node node : usingList.getUsing() ) upu.addUsing(node) ; for ( Node node : usingList.getUsingNamed() ) upu.addUsingNamed(node) ; } } sink.send(update); }
final public void UsingClause(UpdateWithUsing update) throws ParseException { String iri ; Node n ; jj_consume_token(USING); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: iri = iri(); n = createNode(iri) ; update.addUsing(n) ; break; case NAMED: jj_consume_token(NAMED); iri = iri(); n = createNode(iri) ; update.addUsingNamed(n) ; break; default: jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
final public void UsingClause(UpdateWithUsing update) throws ParseException { String iri ; Node n ; jj_consume_token(USING); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: iri = iri(); n = createNode(iri) ; update.addUsing(n) ; break; case NAMED: jj_consume_token(NAMED); iri = iri(); n = createNode(iri) ; update.addUsingNamed(n) ; break; default: jj_la1[56] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }