Examples of OWLAnnotationAssertionAxiom


Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

//        if (!isEmptyClassFrameSection()) {
            Set<OWLAnnotation> annos = parseAnnotationList();
            for (OWLOntology ont : onts) {
                for (OWLAnnotation anno : annos) {
                    if (configuration.isLoadAnnotationAxioms()) {
                        OWLAnnotationAssertionAxiom ax = dataFactory.getOWLAnnotationAssertionAxiom(subject, anno);
                        pairs.add(new OntologyAxiomPair(ont, ax));
                    }
                }
            }
//        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

                if (configuration.isLoadAnnotationAxioms()) {
                    IRI subject = getIRI(currentId);
                    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.OWLAnnotationAssertionAxiom

                    if (!ax.getProperty().isAnonymous()) {
                        changes.add(new RemoveAxiom(ont, ax));
                        OWLDataFactory df = getDataFactory();
                        OWLAnnotation anno = df.getOWLAnnotation(df.getOWLAnnotationProperty(ax.getProperty().asOWLDataProperty().getIRI()),
                                ax.getObject());
                        OWLAnnotationAssertionAxiom annoAx = df.getOWLAnnotationAssertionAxiom(ind.getIRI(), anno);
                        changes.add(new AddAxiom(ont, annoAx));
                        convertedDataProperties.add((OWLDataProperty) ax.getProperty());
                    }
                }
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

        super(handler);
    }

    @Override
  protected OWLAxiom createAxiom() throws OWLXMLParserException {
        OWLAnnotationAssertionAxiom toReturn = getOWLDataFactory().getOWLAnnotationAssertionAxiom(annotation.getProperty(), entity.getIRI(), annotation.getValue());
        annotation = null;
        entity = null;
    return toReturn;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

            annotations.addAll(getXRefAnnotations(matcher, df));

            OWLEntity subject = getConsumer().getCurrentEntity();
            String synonym = matcher.group(VALUE_GROUP);
            OWLLiteral synonymLiteral = df.getOWLLiteral(synonym, "");
            OWLAnnotationAssertionAxiom annoAssertion = df.getOWLAnnotationAssertionAxiom(property, subject.getIRI(), synonymLiteral, annotations);
            applyChange(new AddAxiom(getOntology(), annoAssertion));
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

        return true;
    }

    @Override
    protected int compareObjectOfSameType(OWLObject object) {
        OWLAnnotationAssertionAxiom other = (OWLAnnotationAssertionAxiom) object;
        int diff = 0;
        diff = subject.compareTo(other.getSubject());
        if (diff != 0) {
            return diff;
        }
        diff = property.compareTo(other.getProperty());
        if (diff != 0) {
            return diff;
        }
        return value.compareTo(other.getValue());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

            return true;
        }
        if (!(obj instanceof OWLAnnotationAssertionAxiom)) {
            return false;
        }
        OWLAnnotationAssertionAxiom other = (OWLAnnotationAssertionAxiom) obj;
        return subject.equals(other.getSubject()) && property.equals(other.getProperty()) && value.equals(other.getValue()) && getAnnotations().equals(other.getAnnotations());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

        }
        if(getConsumer().isOntology(subject)) {
          getConsumer().addOntologyAnnotation(getDataFactory().getOWLAnnotation(prop, object, getPendingAnnotations()));
        }
        else {
            OWLAnnotationAssertionAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(prop, annotationSubject, object, getPendingAnnotations());
            addAxiom(ax);
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

                OWLClassAssertionAxiom axiomsub = factory.getOWLClassAssertionAxiom(cls,sub); //Istanza
                OWLClassAssertionAxiom axiomobj = factory.getOWLClassAssertionAxiom(cls,obj); //Istanza
                OWLObjectPropertyAssertionAxiom axiomop = factory.getOWLObjectPropertyAssertionAxiom(op, sub, obj); //Obj prop tra individui
                OWLDataPropertyAssertionAxiom axiomvalue = factory.getOWLDataPropertyAssertionAxiom(dp, obj,literal1); //Dataprop all'istanza;
                OWLAnnotationAssertionAxiom axioman = factory.getOWLAnnotationAssertionAxiom(cls.getIRI(), oav); //Annotazione

                mgr.addAxiom(ont,daxiomcls);
                mgr.addAxiom(ont,daxiomop);
                mgr.addAxiom(ont,daxiomdp);
                mgr.addAxiom(ont,daxiomsub);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom

                OWLClassAssertionAxiom axiomsub = factory.getOWLClassAssertionAxiom(cls,sub); //Istanza
                OWLClassAssertionAxiom axiomobj = factory.getOWLClassAssertionAxiom(cls,obj); //Istanza
                OWLObjectPropertyAssertionAxiom axiomop = factory.getOWLObjectPropertyAssertionAxiom(op, sub, obj); //Obj prop tra individui
                OWLDataPropertyAssertionAxiom axiomvalue = factory.getOWLDataPropertyAssertionAxiom(dp, sub,literal1); //Dataprop all'istanza;
                OWLAnnotationAssertionAxiom axioman = factory.getOWLAnnotationAssertionAxiom(cls.getIRI(), oav); //Annotazione

                mgr.addAxiom(ont,daxiomcls);
                mgr.addAxiom(ont,daxiomop);
                mgr.addAxiom(ont,daxiomdp);
                mgr.addAxiom(ont,daxiomsub);
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.