Examples of OWLEntity


Examples of org.semanticweb.owlapi.model.OWLEntity

        assertEquals(entityA, entityB);
    }

    @Test
    public void testEqualsNegativeClass() {
        OWLEntity entityA = C(IRI());
        OWLEntity entityB = C(IRI());
        assertFalse(entityA.equals(entityB));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

        IRI p11IRI = prefixOWLOntologyFormat.getIRI(propertyName);
        Set<OWLEntity> hadParticipant = cidocOntology
                .getEntitiesInSignature(p11IRI);
        assertEquals("should have found " + propertyName, 1,
                hadParticipant.size());
        OWLEntity entity = hadParticipant.iterator().next();
        assertTrue("EntityType",
                OWLProperty.class.isAssignableFrom(entity.getClass()));
        if (entity instanceof OWLObjectProperty) {
            testProperty((OWLObjectProperty) entity, expectedDomain,
                    expectedRange, expectedSuperProperty);
        }
        if (entity instanceof OWLDataProperty) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

public class ClassDeclarationWithAnnotationsTestCase extends
        AbstractAnnotatedAxiomRoundTrippingTestCase {

    @Override
    protected OWLAxiom getMainAxiom(Set<OWLAnnotation> annos) {
        OWLEntity ent = Class(iri("A"));
        return df.getOWLDeclarationAxiom(ent, annos);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

public class AnnotationPropertyDeclarationWithAnnotationsTestCase extends
        AbstractAnnotatedAxiomRoundTrippingTestCase {

    @Override
    protected OWLAxiom getMainAxiom(Set<OWLAnnotation> annos) {
        OWLEntity ent = AnnotationProperty(iri("propA"));
        return df.getOWLDeclarationAxiom(ent, annos);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

public class ObjectPropertyDeclarationWithAnnotationsTestCase extends
        AbstractAnnotatedAxiomRoundTrippingTestCase {

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

Examples of org.semanticweb.owlapi.model.OWLEntity

            @Nonnull Set<OWLAxiom> axioms) {
        currentExplanation = new HashSet<>(axioms);
        buildIndices();
        ExplanationTree root = new EntailedAxiomTree(entailment);
        insertChildren(seedExtractor.getSource(entailment), root);
        OWLEntity currentTarget = seedExtractor.getTarget(entailment);
        Set<OWLAxiom> axs = root.getUserObjectClosure();
        List<OWLAxiom> rootAxioms = new ArrayList<>();
        for (OWLAxiom ax : axioms) {
            if (!axs.contains(ax)) {
                rootAxioms.add(ax);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

        Set<OWLAnnotation> annotations = new HashSet<>();
        for (int i = 0; i < 2; i++) {
            OWLLiteral lit = Literal("Annotation " + (i + 1));
            annotations.add(df.getOWLAnnotation(RDFSLabel(), lit));
        }
        OWLEntity entity = NamedIndividual(IRI("http://www.another.com/ont#peter"));
        addAxiom(ont, Declaration(entity));
        OWLAnnotationAssertionAxiom ax = df.getOWLAnnotationAssertionAxiom(
                prop, entity.getIRI(), Literal("X", "en"), annotations);
        addAxiom(ont, ax);
        return ont;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

public class DataPropertyDeclarationWithAnnotationsTestCase extends
        AbstractAnnotatedAxiomRoundTrippingTestCase {

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

Examples of org.semanticweb.owlapi.model.OWLEntity

            annotationValue = getUnquotedString(value);
        }
        IRI propertyIRI = getTagIRI(getTagName());
        OWLAnnotationProperty property = df
                .getOWLAnnotationProperty(propertyIRI);
        OWLEntity currentEntity = getConsumer().getCurrentEntity();
        OWLLiteral literal = df.getOWLLiteral(annotationValue);
        OWLAnnotationAssertionAxiom ax = df.getOWLAnnotationAssertionAxiom(
                property, currentEntity.getIRI(), literal, xrefAnnotations);
        applyChange(new AddAxiom(getOntology(), ax));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

    @Override
    public void handle(String currentId, String value, String qualifierBlock,
            String comment) {
        getConsumer().setCurrentId(value);
        final OWLEntity entity = getConsumer().getCurrentEntity();
        if (entity != null) {
            applyChange(new AddAxiom(getOntology(), getDataFactory()
                    .getOWLDeclarationAxiom(entity)));
        }
    }
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.