Package com.hp.hpl.jena.rdf.model

Examples of com.hp.hpl.jena.rdf.model.Resource.addProperty()


        RDFNode v1 = model.createTypedLiteral("1", XSDDatatype.XSDinteger) ;
        RDFNode v2 = model.createTypedLiteral("2", XSDDatatype.XSDinteger) ;
       
        r1.addProperty(p1, v1).addProperty(p1, v2) ;
        r1.addProperty(p2, v1).addProperty(p2, v2) ;
        r2.addProperty(p1, v1).addProperty(p1, v2) ;
       
        return model  ;
    }
}
View Full Code Here


        Resource r2 = m.createResource("http://example.org/book#2") ;
       
        r1.addProperty(DC.title, "SPARQL - the book")
          .addProperty(DC.description, "A book about SPARQL") ;
       
        r2.addProperty(DC.title, "Advanced techniques for SPARQL") ;
       
        return m ;
    }
}
View Full Code Here

        r1.addProperty(DC.title, "SPARQL - the book")
          .addProperty(DC.description, "A book about SPARQL") ;
       
        r2.addProperty(DC.title, "Advanced techniques for SPARQL") ;

        r3.addProperty(DC.title, "Jena - an RDF framework for Java")
          .addProperty(DC.description, "A book about Jena") ;

        return model ;
    }
}
View Full Code Here

        Resource r2 = m.createResource("http://example.org/book#2") ;
       
        r1.addProperty(DC.title, "SPARQL - the book")
          .addProperty(DC.description, "A book about SPARQL") ;
       
        r2.addProperty(DC.title, "Advanced techniques for SPARQL") ;
       
        return m ;
    }
}
View Full Code Here

        r1.addProperty(DC.title, "SPARQL - the book")
          .addProperty(DC.description, "A book about SPARQL") ;
       
        r2.addProperty(DC.title, "Advanced techniques for SPARQL") ;

        r3.addProperty(DC.title, "Jena - an RDF framework for Java")
          .addProperty(DC.description, "A book about Jena") ;

        return model ;
    }
}
View Full Code Here

        model.setNsPrefix("", BASE) ;
        Resource r1 = model.createResource(BASE+"r1") ;
        Resource r2 = model.createResource(BASE+"r2") ;

        r1.addProperty(RDFS.label, "abc") ;
        r2.addProperty(RDFS.label, "def") ;

        return model  ;
    }
}
View Full Code Here

   * @return
   */
  private Model createAuthenticationModel() {
    Model userModel = ModelFactory.createDefaultModel();
    Resource userBeta = userModel.createResource(FOAF.Person);
    userBeta.addProperty(ACCOUNTMANAGER.userName, username);
    userBeta.addProperty(ACCOUNTMANAGER.passwordSha1, Util.sha1(password));
    return userModel;
  }
 
  private Model createAuthorizationModel() {
View Full Code Here

   */
  private Model createAuthenticationModel() {
    Model userModel = ModelFactory.createDefaultModel();
    Resource userBeta = userModel.createResource(FOAF.Person);
    userBeta.addProperty(ACCOUNTMANAGER.userName, username);
    userBeta.addProperty(ACCOUNTMANAGER.passwordSha1, Util.sha1(password));
    return userModel;
  }
 
  private Model createAuthorizationModel() {
    Model userModel = ModelFactory.createDefaultModel();
View Full Code Here

    }
    sources.add(source);
    Resource moleculeResource = metaModel.createResource(moleculeRef
        .getURIRef());
    Resource assertion = metaModel.createResource();
    assertion.addProperty(METAMODEL.asserter, metaModel
        .createResource(source.getURIRef()));
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(moment);
    Literal momentLit = metaModel.createTypedLiteral(new XSDDateTime(
        calendar));
View Full Code Here

        calendar));
    /*
     * Literal momentLit = metaModel.createTypedLiteral( new
     * MillisDateFormat().format(moment), XSDDatatype.XSDdateTime);
     */
    assertion.addProperty(METAMODEL.assertionTime, momentLit);
    assertion.addProperty(METAMODEL.assertedComponent, moleculeResource);
    moleculeResource.addProperty(RDF.type, type);
    return true;

  }
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.