Package ubiware.integration.soprano

Examples of ubiware.integration.soprano.SopranoStatementIterator


      double durationinseconds = (endTime - startTime) / 1000.0;
      System.out.println("done adding "+ statementList.size()+ " statements in " +durationinseconds+ " seconds");
     
      startTime = System.currentTimeMillis();
      for (Statement statement : statementList){
        SopranoStatementIterator it = model.listStatements(statement);
        while (it.hasNext()){
          it.next();
        }
      }
      endTime = System.currentTimeMillis();
      durationinseconds = (endTime - startTime) / 1000.0;
      System.out.println("done querying "+ statementList.size()+ " statements in " +durationinseconds+ " seconds");
     
      System.exit(0);
      Node subject = new Node(new URI("http://S2"));
      Node predicate = new Node(new URI("http://P3"));
      Node object = new Node(new URI("http://O2"));
      Node context = new Node(new URI("http://C6"));
      Statement partial = new Statement(subject, predicate, object,
          context);

      System.out.println("querying 1 specific");
      SopranoStatementIterator iterator = model.listStatements(partial);
      counter = 0;
      while (iterator.hasNext()) {
        Statement st = iterator.next();
        counter++;
        System.out.println(st);
      }
      System.out.println("Done querying " + counter);

      //System.out.println("querying 100 with only object set.");
      //subject = new Node();
      //predicate = new Node();
      //object = new Node(new URI("http://O2"));
      //context = new Node();
      //partial = new Statement(subject, predicate, object, context);
      //iterator = model.listStatements(partial);
      //counter = 0;
      //while (iterator.hasNext()) {
      //  Statement st = iterator.next();
      //  counter++;
      //  System.out.print(".");
      //}
      //System.out.println("Done querying " + counter);

      System.out.println("querying all with nothing set.");
      subject = new Node();
      predicate = new Node();
      object = new Node();
      context = new Node();
      partial = new Statement(subject, predicate, object, context);
      startTime = System.currentTimeMillis();
      iterator = model.listStatements(partial);
      counter = 0;
      while (iterator.hasNext()) {
        Statement st = iterator.next();

//        counter++;
//        if (counter % 100 == 0) {
//          System.out.print(".");
//        }
View Full Code Here

TOP

Related Classes of ubiware.integration.soprano.SopranoStatementIterator

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.