Examples of prepareTupleQuery()


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

    String query = "SELECT testName, inputURL, outputURL " + "FROM {} mf:name {testName}; "
        + "        mf:result {outputURL}; " + "        mf:action {} qt:data {inputURL} "
        + "USING NAMESPACE " + "  mf = <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>, "
        + "  qt = <http://www.w3.org/2001/sw/DataAccess/tests/test-query#>";

    TupleQueryResult queryResult = con.prepareTupleQuery(QueryLanguage.SERQL, query).evaluate();

    // Add all positive parser tests to the test suite
    while (queryResult.hasNext()) {
      BindingSet bindingSet = queryResult.next();
      testName = ((Literal)bindingSet.getValue("testName")).getLabel();
View Full Code Here

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

    query = "SELECT testName, inputURL " + "FROM {} mf:name {testName}; "
        + "        mf:action {} qt:data {inputURL} " + "USING NAMESPACE "
        + "  mf = <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>, "
        + "  qt = <http://www.w3.org/2001/sw/DataAccess/tests/test-query#>";
    queryResult = con.prepareTupleQuery(QueryLanguage.SERQL, query).evaluate();

    // Add all negative parser tests to the test suite
    while (queryResult.hasNext()) {
      BindingSet bindingSet = queryResult.next();
      testName = ((Literal)bindingSet.getValue("testName")).toString();
View Full Code Here

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

      RepositoryConnection con = systemRepo.getConnection();

      try {
        Resource context;
        TupleQuery query = con.prepareTupleQuery(QueryLanguage.SERQL, REPOSITORY_CONTEXT_QUERY);
        query.setBinding("ID", vf.createLiteral(id));
        TupleQueryResult queryResult = query.evaluate();

        try {
          if (!queryResult.hasNext()) {
View Full Code Here

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

  private void showRepositories() {
    try {
      Repository systemRepo = manager.getSystemRepository();
      RepositoryConnection con = systemRepo.getConnection();
      try {
        TupleQueryResult queryResult = con.prepareTupleQuery(QueryLanguage.SERQL, REPOSITORY_LIST_QUERY).evaluate();
        try {
          if (!queryResult.hasNext()) {
            writeln("--no repositories found--");
          }
          else {
View Full Code Here

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

    con.add(manifest, MANIFEST_FILE, rdfFormat);

    logger.info("Searching for sub-manifests");
    List<String> subManifestList = new ArrayList<String>();

    TupleQueryResult subManifests = con.prepareTupleQuery(QueryLanguage.SERQL, SUBMANIFEST_QUERY).evaluate();
    while (subManifests.hasNext()) {
      BindingSet bindings = subManifests.next();
      subManifestList.add(bindings.getValue("subManifest").toString());
    }
    subManifests.close();
View Full Code Here

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

      con.add(subManifestURL, subManifest, rdfFormat);

      TestSuite subSuite = new TestSuite(subManifest.substring(HOST.length()));

      logger.info("Creating test cases for {}", subManifest);
      TupleQueryResult tests = con.prepareTupleQuery(QueryLanguage.SERQL, TESTCASE_QUERY).evaluate();
      while (tests.hasNext()) {
        BindingSet bindingSet = tests.next();

        String testURI = bindingSet.getValue("TestURI").toString();
        String testName = bindingSet.getValue("Name").toString();
View Full Code Here

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

    query.append("                                               [qt:data {defaultGraph}] ");
    query.append(" USING NAMESPACE ");
    query.append("  mf = <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>, ");
    query.append("  dawgt = <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#>, ");
    query.append("  qt = <http://www.w3.org/2001/sw/DataAccess/tests/test-query#>");
    TupleQuery testCaseQuery = con.prepareTupleQuery(QueryLanguage.SERQL, query.toString());

    query.setLength(0);
    query.append(" SELECT graph ");
    query.append(" FROM {action} qt:graphData {graph} ");
    query.append(" USING NAMESPACE ");
View Full Code Here

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

    query.setLength(0);
    query.append(" SELECT graph ");
    query.append(" FROM {action} qt:graphData {graph} ");
    query.append(" USING NAMESPACE ");
    query.append(" qt = <http://www.w3.org/2001/sw/DataAccess/tests/test-query#>");
    TupleQuery namedGraphsQuery = con.prepareTupleQuery(QueryLanguage.SERQL, query.toString());

    logger.debug("evaluating query..");
    TupleQueryResult testCases = testCaseQuery.evaluate();
    while (testCases.hasNext()) {
      BindingSet bindingSet = testCases.next();
View Full Code Here

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

        + "        mf:action {} qt:query {query}; " + "                     qt:data {input} "
        + "USING NAMESPACE " + "  mf = <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>, "
        + "  qt = <http://www.w3.org/2001/sw/DataAccess/tests/test-query#>, "
        + "  tck = <urn:openrdf.org:sesame:tests#> ";

    TupleQueryResult tests = con.prepareTupleQuery(QueryLanguage.SERQL, query).evaluate();
    while (tests.hasNext()) {
      BindingSet testBindings = tests.next();
      String testName = ((Literal)testBindings.getValue("testName")).getLabel();
      String inputFile = testBindings.getValue("input").toString();
      String queryFile = testBindings.getValue("query").toString();
View Full Code Here

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

          + "  mf = <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>,"
          + "  qt = <http://www.w3.org/2001/sw/DataAccess/tests/test-query#>";

      List<String> graphNames = new ArrayList<String>();

      TupleQueryResult graphs = con.prepareTupleQuery(QueryLanguage.SERQL, query).evaluate();
      while (graphs.hasNext()) {
        BindingSet graphBindings = graphs.next();
        graphNames.add(graphBindings.getValue("graph").toString());
      }
      graphs.close();
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.