Examples of OWLObject


Examples of org.semanticweb.owl.model.OWLObject

        axiom = factory.getOWLClassAssertionAxiom( ind, factory.getOWLThing() );
      }
      if( axiom != null )
        axiom.accept( atermConverter );

      OWLObject converted = owlapiConverter.convert( aterm );

      assertEquals( object, converted );
    } catch( Exception e ) {
      e.printStackTrace();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObject

     * @param ax
     *        the ax
     */
    @SuppressWarnings("null")
    protected void tr(@Nonnull OWLClassAssertionAxiom ax) {
        OWLObject cls = ax.getClassExpression();
        if (!(cls instanceof OWLClass)) {
            return;
        }
        String clsIRI = ((OWLClass) cls).getIRI().toString();
        if (IRI_CLASS_SYNONYMTYPEDEF.equals(clsIRI)) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObject

                for (OWLAxiom ax : ontology.filterAxioms(Filters.annotations,
                        entity.getIRI(), INCLUDED)) {
                    ax.accept(checker);
                }
            }
            OWLObject match = checker.getMatch();
            if (match != null) {
                return getRendering(match);
            }
        }
        return alternateShortFormProvider.getShortForm(entity);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObject

            return alternateShortFormProvider.getShortForm(entity);
        }
        OWLIndividual individual = (OWLIndividual) entity;
        // The candidate value to be rendered, we select this based on
        // ranking of annotation URI and ranking of lang (if present)
        OWLObject candidateValue = null;
        int lastURIMatchIndex = Integer.MAX_VALUE;
        int lastLangMatchIndex = Integer.MAX_VALUE;
        for (OWLOntology ontology : ontologySetProvider.getOntologies()) {
            for (OWLObjectPropertyAssertionAxiom ax : ontology
                    .getObjectPropertyAssertionAxioms(individual)) {
                int index = properties.indexOf(ax.getProperty());
                if (index == -1) {
                    continue;
                }
                if (index < lastURIMatchIndex) {
                    candidateValue = ax.getObject();
                }
            }
            for (OWLDataPropertyAssertionAxiom ax : ontology
                    .getDataPropertyAssertionAxioms(individual)) {
                int index = properties.indexOf(ax.getProperty());
                if (index == -1) {
                    continue;
                }
                if (index == lastURIMatchIndex) {
                    // Different property value but same prop, as previous
                    // candidate - look at lang tag for that URI
                    // and see if we take priority over the previous one
                    OWLObject obj = ax.getObject();
                    if (obj instanceof OWLLiteral) {
                        List<String> langList = preferredLanguageMap.get(ax
                                .getProperty());
                        if (langList != null) {
                            // There is no need to check if lang is null. It may
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObject

    public void shouldBuildAnnotation() {
        // given
        OWLAnnotation expected = df.getOWLAnnotation(ap, lit);
        BuilderAnnotation builder = new BuilderAnnotation(expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObject

        OWLAnnotationAssertionAxiom expected = df
                .getOWLAnnotationAssertionAxiom(ap, iri, lit, annotations);
        BuilderAnnotationAssertion builder = new BuilderAnnotationAssertion(
                expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObject

        // given
        OWLAnnotationProperty expected = df.getOWLAnnotationProperty(iri);
        BuilderAnnotationProperty builder = new BuilderAnnotationProperty(
                expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObject

        OWLAnnotationPropertyDomainAxiom expected = df
                .getOWLAnnotationPropertyDomainAxiom(ap, iri, annotations);
        BuilderAnnotationPropertyDomain builder = new BuilderAnnotationPropertyDomain(
                expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObject

        OWLAnnotationPropertyRangeAxiom expected = df
                .getOWLAnnotationPropertyRangeAxiom(ap, iri, annotations);
        BuilderAnnotationPropertyRange builder = new BuilderAnnotationPropertyRange(
                expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObject

        // given
        OWLAnonymousIndividual expected = df.getOWLAnonymousIndividual("id");
        BuilderAnonymousIndividual builder = new BuilderAnonymousIndividual(
                expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
    }
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.