Package org.openrdf.repository

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


    }

    queryResult.close();

    // Add the manifest for negative test cases to a repository and query it
    con.clear();
    url = TriGParserTestCase.class.getResource(MANIFEST_BAD_URL);
    con.add(url, base(url.toExternalForm()), RDFFormat.TURTLE);

    query = "SELECT testName, inputURL " + "FROM {} mf:name {testName}; "
        + "        mf:action {} qt:data {inputURL} " + "USING NAMESPACE "
View Full Code Here


    }

    queryResult.close();

    // Add the manifest for negative test cases to a repository and query it
    con.clear();
    url = TurtleParserTestCase.class.getResource(MANIFEST_BAD_URL);
    con.add(url, base(url.toExternalForm()), RDFFormat.TURTLE);

    query = "SELECT testName, inputURL " + "FROM {} mf:name {testName}; "
        + "        mf:action {} qt:data {inputURL} " + "USING NAMESPACE "
View Full Code Here

    InputStream stream = urlCon.getInputStream();
    try {
      RepositoryConnection repCon = getRepositoryConnection();
      try {
        repCon.begin();
        repCon.clear(context);
        repCon.add(stream, url.toExternalForm(), format, context);
        repCon.commit();
        lastModified.put(url, modified);
      }
      finally {
View Full Code Here

    }

    try {
      RepositoryConnection con = repository.getConnection();
      try {
        con.clear(contexts);
      }
      finally {
        con.close();
      }
    }
View Full Code Here

  {
    Repository systemRepo = getSystemRepository();
    try {
      RepositoryConnection con = systemRepo.getConnection();
      try {
        con.clear(context);
      }
      finally {
        con.close();
      }
    }
View Full Code Here

    logger.info("Found {} sub-manifests", subManifestList.size());

    for (String subManifest : subManifestList) {
      logger.info("Loading sub manifest {}", subManifest);
      con.clear();

      URL subManifestURL = new URL(subManifest);
      ManifestTest.addTurtle(con, subManifestURL, subManifest);

      TestSuite subSuite = new TestSuite(subManifest.substring(HOST.length()));
View Full Code Here

  {
    Repository repo = newRepository();
    repo.initialize();
    RepositoryConnection con = repo.getConnection();
    try {
      con.clear();
      con.clearNamespaces();
    }
    finally {
      con.close();
    }
View Full Code Here

    dataRep.setDataDir(dataDir);
    dataRep.initialize();

    RepositoryConnection con = dataRep.getConnection();
    try {
      con.clear();
      con.clearNamespaces();
    }
    finally {
      con.close();
    }
View Full Code Here

    repository.initialize();

    RepositoryConnection con = repository.getConnection();

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

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

    public final void removeAll() throws YardException {
        RepositoryConnection con = null;
        try {
            con = repository.getConnection();
            con.begin();
            con.clear(contexts); //removes everything
            con.commit();
        } catch (RepositoryException e) {
            throw new YardException("Unable to remove parsed Representations", e);
        } finally {
            if(con != 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.