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

Examples of com.hp.hpl.jena.rdf.model.Model.createStatement()


          "Attempt to create a second organisation with the URI " + uri);
    }

    Model model = ((JenaSimalRepository) getRepository()).getModel();
    com.hp.hpl.jena.rdf.model.Resource foafOrg = model.createResource(uri);
    Statement s = model.createStatement(foafOrg, RDF.type,
        Foaf.ORGANIZATION);
    model.add(s);

    IOrganisation org = new Organisation(foafOrg);
    return org;
View Full Code Here


      } else {
          simalReviewURI = uri;
      }

      com.hp.hpl.jena.rdf.model.Resource r = model.createResource(simalReviewURI);
      Statement s = model.createStatement(r, RDF.type, SimalOntology.REVIEW);
      model.add(s);
         
      if (!uri.startsWith(RDFUtils.PROJECT_NAMESPACE_URI)) {
          com.hp.hpl.jena.rdf.model.Resource res = model.createResource(uri);
          s = model.createStatement(r, RDFS.seeAlso, res);
View Full Code Here

      Statement s = model.createStatement(r, RDF.type, SimalOntology.REVIEW);
      model.add(s);
         
      if (!uri.startsWith(RDFUtils.PROJECT_NAMESPACE_URI)) {
          com.hp.hpl.jena.rdf.model.Resource res = model.createResource(uri);
          s = model.createStatement(r, RDFS.seeAlso, res);
          model.add(s);
        }

      IReview review = new Review(r);
      review.setSimalID(getNewReviewID());
View Full Code Here

 
    public boolean containsReview(String uri) {
    Model model = ((JenaSimalRepository)getRepository()).getModel();
      Property o = model.createProperty(RDFUtils.SIMAL_REVIEW_NAMESPACE_URI);
      com.hp.hpl.jena.rdf.model.Resource r = model.createResource(uri);
      Statement doap = model.createStatement(r, RDF.type, o);

      o = model.createProperty(RDFUtils.SIMAL_PROJECT);
      Statement simal = model.createStatement(r, RDF.type, o);
      return model.contains(doap) || model.contains(simal);
    }
View Full Code Here

      Property o = model.createProperty(RDFUtils.SIMAL_REVIEW_NAMESPACE_URI);
      com.hp.hpl.jena.rdf.model.Resource r = model.createResource(uri);
      Statement doap = model.createStatement(r, RDF.type, o);

      o = model.createProperty(RDFUtils.SIMAL_PROJECT);
      Statement simal = model.createStatement(r, RDF.type, o);
      return model.contains(doap) || model.contains(simal);
    }

  public IReview getReview(String uri) {
      if (containsReview(uri)) {
View Full Code Here

    ensureValidURI(uri);

    Model model = ((JenaSimalRepository) getRepository()).getModel();

    com.hp.hpl.jena.rdf.model.Resource r = model.createResource(uri);
    Statement s = model.createStatement(r, RDF.type, type.getResource());
    model.add(s);
   
    return new Repository(r);
  }
 
View Full Code Here

  private static final long serialVersionUID = 1L;

  public void addCurrentProject(String uri) {
      Model model = getJenaResource().getModel();
      com.hp.hpl.jena.rdf.model.Resource r = model.getResource(uri);
      Statement statement = model.createStatement(
          getJenaResource(),
          FOAF.currentProject, r);
      model.add(statement);
  }
View Full Code Here

  public void addEmail(String email) {
    if (!email.startsWith("mailto:")) {
      email = "mailto:" + email;
    }
    Model model = getJenaResource().getModel();
    Statement statement = model.createStatement(getJenaResource(), FOAF.mbox,
        model.createResource(email));
    model.add(statement);
    try {
      addSHA1Sum(RDFUtils.getSHA1(email));
    } catch (NoSuchAlgorithmException e) {
View Full Code Here

    }
  }

  public void addSHA1Sum(String sha1) {
    Model model = getJenaResource().getModel();
    Statement statement = model.createStatement(getJenaResource(),
        FOAF.mbox_sha1sum, sha1);
    model.add(statement);
  }
 
  public String getUsername() {
View Full Code Here

    return project;
  }

  public void setProject(IProject project) {
    Model model = getJenaResource().getModel();
      Statement statement = model.createStatement(getJenaResource(),
          SimalOntology.PROJECT, (com.hp.hpl.jena.rdf.model.Resource) project
              .getRepositoryResource());
      model.add(statement);
  }
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.