Package com.complexible.stardog.api

Examples of com.complexible.stardog.api.Connection.commit()


    Connection connection = dataSource.getConnection();
   
    try {
      connection.begin();
      T t =  action.doWithConnection(connection);
      connection.commit();
      return t;
    } catch (StardogException e) {
      log.error("Error executing ConnectionCallback", e);
      throw new RuntimeException(e);
    } finally {
View Full Code Here


    }
   
    try {
      connection.begin();
      connection.remove().statements(subjectResource, predicateResource, objectValue, context);
      connection.commit();
    } catch (StardogException e) {
      log.error("Error with remove statement", e);
      throw new RuntimeException(e);
    } finally {
      dataSource.releaseConnection(connection);
View Full Code Here

    Connection connection = dataSource.getConnection();
   
    try {
      connection.begin();
      connection.remove().context(ValueFactoryImpl.getInstance().createURI(graphUri));
      connection.commit();
    } catch (StardogException e) {
      log.error("Error removing graph from Stardog", e);
      throw new RuntimeException(e);
    } finally {
      dataSource.releaseConnection(connection);
View Full Code Here

   
    try {
      connection.begin();
      connection.remove().statements(subjectResource, predicateResource, null, context);
      connection.add().statement(subjectResource, predicateResource, objectValue, context);
      connection.commit();
    } catch (StardogException e) {
      log.error("Error with remove statement", e);
      throw new RuntimeException(e);
    } finally {
      dataSource.releaseConnection(connection);
View Full Code Here

    Adder adder = null;
    try {
      connection.begin();
      adder = connection.add();
      T t = action.add(adder);
      connection.commit();
      return t;
    } catch (StardogException e) {
      log.error("Error with adder ", e);
      throw new RuntimeException(e);
    } finally {
View Full Code Here

    Remover remover = null;
    try {
      connection.begin();
      remover = connection.remove();
      T t = action.remove(remover);
      connection.commit();
      return t;
    } catch (StardogException e) {
      log.error("Error with remover ", e);
      throw new RuntimeException(e);
    } finally {
View Full Code Here

      if (context != null) {
        connection.add().graph(graph, context);
      } else {
        connection.add().graph(graph);
      }
      connection.commit();
    } catch (StardogException e) {
      log.error("Error adding graph to Stardog", e);
      throw new RuntimeException(e);
    } finally {
      context = null;
View Full Code Here

    Adder adder = null;
    try {
      connection.begin();
      adder = connection.add();
      callback.write(adder, items);
      connection.commit();
    } catch (StardogException e) {
      log.error("Error with SnarlItemWriter ", e);
      throw new RuntimeException(e);
    } finally {
      adder = null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.