Package org.semanticweb.owlapi.model

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


        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        OWLDataFactory factory = OWLManager.getOWLDataFactory();

        OWLOntology ontology;
        try {
            ontology = manager.createOntology();

            String recipeClassURI = Symbols.Recipe.toString().replace("<", "").replace(">", "");
            IRI recipeClassIRI = IRI.create(recipeClassURI);
            OWLClass owlRecipeClass = factory.getOWLClass(recipeClassIRI);
           
View Full Code Here


        // Create a new ontology
        OWLOntology root;
        OWLOntologyManager ontologyManager = OWLManager.createOWLOntologyManager();
        IRI iri = IRI.create(prefix + _id);
        try {
            root = ontologyManager.createOntology(iri);
        } catch (OWLOntologyAlreadyExistsException e) {
            // It should be impossible, but just in case.
            ontologyManager.removeOntology(ontologyManager.getOntology(iri));
            try {
                root = ontologyManager.createOntology(iri);
View Full Code Here

            root = ontologyManager.createOntology(iri);
        } catch (OWLOntologyAlreadyExistsException e) {
            // It should be impossible, but just in case.
            ontologyManager.removeOntology(ontologyManager.getOntology(iri));
            try {
                root = ontologyManager.createOntology(iri);
            } catch (OWLOntologyAlreadyExistsException e1) {
                root = ontologyManager.getOntology(iri);
            } catch (OWLOntologyCreationException e1) {
                log.error("Failed to assemble root ontology for scope " + iri, e);
                root = null;
View Full Code Here

     * Creates a new input source with an unnamed, empty ontology.
     */
    public BlankOntologySource() {
        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        try {
            bindRootOntology(manager.createOntology());
        } catch (OWLOntologyCreationException e) {
            bindRootOntology(null);
        }
        bindPhysicalOrigin(null);
    }
View Full Code Here

        OWLDataFactory df = ontMgr.getOWLDataFactory();
        OWLClass cSession = df.getOWLClass(IRI.create("http://stanbol.apache.org/ontologies/meta/Session"));

        OWLOntology o;
        try {
            o = ontMgr.createOntology(IRI.create(uriInfo.getRequestUri()));
            List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
            for (String id : sessionManager.getRegisteredSessionIDs()) {
                IRI sessionid = IRI.create(sessionManager.getDefaultNamespace() + sessionManager.getID() + "/" + id);
                OWLNamedIndividual ind = df.getOWLNamedIndividual(sessionid);
                changes.add(new AddAxiom(o, df.getOWLClassAssertionAxiom(cSession, ind)));
View Full Code Here

            OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
            OWLDataFactory factory = OWLManager.getOWLDataFactory();
   
            OWLOntology ontology;
            try {
                ontology = manager.createOntology();
   
                RuleList rules = recipe.getRuleList();
   
                UriRef recipeID = recipe.getRecipeID();
   
View Full Code Here

        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        OWLDataFactory factory = OWLManager.getOWLDataFactory();

        OWLOntology ontology;
        try {
            ontology = manager.createOntology();

           
            String recipeClassURI = Symbols.Recipe.toString().replace("<", "").replace(">", "");
            IRI recipeClassIRI = IRI.create(recipeClassURI);
            OWLClass owlRecipeClass = factory.getOWLClass(recipeClassIRI);
View Full Code Here

        available = false;

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

            Iterator<OWLAxiom> axiom = axioms.iterator();

            while (axiom.hasNext())
View Full Code Here

        available = false;

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

            // If the entity is a class
            if (entity.isOWLClass()) {
                OWLClass owldata = entity.asOWLClass();
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

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.