Package org.openrdf.result

Examples of org.openrdf.result.ContextResult


    RepositoryConnection con;
    try {
      con = repository.getConnection();

      try {
        ContextResult contexts = con.getContextIDs();

        try {
          if (contexts.hasNext()) {
            writeln("+----------");
            while (contexts.hasNext()) {
              Resource context = contexts.next();
              writeln("|" + context.toString());
            }
            writeln("+----------");
          }
          else {
            writeln("--no contexts found--");
          }
        }
        finally {
          contexts.close();
        }
      }
      finally {
        con.close();
      }
View Full Code Here


  {
    try {
      List<String> columnNames = Arrays.asList("contextID");
      List<BindingSet> contexts = new ArrayList<BindingSet>();

      ContextResult iter = getConnection().getContextIDs();

      try {
        while (iter.hasNext()) {
          contexts.add(new ListBindingSet(columnNames, iter.next()));
        }
      }
      finally {
        iter.close();
      }

      return new TupleResultImpl(columnNames, contexts);
    }
    catch (StoreException e) {
View Full Code Here

TOP

Related Classes of org.openrdf.result.ContextResult

Copyright © 2018 www.massapicom. 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.