Examples of OWLDeclarationAxiom


Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

        OWLAnnotation oav = factory.getOWLAnnotation(oa, factory.getOWLStringLiteral(clazzlabel, "en"));
        OWLDatatype dt = factory.getOWLDatatype(IRI.create(DATATYPE));
        OWLNamedIndividual sub = factory.getOWLNamedIndividual(IRI.create(SUBJECT));
        OWLNamedIndividual obj = factory.getOWLNamedIndividual(IRI.create(OBJECT));
        OWLLiteral literal1 = factory.getOWLTypedLiteral(VALUE, dt);
        OWLDeclarationAxiom daxiomcls = factory.getOWLDeclarationAxiom(cls); // Classe
        OWLDeclarationAxiom daxiomop = factory.getOWLDeclarationAxiom(op); // obj prop
        OWLDeclarationAxiom daxiomdp = factory.getOWLDeclarationAxiom(dp); // data prop
        OWLDeclarationAxiom daxiomsub = factory.getOWLDeclarationAxiom(sub); // subject
        OWLDeclarationAxiom daxiomobj = factory.getOWLDeclarationAxiom(obj); // object

        OWLClassAssertionAxiom axiomsub = factory.getOWLClassAssertionAxiom(cls, sub); // Istanza
        OWLClassAssertionAxiom axiomobj = factory.getOWLClassAssertionAxiom(cls, obj); // Istanza
        OWLObjectPropertyAssertionAxiom axiomop = factory.getOWLObjectPropertyAssertionAxiom(op, sub, obj); // Obj
                                                                                                            // prop
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

        OWLAnnotation oav = factory.getOWLAnnotation(oa, factory.getOWLStringLiteral(clazzlabel, "en"));
        OWLDatatype dt = factory.getOWLDatatype(IRI.create(DATATYPE));
        OWLNamedIndividual sub = factory.getOWLNamedIndividual(IRI.create(SUBJECT));
        OWLNamedIndividual obj = factory.getOWLNamedIndividual(IRI.create(OBJECT));
        OWLLiteral literal1 = factory.getOWLTypedLiteral(VALUE, dt);
        OWLDeclarationAxiom daxiomcls = factory.getOWLDeclarationAxiom(cls); // Classe
        OWLDeclarationAxiom daxiomop = factory.getOWLDeclarationAxiom(op); // obj prop
        OWLDeclarationAxiom daxiomdp = factory.getOWLDeclarationAxiom(dp); // data prop
        OWLDeclarationAxiom daxiomsub = factory.getOWLDeclarationAxiom(sub); // subject
        OWLDeclarationAxiom daxiomobj = factory.getOWLDeclarationAxiom(obj); // object

        OWLClassAssertionAxiom axiomsub = factory.getOWLClassAssertionAxiom(cls, sub); // Istanza
        OWLClassAssertionAxiom axiomobj = factory.getOWLClassAssertionAxiom(cls, obj); // Istanza
        OWLObjectPropertyAssertionAxiom axiomop = factory.getOWLObjectPropertyAssertionAxiom(op, sub, obj); // Obj
                                                                                                            // prop
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

            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);

            OntModel jenamodel = ModelOwlToJenaConvert(ontology, format);

            available = true;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

            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);

            OntModel jenamodel = ModelOwlToJenaConvert(ontology, format);

            available = true;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

            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);

            OntModel jenamodel = ModelOwlToJenaConvert(ontology, format);

            available = true;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

            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);

            OntModel jenamodel = ModelOwlToJenaConvert(ontology, format);

            available = true;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

    private Component prepareRenderer(Object value, boolean isSelected, boolean hasFocus) {
        renderingComponent.setOpaque(isSelected || opaque);

        if (value instanceof OWLEntity) {
            OWLEntity entity = (OWLEntity) value;
            OWLDeclarationAxiom declAx = getOWLModelManager().getOWLDataFactory().getOWLDeclarationAxiom(entity);
            if (getOWLModelManager().getActiveOntology().containsAxiom(declAx)) {
                ontology = getOWLModelManager().getActiveOntology();
            }
            entity.accept(activeEntityVisitor);
        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

                        OWLAxiom a = j.next();
                        referenced = a.isLogicalAxiom() || (a instanceof OWLDeclarationAxiom);
                    }
                }
                if (!referenced) {
                    OWLDeclarationAxiom declaration = getOntologyManager().getOWLDataFactory().getOWLDeclarationAxiom(e);
                    temporaryDeclarations.add(declaration);
                }
            }
            for (OWLDeclarationAxiom decl : temporaryDeclarations) {
                OntologyUtils.addAxiom(decl, getReasoner().getRootOntology().getImportsClosure(), getOntologyManager());
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

                    OWLLiteral con = getDataFactory().getOWLLiteral(value, "");
                    OWLAnnotationProperty property = getDataFactory().getOWLAnnotationProperty(getIRI(tag));
                    OWLAnnotation anno = getDataFactory().getOWLAnnotation(property, con);
                    OWLAnnotationAssertionAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(subject, anno);
                    owlOntologyManager.addAxiom(ontology, ax);
                    OWLDeclarationAxiom annotationPropertyDeclaration = getDataFactory().getOWLDeclarationAxiom(property);
                    owlOntologyManager.addAxiom(ontology, annotationPropertyDeclaration);
                }
            }

        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

  public void shouldAddClass(OWLOntologyManager manager, String name){
    OWLOntology ontology = manager.getOntology(currentOntologyID);
    OWLDataFactory factory = manager.getOWLDataFactory();
    OWLClass cls = factory.getOWLClass(IRI.create(getCurrentOntologyID().getOntologyIRI() + "#" + name));
   
    OWLDeclarationAxiom declarationAxiom = factory.getOWLDeclarationAxiom(cls);
        manager.addAxiom(ontology, declarationAxiom);
   
    //manager.applyChange(new 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.