Package org.ontoware.rdf2go.model

Examples of org.ontoware.rdf2go.model.QueryRow


  }


  public OOQueryRow next() {
    if (hasNext()) {
      QueryRow rdf2go = this.rdf2goIterator.next();
      OOQueryRow ooRow = new OOQueryRowImpl( this.ooQueryResultTable, rdf2go );
      return ooRow;
    }
    else {
      this.rdf2goIterator.close();
View Full Code Here


   
    ClosableIterator<QueryRow> it =  result.iterator();
    Map<Node,Node> snodes = new HashMap<Node,Node>();
   
    while(it.hasNext()) {
      QueryRow row = it.next();
      snodes.put(row.getValue(f1), row.getValue(f2));
    }
   
    it.close();
   
    Node[][] res = new Node[snodes.size()][2];
    int i = 0;
    for(Map.Entry<Node, Node> row : snodes.entrySet()) {
      res[i][0] = row.getKey();
      res[i][1] = row.getValue();
      i++;
    }
   
    return res;
  }
View Full Code Here

     
      QueryResultTable table = m.querySelect(String.format(this.queries[i], param), "SPARQL");
      ClosableIterator<QueryRow> it = table.iterator();
     
      while(it.hasNext()) {
        QueryRow row = it.next();
        sb.append(row.getLiteralValue("value")).append(", ");
      }

      if(sb.length() > 3)
        sb.delete(sb.length() - 2, sb.length());
     
View Full Code Here

        if(table != null){
          ClosableIterator<QueryRow> it = table.iterator();
          Set<UserRecommendationPrefs> sprefs = new HashSet<UserRecommendationPrefs>();
         
          while(it.hasNext()) {
            QueryRow row = it.next();
           
            sprefs.add(new UserRecommendationPrefs(row.getLiteralValue("type"),
                                 Integer.valueOf(row.getLiteralValue("limit")),
                                 Integer.valueOf(row.getLiteralValue("row"))));
          }
         
          it.close();
         
          if(sprefs.size() > 0)
View Full Code Here

   
    ClosableIterator<QueryRow> it =  result.iterator();
    Set<Node> snodes = new HashSet<Node>();
   
    while(it.hasNext()) {
      QueryRow row = it.next();
      snodes.add(row.getValue(field));
    }
   
    it.close();
   
    return snodes.toArray(new Node[0]);
View Full Code Here

    {
      QueryResultTable results = innerModel.querySelect(RdfQuery.RDF_GET_USER_SIOC_DIR.toString(
        S3B_SSCF.Directory , dirLabel, ownerMbox),"SPARQL");
      ClosableIterator<QueryRow> it = results.iterator();
      if (it.hasNext()) {
        QueryRow qr = it.next();
        if(qr.getValue(results.getVariables().get(0))!=null)
          return qr.getValue(results.getVariables().get(0)).toString();
      }
    }
    catch (Exception e)
    {
      // ignore
View Full Code Here

    String query2 = SparqlQuery.SELECT_ALL_BOOKS.getQuery();
   
    QueryResultTable sparqlSelect = md.sparqlSelect(query2);
    ClosableIterator<QueryRow> rows = sparqlSelect.iterator();
    while(rows.hasNext()){
      QueryRow row = rows.next();
      String sURI = row.getValue("uri").toString();
      URI termURI = new URIImpl(sURI);
      books.add(termURI);
    }
   
    md.commit();
View Full Code Here

TOP

Related Classes of org.ontoware.rdf2go.model.QueryRow

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.