Package uk.ac.osswatch.simal.rdf

Examples of uk.ac.osswatch.simal.rdf.DuplicateURIException


  }

  public IDoapCategory create(String uri) throws DuplicateURIException,
      SimalRepositoryException {
    if (getRepository().containsResource(uri)) {
      throw new DuplicateURIException(
          "Attempt to create a second project category with the URI "
              + uri);
    }

    Model model = ((JenaSimalRepository) getRepository()).getModel();
View Full Code Here


    if (uri == null || uri.length() == 0) {
      throw new SimalRepositoryException("URI cannot be blank or null");
    }
    Model model = getModel();
    if (SimalRepositoryFactory.getInstance().containsResource(uri)) {
      throw new DuplicateURIException(
          "Attempt to create a second homepage with the URI " + uri);
    }

    com.hp.hpl.jena.rdf.model.Resource r = model.createResource(uri);
    Statement s = model.createStatement(r, RDF.type, FOAF.Document);
View Full Code Here

    }
   
    public IProject createProject(String uri) throws SimalRepositoryException,
        DuplicateURIException {
      if (containsProject(uri)) {
        throw new DuplicateURIException(
            "Attempt to create a second project with the URI " + uri);
      }
    Model model = getModel();
     
      String simalProjectURI;
View Full Code Here

  }

  public IPerson create(String uri) throws SimalRepositoryException,
      DuplicateURIException {
      if (getRepository().containsPerson(uri)) {
          throw new DuplicateURIException(
              "Attempt to create a second person with the URI " + uri);
        }
    Model model = ((JenaSimalRepository)getRepository()).getModel();

        String personID = getNewID();
View Full Code Here

  }

  public IOrganisation create(String uri) throws DuplicateURIException,
      SimalRepositoryException {
    if (SimalRepositoryFactory.getProjectService().containsProject(uri)) {
      throw new DuplicateURIException(
          "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);
View Full Code Here

    } catch (URISyntaxException e) {
      throw new InvalidURIException("Invalid URI; error: " + e.getMessage());
    }
   
    if (getRepository().containsResource(uri)) {
      throw new DuplicateURIException(
          "Attempt to create a repository with a URI that already exists: " + uri);
    }
  }
View Full Code Here

      return (IReview) reviews.toArray()[0];
    }

  public IReview create(String uri) throws DuplicateURIException, SimalRepositoryException {
      if (containsReview(uri)) {
        throw new DuplicateURIException(
            "Attempt to create a second review with the URI " + uri);
      }
    Model model = ((JenaSimalRepository)getRepository()).getModel();
     
      String simalReviewURI;
View Full Code Here

TOP

Related Classes of uk.ac.osswatch.simal.rdf.DuplicateURIException

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.