Examples of OWLEntity


Examples of org.semanticweb.owl.model.OWLEntity

          }

        } else
        {
          boolean found = false;
          OWLEntity c = null;
          while (!found && i<s)
          {
            if (auxiliarySelection == null)
              break;
            if (auxiliarySelection.isEmpty())
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

     *
     * @param axiom
     *        the axiom
     */
    protected void tr(@Nonnull OWLDeclarationAxiom axiom) {
        OWLEntity entity = axiom.getEntity();
        if (entity.isBottomEntity() || entity.isTopEntity()) {
            return;
        }
        Set<OWLAnnotationAssertionAxiom> set = owlOntology
                .getAnnotationAssertionAxioms(entity.getIRI());
        if (set.isEmpty()) {
            return;
        }
        Frame f = null;
        if (entity instanceof OWLClass) {
            f = getTermFrame(entity.asOWLClass());
        } else if (entity instanceof OWLObjectProperty) {
            f = getTypedefFrame(entity.asOWLObjectProperty());
        } else if (entity instanceof OWLAnnotationProperty) {
            for (OWLAxiom a : set) {
                OWLAnnotationAssertionAxiom ax = (OWLAnnotationAssertionAxiom) a;
                OWLAnnotationProperty prop = ax.getProperty();
                String tag = owlObjectToTag(prop);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

    @Nullable
    public static String getIdentifierFromObject(OWLObject obj,
            @Nonnull OWLOntology ont) throws UntranslatableAxiomException {
        if (obj instanceof OWLObjectProperty
                || obj instanceof OWLAnnotationProperty) {
            OWLEntity entity = (OWLEntity) obj;
            Set<OWLAnnotationAssertionAxiom> axioms = ont
                    .getAnnotationAssertionAxioms(entity.getIRI());
            for (OWLAnnotationAssertionAxiom ax : axioms) {
                String propId = getIdentifierFromObject(ax.getProperty()
                        .getIRI(), ont);
                // see BFOROXrefTest
                // 5.9.3. Special Rules for Relations
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

        }
        throw new Error("Missing return statement in function");
    }

    final public OWLAxiom Declaration() throws ParseException {
        OWLEntity entity = null;
        IRI iri = null;
        OWLLiteral con = null;
        Set<OWLAnnotation> axiomAnnos;
        jj_consume_token(DECLARATION);
        jj_consume_token(OPENPAR);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

        }
        throw new Error("Missing return statement in function");
    }

    final public OWLEntity Entity() throws ParseException {
        OWLEntity entity;
        switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) {
            case CLASS: {
                entity = Class();
                break;
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

    @Override
    public void visit(OWLDeclarationAxiom axiom) {
        sb.append("Declaration(");
        writeAnnotations(axiom);
        OWLEntity entity = axiom.getEntity();
        if (entity.isOWLClass()) {
            sb.append("Class(");
        } else if (entity.isOWLObjectProperty()) {
            sb.append("ObjectProperty(");
        } else if (entity.isOWLDataProperty()) {
            sb.append("DataProperty(");
        } else if (entity.isOWLNamedIndividual()) {
            sb.append("NamedIndividual(");
        } else if (entity.isOWLDatatype()) {
            sb.append("Datatype(");
        } else if (entity.isOWLAnnotationProperty()) {
            sb.append("AnnotationProperty(");
        }
        axiom.getEntity().accept(this);
        sb.append("))");
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

public class DatatypeDeclarationWithAnnotationsTestCase extends
        AbstractAnnotatedAxiomRoundTrippingTestCase {

    @Override
    protected OWLAxiom getMainAxiom(Set<OWLAnnotation> annos) {
        OWLEntity ent = Datatype(iri("DT"));
        return Declaration(ent, annos);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

public class NamedIndividualDeclarationWithAnnotationsTestCase extends
        AbstractAnnotatedAxiomRoundTrippingTestCase {

    @Override
    protected OWLAxiom getMainAxiom(Set<OWLAnnotation> annos) {
        OWLEntity ent = NamedIndividual(iri("I"));
        return Declaration(ent, annos);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

            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);
            assert synonym != null;
            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.OWLEntity

    }

    @Test
    public void testEqualsPositiveClass() {
        IRI iri = IRI();
        OWLEntity entityA = C(iri);
        OWLEntity entityB = C(iri);
        assertEquals(entityA, entityB);
    }
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.