Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty


        OWLClass clsB = Class(iri("ClsB"));
        OWLClass clsC = Class(iri("ClsC"));
        OWLObjectPropertyExpression propA = ObjectProperty(iri("propA"));
        OWLDataPropertyExpression propB = DataProperty(iri("propA"));
        OWLIndividual indA = NamedIndividual(iri("indA"));
        OWLAnnotationProperty annoProp = AnnotationProperty(iri("annoProp"));
        Set<OWLAxiom> axioms1 = new HashSet<>();
        axioms1.add(SubClassOf(clsAIRI1, clsB));
        axioms1.add(EquivalentClasses(clsAIRI1, clsC));
        axioms1.add(DisjointClasses(clsAIRI1, clsC));
        axioms1.add(ObjectPropertyDomain(propA, clsAIRI1));
View Full Code Here


        OWLObjectProperty propA2 = ObjectProperty(iri("propA2"));
        OWLObjectPropertyExpression propB = ObjectProperty(iri("propB"))
                .getInverseProperty();
        OWLIndividual indA = NamedIndividual(iri("indA"));
        OWLIndividual indB = NamedIndividual(iri("indB"));
        OWLAnnotationProperty annoProp = AnnotationProperty(iri("annoProp"));
        Set<OWLAxiom> axioms1 = new HashSet<>();
        axioms1.add(SubObjectPropertyOf(propA, propB));
        axioms1.add(EquivalentObjectProperties(propA, propB));
        axioms1.add(DisjointObjectProperties(propA, propB));
        axioms1.add(ObjectPropertyDomain(propA, clsA));
View Full Code Here

        OWLClass clsA = Class(iri("ClsA"));
        OWLDataProperty propA = DataProperty(iri("propA"));
        OWLDataProperty propA2 = DataProperty(iri("propA2"));
        OWLDataPropertyExpression propB = DataProperty(iri("propB"));
        OWLIndividual indA = NamedIndividual(iri("indA"));
        OWLAnnotationProperty annoProp = AnnotationProperty(iri("annoProp"));
        Set<OWLAxiom> axioms1 = new HashSet<>();
        axioms1.add(SubDataPropertyOf(propA, propB));
        axioms1.add(EquivalentDataProperties(propA, propB));
        axioms1.add(DisjointDataProperties(propA, propB));
        axioms1.add(DataPropertyDomain(propA, clsA));
View Full Code Here

        OWLClass clsA = Class(iri("ClsA"));
        OWLDataProperty propA = DataProperty(iri("propA"));
        OWLObjectProperty propB = ObjectProperty(iri("propB"));
        OWLNamedIndividual indA = NamedIndividual(iri("indA"));
        OWLNamedIndividual indB = NamedIndividual(iri("indA"));
        OWLAnnotationProperty annoProp = AnnotationProperty(iri("annoProp"));
        Set<OWLAxiom> axioms1 = new HashSet<>();
        axioms1.add(ClassAssertion(clsA, indA));
        axioms1.add(DataPropertyAssertion(propA, indA, Literal(33)));
        axioms1.add(NegativeDataPropertyAssertion(propA, indA, Literal(44)));
        axioms1.add(AnnotationAssertion(annoProp, propA.getIRI(), Literal("X")));
View Full Code Here

    @Test
    public void testRenameAnnotationProperty() {
        OWLOntology ont = getOWLOntology("testont");
        OWLNamedIndividual indA = NamedIndividual(iri("indA"));
        OWLNamedIndividual indB = NamedIndividual(iri("indB"));
        OWLAnnotationProperty annoProp = AnnotationProperty(iri("annoProp"));
        OWLAnnotationProperty annoPropR = AnnotationProperty(iri("annoPropR"));
        OWLAnnotationProperty annoProp2 = AnnotationProperty(iri("annoProp2"));
        Set<OWLAxiom> axioms1 = new HashSet<>();
        axioms1.add(Declaration(annoProp));
        axioms1.add(AnnotationAssertion(annoProp, indA.getIRI(), indB.getIRI()));
        axioms1.add(SubAnnotationPropertyOf(annoProp, annoProp2));
        axioms1.add(AnnotationPropertyRange(annoProp, indA.getIRI()));
View Full Code Here

public class OntologyAnnotationsTestCase extends AbstractRoundTrippingTestCase {

    @Override
    protected OWLOntology createOntology() {
        OWLOntology ont = getOWLOntology("AnnotationOntology");
        OWLAnnotationProperty prop = AnnotationProperty(IRI("http://www.semanticweb.org/ontologies/test/annotationont#prop"));
        OWLLiteral value = Literal(33);
        OWLAnnotation annotation = Annotation(prop, value);
        ont.getOWLOntologyManager().applyChange(
                new AddOntologyAnnotation(ont, annotation));
        ont.getOWLOntologyManager().addAxiom(ont, Declaration(prop));
View Full Code Here

        }

        @Override
        public void handleTriple(@Nonnull IRI subject, IRI predicate,
                OWLLiteral object) {
            OWLAnnotationProperty prop = df.getOWLAnnotationProperty(predicate);
            OWLAnnotationSubject annotationSubject;
            if (isAnonymous(subject)) {
                annotationSubject = df.getOWLAnonymousIndividual(subject
                        .toString());
            } else {
View Full Code Here

            if (isAnonymous(object)) {
                value = df.getOWLAnonymousIndividual(object.toString());
            } else {
                value = object;
            }
            OWLAnnotationProperty prop = df.getOWLAnnotationProperty(predicate);
            OWLAnnotation anno = df.getOWLAnnotation(prop, value);
            OWLAnnotationSubject annoSubject;
            if (isAnonymous(subject)) {
                annoSubject = df.getOWLAnonymousIndividual(subject.toString());
            } else {
View Full Code Here

    public void handle(String currentId, String value, String qualifierBlock,
            String comment) {
        Matcher matcher = valuePattern.matcher(value);
        if (matcher.matches()) {
            OWLDataFactory df = getDataFactory();
            OWLAnnotationProperty property = getSynonymAnnotationProperty(matcher);
            Set<OWLAnnotation> annotations = new HashSet<>();
            annotations.addAll(getSynonymTypeAnnotations(matcher));
            annotations.addAll(getXRefAnnotations(matcher));
            OWLEntity subject = getConsumer().getCurrentEntity();
            String synonym = matcher.group(VALUE_GROUP);
View Full Code Here

            String id = matcher.group(ID_GROUP);
            IRI annotationPropertyIRI = getIRIFromOBOId(id);
            String name = matcher.group(NAME_GROUP);
            assert name != null;
            OWLDataFactory df = getDataFactory();
            OWLAnnotationProperty annotationProperty = df
                    .getOWLAnnotationProperty(annotationPropertyIRI);
            applyChange(new AddAxiom(getOntology(),
                    df.getOWLDeclarationAxiom(annotationProperty)));
            IRI subsetdefIRI = getTagIRI(OBOVocabulary.SUBSETDEF.getName());
            OWLAnnotationProperty subsetdefAnnotationProperty = df
                    .getOWLAnnotationProperty(subsetdefIRI);
            applyChange(new AddAxiom(getOntology(),
                    df.getOWLSubAnnotationPropertyOfAxiom(annotationProperty,
                            subsetdefAnnotationProperty)));
            OWLLiteral nameLiteral = df.getOWLLiteral(name);
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.OWLAnnotationProperty

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.