@Test void testUpdateError() { final Graph graph = rdf.createGraph(); getTriples().forEach(graph::add); assertEquals(3L, graph.size(), "Incorrect graph size!"); assertThrows(TrellisRuntimeException.class, () -> service.update(graph, "blah blah blah blah blah", SPARQL_UPDATE, null), "no exception on bad update!"); }
@Override public void update(final Graph graph, final String update, final RDFSyntax syntax, final String base) { requireNonNull(graph, "The input graph may not be null"); requireNonNull(update, "The update command may not be null"); requireNonNull(syntax, "The RDF syntax may not be null"); if (!SPARQL_UPDATE.equals(syntax)) { throw new TrellisRuntimeException("The syntax " + syntax + " is not supported for updates."); } try { final org.apache.jena.graph.Graph g = JenaCommonsRDF.toJena(graph); execute(create(update, base), g); } catch (final UpdateException | QueryParseException ex) { throw new TrellisRuntimeException(ex); } }
JenaIOService implements IOService { @Override public void update(final Graph graph, final String update, final RDFSyntax syntax, final String base) { requireNonNull(graph, "The input graph may not be null"); requireNonNull(update, "The update command may not be null"); requireNonNull(syntax, "The RDF syntax may not be null"); if (!SPARQL_UPDATE.equals(syntax)) { throw new TrellisRuntimeException("The syntax " + syntax + " is not supported for updates."); } try { final org.apache.jena.graph.Graph g = JenaCommonsRDF.toJena(graph); execute(create(update, base), g); } catch (final UpdateException | QueryParseException ex) { throw new TrellisRuntimeException(ex); } } }
JenaIOService implements IOService { @Override public void update(final Graph graph, final String update, final RDFSyntax syntax, final String base) { requireNonNull(graph, "The input graph may not be null"); requireNonNull(update, "The update command may not be null"); requireNonNull(syntax, "The RDF syntax may not be null"); if (!SPARQL_UPDATE.equals(syntax)) { throw new TrellisRuntimeException("The syntax " + syntax + " is not supported for updates."); } try { final org.apache.jena.graph.Graph g = JenaCommonsRDF.toJena(graph); execute(create(update, base), g); } catch (final UpdateException | QueryParseException ex) { throw new TrellisRuntimeException(ex); } } JenaIOService();  JenaIOService(final NamespaceService namespaceService);  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer); @Inject  JenaIOService(final NamespaceService namespaceService,
            final RDFaWriterService htmlSerializer,
            @TrellisProfileCache final CacheService<String, String> cache); private  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer,
            final CacheService<String, String> cache, final Config config);  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer,
            final CacheService<String, String> cache, final String allowedContexts, final String allowedContextDomains,
            final boolean relativeIRIs);  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer,
            final CacheService<String, String> cache, final Set<String> allowedContexts,
            final Set<String> allowedContextDomains, final boolean relativeIRIs); }
JenaIOService implements IOService { @Override public void update(final Graph graph, final String update, final RDFSyntax syntax, final String base) { requireNonNull(graph, "The input graph may not be null"); requireNonNull(update, "The update command may not be null"); requireNonNull(syntax, "The RDF syntax may not be null"); if (!SPARQL_UPDATE.equals(syntax)) { throw new TrellisRuntimeException("The syntax " + syntax + " is not supported for updates."); } try { final org.apache.jena.graph.Graph g = JenaCommonsRDF.toJena(graph); execute(create(update, base), g); } catch (final UpdateException | QueryParseException ex) { throw new TrellisRuntimeException(ex); } } JenaIOService();  JenaIOService(final NamespaceService namespaceService);  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer); @Inject  JenaIOService(final NamespaceService namespaceService,
            final RDFaWriterService htmlSerializer,
            @TrellisProfileCache final CacheService<String, String> cache); private  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer,
            final CacheService<String, String> cache, final Config config);  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer,
            final CacheService<String, String> cache, final String allowedContexts, final String allowedContextDomains,
            final boolean relativeIRIs);  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer,
            final CacheService<String, String> cache, final Set<String> allowedContexts,
            final Set<String> allowedContextDomains, final boolean relativeIRIs); @Override List<RDFSyntax> supportedReadSyntaxes(); @Override List<RDFSyntax> supportedWriteSyntaxes(); @Override List<RDFSyntax> supportedUpdateSyntaxes(); @Override void write(final Stream<Triple> triples, final OutputStream output, final RDFSyntax syntax,
            final String baseUrl, final IRI... profiles); @Override Stream<Triple> read(final InputStream input, final RDFSyntax syntax, final String base); @Override void update(final Graph graph, final String update, final RDFSyntax syntax, final String base); }
JenaIOService implements IOService { @Override public void update(final Graph graph, final String update, final RDFSyntax syntax, final String base) { requireNonNull(graph, "The input graph may not be null"); requireNonNull(update, "The update command may not be null"); requireNonNull(syntax, "The RDF syntax may not be null"); if (!SPARQL_UPDATE.equals(syntax)) { throw new TrellisRuntimeException("The syntax " + syntax + " is not supported for updates."); } try { final org.apache.jena.graph.Graph g = JenaCommonsRDF.toJena(graph); execute(create(update, base), g); } catch (final UpdateException | QueryParseException ex) { throw new TrellisRuntimeException(ex); } } JenaIOService();  JenaIOService(final NamespaceService namespaceService);  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer); @Inject  JenaIOService(final NamespaceService namespaceService,
            final RDFaWriterService htmlSerializer,
            @TrellisProfileCache final CacheService<String, String> cache); private  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer,
            final CacheService<String, String> cache, final Config config);  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer,
            final CacheService<String, String> cache, final String allowedContexts, final String allowedContextDomains,
            final boolean relativeIRIs);  JenaIOService(final NamespaceService namespaceService, final RDFaWriterService htmlSerializer,
            final CacheService<String, String> cache, final Set<String> allowedContexts,
            final Set<String> allowedContextDomains, final boolean relativeIRIs); @Override List<RDFSyntax> supportedReadSyntaxes(); @Override List<RDFSyntax> supportedWriteSyntaxes(); @Override List<RDFSyntax> supportedUpdateSyntaxes(); @Override void write(final Stream<Triple> triples, final OutputStream output, final RDFSyntax syntax,
            final String baseUrl, final IRI... profiles); @Override Stream<Triple> read(final InputStream input, final RDFSyntax syntax, final String base); @Override void update(final Graph graph, final String update, final RDFSyntax syntax, final String base); static final String CONFIG_IO_JSONLD_PROFILES; static final String CONFIG_IO_JSONLD_DOMAINS; static final String CONFIG_IO_RELATIVE_IRIS; }