Package edu.stanford.smi.protegex.owl.jena.creator

Examples of edu.stanford.smi.protegex.owl.jena.creator.NewOwlProjectCreator


   */
  public static POntology createOntology(URI path, File dir) throws IOntologyException {
    try{
      // new way to create ontology to fix xml:base issue
      Collection errors = new ArrayList();
        NewOwlProjectCreator creator = new NewOwlProjectCreator();
        creator.setOntologyName(""+path);
        creator.create(errors);
        if(!errors.isEmpty())
          throw new IOntologyError(""+errors);
        OWLModel model = creator.getOwlModel();
      //OWLModel model = ProtegeOWL.createJenaOWLModel();
     
      // setup default namespace
      model.getNamespaceManager().setDefaultNamespace(path+"#");
      OWLUtil.renameOntology(model,model.getDefaultOWLOntology(),""+path);
View Full Code Here


  public static POntology createOntology(URI path) throws IOntologyException {
    try{
     
      // new way to create ontology so that xml:base is setup propertly
      Collection errors = new ArrayList();
        NewOwlProjectCreator creator = new NewOwlProjectCreator();
        creator.setOntologyName(""+path);
        creator.create(errors);
        if(!errors.isEmpty())
          throw new IOntologyError(""+errors);
        OWLModel model = creator.getOwlModel();
      //OWLModel model = ProtegeOWL.createJenaOWLModel();
     
      // setup default namespace
      model.getNamespaceManager().setDefaultNamespace(path+"#");
      OWLUtil.renameOntology(model,model.getDefaultOWLOntology(),""+path);
View Full Code Here

   */
  public static POntology createOntology(URI path, File dir) throws IOntologyException {
    try{
      // new way to create ontology to fix xml:base issue
      Collection errors = new ArrayList();
        NewOwlProjectCreator creator = new NewOwlProjectCreator();
        creator.setOntologyName(""+path);
        creator.create(errors);
        if(!errors.isEmpty())
          throw new IOntologyError(""+errors);
        OWLModel model = creator.getOwlModel();
      //OWLModel model = ProtegeOWL.createJenaOWLModel();
     
      // setup default namespace
      model.getNamespaceManager().setDefaultNamespace(path+"#");
      OWLUtil.renameOntology(model,model.getDefaultOWLOntology(),""+path);
View Full Code Here

  public static POntology createOntology(URI path) throws IOntologyException {
    try{
     
      // new way to create ontology so that xml:base is setup propertly
      Collection errors = new ArrayList();
        NewOwlProjectCreator creator = new NewOwlProjectCreator();
        creator.setOntologyName(""+path);
        creator.create(errors);
        if(!errors.isEmpty())
          throw new IOntologyError(""+errors);
        OWLModel model = creator.getOwlModel();
      //OWLModel model = ProtegeOWL.createJenaOWLModel();
     
      // setup default namespace
      model.getNamespaceManager().setDefaultNamespace(path+"#");
      OWLUtil.renameOntology(model,model.getDefaultOWLOntology(),""+path);
View Full Code Here

    @SuppressWarnings("unchecked")
    @Override
    protected Project createNewProject(KnowledgeBaseFactory factory) {
        Collection errors = new ArrayList();
        NewOwlProjectCreator creator = new NewOwlProjectCreator((JenaKnowledgeBaseFactory) factory);
        creator.setOntologyName("http://test.owl");
        try {
            creator.create(errors);
        } catch (AmalgamatedLoadException ale) {
            errors.addAll(ale.getErrorList());
        } catch (OntologyLoadException ole) {
            errors.add(ole);
        } finally {
            handleErrors(errors);
        }
        return creator.getProject();
    }
View Full Code Here

TOP

Related Classes of edu.stanford.smi.protegex.owl.jena.creator.NewOwlProjectCreator

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.