QueryOperation { public static void execUpdate(Model model, String updateString) { UpdateAction.parseExecute(updateString, model); }  @Deprecated static DatasetGraph loadOntology(OWLOntology ontology); static Dataset loadOntologyAsDataset(OWLOntology ontology); static Dataset loadOntologyAsDataset(OWLOntology ontology, boolean useGraphs); static Model loadOntologyAsModel(OWLOntology ontology); @Deprecated static Dataset loadTriplesAsDataset(String inputPath, String tdbDir); @Deprecated static OWLOntology convertModel(Model model); static OWLOntology convertModel(Model model, IOHelper ioHelper, String catalogPath); static int countResults(ResultSet results); static Dataset createEmptyDataset(); @Deprecated static Model execConstruct(DatasetGraph dsg, String query); static Model execConstruct(Dataset dataset, String query); @Deprecated static ResultSet execQuery(DatasetGraph dsg, String query); static ResultSet execQuery(Dataset dataset, String query); static void execUpdate(Model model, String updateString); @Deprecated static boolean execVerify(
      Map<File, Tuple<ResultSetRewindable, OutputStream>> queriesResults); @Deprecated static boolean execVerify(DatasetGraph dsg, String ruleName, String query); static boolean execVerify(Dataset dataset, String ruleName, String query); static String getDefaultFormatName(String query); static String getDefaultFormatName(Query query); static Lang getFormatLang(String formatName); static String getQueryTypeName(String queryString); static boolean hasResult(ResultSet result); static boolean hasResult(Model result); static boolean maybeWriteResult(ResultSet result, String formatName, OutputStream output); static boolean maybeWriteResult(Model result, String formatName, OutputStream output); static void runConstruct(Dataset dataset, String query, File output, Lang outputFormat); @Deprecated static void runQuery(DatasetGraph dsg, String query, File output, Lang outputFormat); static void runQuery(Dataset dataset, String query, File output, Lang outputFormat); @Deprecated static boolean runSparqlQuery(
      DatasetGraph dsg, String query, String formatName, OutputStream output); static boolean runSparqlQuery(
      Dataset dataset, String queryString, String formatName, OutputStream output); static boolean runSparqlQuery(
      QueryExecution qExec, String formatName, OutputStream output); static void runUpdate(Model model, String updateString, File output, Lang outputFormat); @Deprecated static boolean runVerify(
      DatasetGraph dsg, String ruleName, String query, Path outputPath, Lang outputFormat); static boolean runVerify(
      Dataset dataset, String ruleName, String query, Path outputPath, Lang outputFormat); static void writeResult(boolean result, OutputStream output); static void writeResult(ResultSet resultSet, String formatName, OutputStream output); static void writeResult(ResultSet resultSet, Lang format, OutputStream output); static void writeResult(Model model, String formatName, OutputStream output); static void writeResult(Model model, Lang format, OutputStream output);  }
@Test public void testExecUpdate() throws IOException, OWLOntologyCreationException, OWLOntologyStorageException { OWLOntology inputOntology = loadOntology("/simple.owl"); Model model = QueryOperation.loadOntologyAsModel(inputOntology); String updateString = "PREFIX rdfs: <http: + "PREFIX s: <https: + "INSERT { " + "s:test2 rdfs:label \"test 2\" ." + " } WHERE {}"; QueryOperation.execUpdate(model, updateString); OWLOntology outputOntology = QueryOperation.convertModel(model); assertIdentical("/simple_update.owl", outputOntology); }