private void deleteGraphSparqlUpdate ( URI graphUri ) { UpdateRequest request = UpdateFactory . create ( ) ; request . setPrefixMapping ( PrefixMapping . Factory . create ( ) . setNsPrefixes ( Vocabularies . prefixes ) ) ; request . add ( new UpdateDrop ( graphUri . toASCIIString ( ) ) ) ; // Use create form for Sesame-based engines. TODO: Generalise and push to config. UpdateProcessor processor = UpdateExecutionFactory . createRemoteForm ( request , this . getSparqlUpdateEndpoint ( ) . toASCIIString ( ) ) ; processor . execute ( ) ; // TODO: anyway to know if things went ok? }
Delete Graph using SPARQL Update