Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLNamedIndividual


    }

    @Test
    public void testOWLIndividualDeclarationAxiom()
            throws OWLOntologyCreationException {
        OWLNamedIndividual ind = createIndividual();
        OWLAxiom ax = Declaration(ind);
        OWLOntology ont = m.createOntology(OWLOntologyDocumentSourceBase
                .getNextDocumentIRI("urn:testontology"));
        m.applyChange(new AddAxiom(ont, ax));
        assertTrue(ont.getIndividualsInSignature().contains(ind));
View Full Code Here


                mock(OWLDataProperty.class));
        when(entityChecker.getOWLAnnotationProperty("aP")).thenReturn(
                mock(OWLAnnotationProperty.class));
        when(entityChecker.getOWLAnnotationProperty("rdfs:comment"))
                .thenReturn(dataFactory.getRDFSComment());
        OWLNamedIndividual ind = mock(OWLNamedIndividual.class);
        when(entityChecker.getOWLIndividual("ind")).thenReturn(ind);
        when(ind.asOWLNamedIndividual()).thenReturn(ind);
        parser = new ParserWrapper();
    }
View Full Code Here

    @Test
    public void shouldRoundTripInvalidDifferentIndividuals()
            throws OWLOntologyCreationException, OWLOntologyStorageException {
        // given
        OWLNamedIndividual e1 = NamedIndividual(IRI("urn:test1"));
        OWLNamedIndividual e2 = NamedIndividual(IRI("urn:test2"));
        OWLNamedIndividual e3 = NamedIndividual(IRI("urn:test3"));
        // given
        OWLAxiom wrongAxiom = DifferentIndividuals(e1);
        OWLAxiom validAxiom = DifferentIndividuals(e2, e3);
        // when
        addAxioms(wrongAxiom, validAxiom);
View Full Code Here

    @Test
    public void shouldRoundTripInvalidSameIndividuals()
            throws OWLOntologyCreationException, OWLOntologyStorageException {
        // given
        OWLNamedIndividual e1 = NamedIndividual(IRI("urn:test1"));
        OWLNamedIndividual e2 = NamedIndividual(IRI("urn:test2"));
        OWLNamedIndividual e3 = NamedIndividual(IRI("urn:test3"));
        // given
        OWLAxiom wrongAxiom = SameIndividual(e1);
        OWLAxiom validAxiom = SameIndividual(e2, e3);
        // when
        addAxioms(wrongAxiom, validAxiom);
View Full Code Here

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLNamedIndividual ind = NamedIndividual(iri("i"));
        OWLDataProperty prop = DataProperty(iri("prop"));
        OWLLiteral literal = Literal("Test \"literal\"");
        axioms.add(DataPropertyAssertion(prop, ind, literal));
        OWLLiteral literal2 = Literal("Test 'literal'");
        axioms.add(DataPropertyAssertion(prop, ind, literal2));
View Full Code Here

        // document without ontology declaration should be removed and
        // reimported
        File ontologyDirectory = new File(RESOURCES, "importNoOntology");
        String ns = "http://www.w3.org/2013/12/FDA-TA/tests/RenalTransplantation/";
        IRI bobsOntologyName = IRI.create(ns + "subject-bob");
        OWLNamedIndividual bobsIndividual = df.getOWLNamedIndividual(IRI
                .create(ns + "subject-bob#subjectOnImmunosuppressantA2"));
        m.getIRIMappers()
                .add(new SimpleIRIMapper(IRI.create(ns + "subject-amy"), IRI
                        .create(new File(ontologyDirectory, "subject-amy.ttl"))));
        m.getIRIMappers().add(
View Full Code Here

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

    final public OWLNamedIndividual NamedIndividual() throws ParseException {
        OWLNamedIndividual ind;
        jj_consume_token(NAMEDINDIVIDUAL);
        jj_consume_token(OPENPAR);
        ind = IndividualIRI();
        jj_consume_token(CLOSEPAR);
        {
View Full Code Here

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

    final public SWRLIArgument IArg() throws ParseException {
        OWLNamedIndividual ind;
        SWRLIArgument arg;
        IRI iri;
        switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) {
            case VARIABLE: {
                jj_consume_token(VARIABLE);
View Full Code Here

    @Test
    public void testClassAssertionAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLClass clsA = Class(iri("clsA"));
        OWLNamedIndividual indA = NamedIndividual(iri("indA"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLClassAssertionAxiom ax = ClassAssertion(clsA, indA);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getClassAssertionAxioms(indA).contains(ax));
View Full Code Here

    @Test
    public void testObjectPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty prop = ObjectProperty(iri("prop"));
        OWLNamedIndividual indA = NamedIndividual(iri("indA"));
        OWLNamedIndividual indB = NamedIndividual(iri("indB"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLObjectPropertyAssertionAxiom ax = ObjectPropertyAssertion(prop,
                indA, indB);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
View Full Code Here

TOP

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

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.