Package org.openrdf.repository

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


    RepositoryConnection con = repository.getConnection();
    con.setAutoCommit(false);

    // clear the input store
    con.clear();
    con.commit();

    // Upload input data
    InputStream stream = getClass().getResourceAsStream(inputData);
    try {
View Full Code Here


  // implements edu.lehigh.swat.bench.ubt.api.Repository.clear()
  public void clear() {
    try {
      RepositoryConnection con = repository.getConnection();
      con.clear();
      con.close();
    }
    catch (RepositoryException e) {
      throw new RuntimeException(e);
    }
View Full Code Here

        Repository repo = new SailRepository(new MemoryStore());
        repo.initialize();
        RepositoryConnection conn = repo.getConnection();
        try {
            conn.begin();
            conn.clear();
            InputStream is = LdpTestCasesUtils.class.getResourceAsStream(path);
            if (is == null) {
                throw new IOException("Manifest file not found at: " + path);
            } else {
                try {
View Full Code Here

        try {
            RepositoryConnection con = cacheRepository.getConnection();
            try {
                con.begin();

                con.clear();

                con.commit();
            } catch(RepositoryException ex) {
                con.rollback();
            } finally {
View Full Code Here

        try {
            RepositoryConnection rc = store.getRepository().getConnection();
            try {
                rc.begin();

                rc.clear(SWC_GRAPH);
                rc.commit();
    rc.begin();
                loadFile(dir, rc);
                rc.commit();
    rc.begin();
View Full Code Here

        try {
            Repository repo = new SailRepository(sail);
            RepositoryConnection rc = repo.getConnection();
            try {
                rc.begin();
                rc.clear();
                rc.commit();
                rc.begin();

                rc.add(new File("/tmp/twitlogic-dump.nq"), "", RDFFormat.NQUADS);
                rc.commit();
View Full Code Here

    public void clear() throws TweetStoreException {
        try {
            RepositoryConnection rc = repository.getConnection();
            try {
                rc.begin();
                rc.clear();
                rc.commit();
            } finally {
                rc.rollback();
                rc.close();
            }
View Full Code Here

      String strurl = "http://dbpedia.org/data/Berlin.rdf";
      URL url = new URL(strurl);
      URI context = repository.getValueFactory().createURI("http://demo.openlinksw.com/demo#this");
      Value[][] results = null;

      con.clear(context);
      startTest();
      try {
        URI subject = repository.getValueFactory().createURI("urn:s");
        URI predicate = repository.getValueFactory().createURI("urn:p");
        URI object = repository.getValueFactory().createURI("urn:o");
View Full Code Here

      endTest((ok && (results.length > 0))); // should return true

      startTest();
      try {
        ok = true;
        con.clear(context);
        log("Clearing triple store");
        long sz = con.size(context);
        ok = (sz == 0);
      }
      catch (Exception e) {
View Full Code Here

      Literal un_Value = repository.getValueFactory().createLiteral(utf8str);

      startTest();
      try {
        ok = true;
        con.clear(context);
        log("Loading UNICODE single triple");
        con.add(un_testuri, un_name, un_Value, context);
        query = "SELECT * FROM <" + context + "> WHERE {?s ?p ?o} LIMIT 1";
        results = doTupleQuery(con, query);
      }
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.