Package org.openrdf.repository

Examples of org.openrdf.repository.RepositoryConnection.commit()


                }
                connection.setAutoCommit( false );
                try
                {
                    removeEntityStates( entityStates, connection );
                    connection.commit();
                    final Set<EntityDescriptor> entityTypes = indexUpdates( entityStates, connection );
                    indexNewTypes( connection, entityTypes );
                }
                finally
                {
View Full Code Here


                    final Set<EntityDescriptor> entityTypes = indexUpdates( entityStates, connection );
                    indexNewTypes( connection, entityTypes );
                }
                finally
                {
                    connection.commit();
                    connection.close();
                }
            }
            catch( Throwable e )
            {
View Full Code Here

        con.setNamespace("sys", RepositoryConfigSchema.NAMESPACE);

        RepositoryConfig repConfig = new RepositoryConfig(ID, TITLE, new SystemRepositoryConfig());
        RepositoryConfigUtil.updateRepositoryConfigs(con, repConfig);

        con.commit();
      }
    }
    catch (RepositoryConfigException e) {
      throw new RepositoryException(e.getMessage(), e);
    }
View Full Code Here

      RepositoryConnection repCon = super.getConnection();
      try {
        repCon.setAutoCommit(false);
        repCon.clear(context);
        repCon.add(stream, url.toExternalForm(), format, context);
        repCon.commit();
        lastModified.put(url, modified);
      }
      finally {
        repCon.close();
      }
View Full Code Here

          con.remove(context, RDF.TYPE, REPOSITORY_CONTEXT);
          changed = true;
        }
      }

      con.commit();
    }
    finally {
      con.close();
    }
View Full Code Here

    HTTPRepository repo = (HTTPRepository)request.getSession().getAttribute(SessionKeys.REPOSITORY_KEY);
    RepositoryConnection conn = null;
    try {
      conn = repo.getConnection();
      conn.clear(toRemove.getContexts());
      conn.commit();
      logger.info("Clear committed.");
    }
    catch (RepositoryException e) {
      logger.warn("Unable to clear repository", e);
      actionResult = "repository.modify.remove.clear.failure";
View Full Code Here

    RepositoryConnection conn = null;
    try {
      conn = repo.getConnection();
      conn.remove(toRemove.getSubject(), toRemove.getPredicate(), toRemove.getObject(),
          toRemove.getContexts());
      conn.commit();
      logger.info("Remove committed.");
    }
    catch (RepositoryException e) {
      logger.warn("Unable to clear repository", e);
      actionResult = "repository.modify.remove.statements.failure";
View Full Code Here

    HTTPRepository repo = (HTTPRepository)request.getSession().getAttribute(SessionKeys.REPOSITORY_KEY);
    RepositoryConnection conn = null;
    try {
      conn = repo.getConnection();
      conn.add(in, rdfUpload.getBaseUri(), rdfUpload.getFormat());
      conn.commit();
      logger.info("Upload committed.");
    }
    catch (RDFParseException e) {
      logger.warn("Unable to upload file {}", e.getMessage());
      errors.rejectValue("contents", "repository.modify.add.error", new String[] { e.getMessage() }, "Malformed document");
View Full Code Here

   * @throws Exception
   */
  private void loadFresnelConfig(String language) throws Exception {
    RepositoryConnection configConn = confRepository.getConnection();
    configConn.remove((Resource)null, null, null);
    configConn.commit();
    configConn.close();
   
    HashMap<String,String> parameters = new HashMap<String,String>();
    parameters.put("lang", language);
   
View Full Code Here

      conn.add(paramReader, baseURI, format, context);
    }
    else
      conn.add(fileReader, baseURI, format, context);

    conn.commit();
    conn.close();
  }

  /**
   * Filename filter that accepts only file extensions commonly used for RDF data, namely
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.