Package com.hp.hpl.jena.ontology

Examples of com.hp.hpl.jena.ontology.OntModelSpec


  static private String check(Checker chk, String url, String lang,
      OntDocumentManager dm,
      String msgPrefix, CommandLine cmd) {
//     create an ontology model with no reasoner and the default doc manager
    OntModelSpec dullOWL =
      new OntModelSpec(null, dm, null, ProfileRegistry.OWL_LANG);
   
    OntModel m =
      ModelFactory.createOntologyModel(
          dullOWL);
        m.read(url,lang);
View Full Code Here


  static private String check(Checker chk, InputStream in, String lang,
      OntDocumentManager dm,
      String msgPrefix, CommandLine cmd) {
//     create an ontology model with no reasoner and the default doc manager
    OntModelSpec dullOWL =
      new OntModelSpec(null, dm, null, ProfileRegistry.OWL_LANG);
   
    OntModel m =
      ModelFactory.createOntologyModel(
          dullOWL);
View Full Code Here

    }
    model.read(uriModel, lang);
    return model;
  }
  private static OntModel _createDefaultOntModel() {
    OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);
    OntDocumentManager docMang = new OntDocumentManager();
    spec.setDocumentManager(docMang);
    OntModel model = ModelFactory.createOntologyModel(spec, null);
    // removeNotNeccesaryNamespaces(model);

    return model;
  }
View Full Code Here

   
    return model;
  }
 
  private static OntModel createDefaultOntModel() {
    OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);
    OntDocumentManager docMang = new OntDocumentManager();
    spec.setDocumentManager(docMang);
    OntModel model = ModelFactory.createOntologyModel(spec, null);
    // removeNotNeccesaryNamespaces(model);

    return model;
  }
View Full Code Here

    return null;
  }

  // verbatim copy from JenaUtil
  public static OntModel createDefaultOntModel() {
    OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);
    OntDocumentManager docMang = new OntDocumentManager();
    spec.setDocumentManager(docMang);
    OntModel model = ModelFactory.createOntologyModel(spec, null);
    // removeNotNeccesaryNamespaces(model);

    return model;
  }
View Full Code Here

    return ontModel;
  }
 
 
  private static OntModel createDefaultOntModel() {
    OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);
    OntDocumentManager docMang = new OntDocumentManager();
    spec.setDocumentManager(docMang);
    OntModel model = ModelFactory.createOntologyModel(spec, null);
    // removeNotNeccesaryNamespaces(model);

    return model;
  }
View Full Code Here

  private static String _removeTrailingFragment(String uri) {
    return uri.replaceAll("(/|#)+$", "");
  }

  private static OntModel createDefaultOntModel() {
    OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);
    OntDocumentManager docMang = new OntDocumentManager();
    spec.setDocumentManager(docMang);
    OntModel model = ModelFactory.createOntologyModel(spec, null);
    // removeNotNeccesaryNamespaces(model);

    return model;
  }
View Full Code Here

   
    return model;
  }

  private static OntModel createDefaultOntModel() {
    OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);
    OntDocumentManager docMang = new OntDocumentManager();
    spec.setDocumentManager(docMang);
    OntModel model = ModelFactory.createOntologyModel(spec, null);
    // removeNotNeccesaryNamespaces(model);

    return model;
  }
View Full Code Here

    private OntModel createJenaOWLModel(ResourceLoader owlSource) throws ResourceNotFoundException {
        KnowledgeResourceTO[] owlsources = null;
        //Do not use reasoner to load ontologies
        OntDocumentManager dm = OntDocumentManager.getInstance();
        dm.setProcessImports(false);
        OntModelSpec spec = new OntModelSpec( OntModelSpec.OWL_MEM);
        spec.setDocumentManager(dm);
        OntModel ontModel = ModelFactory.createOntologyModel(spec, null );
        owlsources = owlSource.getKnowledgeResources();
        logger.debug("Loading " + owlsources.length  +" resources into the model");
        for ( int i = 0; i< owlsources.length ; i++ ) {
            final InputStream is = owlsources[i].getKnowledgeSourceData();       
View Full Code Here

    private OntModel createJenaOWLModel(ResourceLoader owlSource) throws ResourceNotFoundException {
        KnowledgeResourceTO[] owlsources = null;
        Reasoner reasoner =  PelletReasonerFactory.theInstance().create();
        OntDocumentManager dm = OntDocumentManager.getInstance();
        dm.setProcessImports(false);
        OntModelSpec spec = new OntModelSpec( OntModelSpec.OWL_DL_MEM);
        spec.setDocumentManager(dm);       
        //spec.setReasoner(new OWLMicroReasoner(OWLMicroReasonerFactory.theInstance()));
        spec.setReasoner(reasoner);
        OntModel ontModel = ModelFactory.createOntologyModel( spec, null );
        owlsources = owlSource.getKnowledgeResources();
        logger.debug("Loading with reasoner " + owlsources.length  +" resources into the model");
        for ( int i = 0; i< owlsources.length ; i++ ) {                  
            final InputStream is = owlsources[i].getKnowledgeSourceData();
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.ontology.OntModelSpec

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.