Package org.ontoware.rdf2go.model

Examples of org.ontoware.rdf2go.model.Model.findStatements()


    String finalURI = "";
    while (true)
    {
    randomID = gerateId();
    finalURI = visitURI+"visit#"+randomID;
    ClosableIterator<Statement> rows2 = md.findStatements(md.createURI(finalURI), null, null);
    if(rows2.hasNext())
      {
        i=1;
      }
    else break;
View Full Code Here


      md.addStatement(md.createURI(finalURI), md.createURI(visitResource), md.createURI(res));
    }
   
   
   
    ClosableIterator<Statement> rows2 = md.findStatements(null, null, null);
    while(rows2.hasNext()){
        System.out.println(rows2.next());
    }
    rows2.close();
    //md.dump();
View Full Code Here

    String hasVisited = "http://s3b.corrib.org/s3b/0.1/hasVisited";
    String Visit = "http://s3b.corrib.org/s3b/0.1/Visit";
    String visitDate = "http://s3b.corrib.org/s3b/0.1/visitDate";
    md.addStatement(md.createURI(mbox.toString()), md.createURI(hasVisited), md.createURI(resource.getURIAsString()));
  //  md.addStatement(md.createURI(mbox.toString()), md.createURI("http://s3b.corrib.org/s3b/0.1/hasVisited"), md.createURI(resource.getURIAsString()));
    ClosableIterator<Statement> rows2 = md.findStatements(null, null, null);
    while(rows2.hasNext()){
        System.out.println(rows2.next());
    }
    rows2.close();
    md.dump();
View Full Code Here

      getRdfResponse(sb, url);
       
      tempModel = DbFace.getTempModel();
      tempModel.readFrom(new StringReader(sb.toString()));
     
      ClosableIterator<Statement> statements = tempModel.findStatements(Variable.ANY, RDF.type, tempModel.createURI(siocDataUri));
           
      List<String> postExludedPredicates = null;
      if (siocDataUri.equals(SIOC.Post)) {
        //this is the list of predicates which define the post' details, that isn't needed in the bookmarks
        postExludedPredicates = new ArrayList<String>();
View Full Code Here

       
        //in case od sioc:post there are a lot of information, some of which can be ommited in bookmarks
        if (siocDataUri.equals(SIOC.Post)) {
          /* For each piece of information about the post, scheck wheter it is unneeded.
           * If so, remove it from the graph containing the details. */
          ClosableIterator<Statement> ss = tempModel.findStatements(stmt.getSubject(), null, null);
          while (ss.hasNext()) {
            Statement s = ss.next();
            if(postExludedPredicates!=null)
              for (String exclPred : postExludedPredicates) {
                if (exclPred.equals(s.getPredicate().toString())) {
View Full Code Here

      while (reif.hasNext()){
        tempModel.addStatement(reif.next());
      }
      reif.close();
     
      ClosableIterator<Statement> statements = tempModel.findStatements(Variable.ANY, new URIImpl(SIOC.postedBy), Variable.ANY);
     
      Collection addedAuthors = new ArrayList();
      /* Exported XML must apply to the  SIOC convent, so foreach post the created_by should no longer be set to
       * the author's mbox, but must point to the Sioc:User node (it must be added).
       * Foaf:Person pointing to the Sioc:User must be added as well.
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.