Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.createOntology()


        }

        available = false;
        try {
            OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
            OWLOntology ontology = manager.createOntology(IRI
                    .create("http://www.semanticweb.org/owlapi/ontologies/ontology"));

            OWLDataFactory factory = manager.getOWLDataFactory();
            OWLDeclarationAxiom declarationAxiom = factory.getOWLDeclarationAxiom(data);
            manager.addAxiom(ontology, declarationAxiom);
View Full Code Here


        available = false;

        try {
            OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
            OWLOntology ontology = manager.createOntology(IRI
                    .create("http://www.semanticweb.org/owlapi/ontologies/ontology"));

            OWLDataFactory factory = manager.getOWLDataFactory();
            OWLDeclarationAxiom declarationAxiom = factory.getOWLDeclarationAxiom(data);
            manager.addAxiom(ontology, declarationAxiom);
View Full Code Here

        available = false;

        try {
            OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
            OWLOntology ontology = manager.createOntology(IRI
                    .create("http://www.semanticweb.org/owlapi/ontologies/ontology"));

            OWLDataFactory factory = manager.getOWLDataFactory();
            OWLDeclarationAxiom declarationAxiom = factory.getOWLDeclarationAxiom(data);
            manager.addAxiom(ontology, declarationAxiom);
View Full Code Here

    IRI ontologyIRI = IRI.create(ontologyName);
    // Here we have decided to call our ontology
    // "ontologyName" If we publish our
    // ontology then we should make the location coincide with the ontology
    // IRI Now we have an IRI we can create an ontology using the manager
    OWLOntology ontology = manager.createOntology(ontologyIRI);
    System.out.println("Created ontology: " + ontology);
    // In OWL 2 if an ontology has an ontology IRI it may also have a
    // version IRI The OWL API encapsulates ontology IRI and possible
    // version IRI information in an OWLOntologyID Each ontology knows about
    // its ID
View Full Code Here

    IRI ontologyIRI = IRI.create(ontologyName);
    // Here we have decided to call our ontology
    // "ontologyName" If we publish our
    // ontology then we should make the location coincide with the ontology
    // IRI Now we have an IRI we can create an ontology using the manager
    OWLOntology ontology = manager.createOntology(ontologyIRI);
    System.out.println("Created ontology: " + ontology);
    // In OWL 2 if an ontology has an ontology IRI it may also have a
    // version IRI The OWL API encapsulates ontology IRI and possible
    // version IRI information in an OWLOntologyID Each ontology knows about
    // its ID
View Full Code Here

    IRI ontologyIRI = IRI.create(ontologyName);
    // Here we have decided to call our ontology
    // "ontologyName" If we publish our
    // ontology then we should make the location coincide with the ontology
    // IRI Now we have an IRI we can create an ontology using the manager
    OWLOntology ontology = manager.createOntology(ontologyIRI);
    System.out.println("Created ontology: " + ontology);
    // In OWL 2 if an ontology has an ontology IRI it may also have a
    // version IRI The OWL API encapsulates ontology IRI and possible
    // version IRI information in an OWLOntologyID Each ontology knows about
    // its ID
View Full Code Here

    try {
      OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
      Collection<String> inputFiles = FileUtils.getFileURIs(getInputFiles());

      LimitedMapIRIMapper iriMapper = new LimitedMapIRIMapper();
      OWLOntology  baseOntology = manager.createOntology();
      manager.clearIRIMappers();

      if(options.getOption("ignore-imports").getValueAsBoolean())
      {
        manager.addIRIMapper(iriMapper);
View Full Code Here

 

  private OWLOntologyManager mergeOntologiesInNewManager(OWLOntologyManager manager) throws OWLOntologyCreationException
  {
    OWLOntologyManager newManager = OWLManager.createOWLOntologyManager();   
    OWLOntology merged = newManager.createOntology();
    List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
   
    for(OWLOntology ontology: manager.getOntologies())
    {
      for (OWLAxiom ax : ontology.getAxioms()) {
View Full Code Here

    // Extract the module axioms for the specified signature
    Set<OWLAxiom> moduleAxioms =
      ModularityUtils.extractModule( ontology, signature, moduleType );
    // Create an ontology for the module axioms 
    OWLOntology moduleOnt = manager.createOntology( moduleAxioms );
   
    // Get some figures about the extracted module and print them
    System.out.println( "The module contains "
      + moduleOnt.getLogicalAxiomCount() + " axioms, "
      + moduleOnt.getClassesInSignature().size() + " classes, and "
View Full Code Here

  @Test
  public void testIsClass5() throws OWLOntologyCreationException {
    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    OWLDataFactory factory = manager.getOWLDataFactory();
    OWLOntology ontology = manager.createOntology(IRI
        .create("http://example.org"));
   
    OWLDatatype dataRange = factory.getOWLDatatype(OWL2Datatype.XSD_INTEGER.getIRI());
    OWLFacetRestriction dataRangeFacetRestriction = factory
        .getOWLFacetRestriction(
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.