Examples of OWLAxiom


Examples of org.semanticweb.owlapi.model.OWLAxiom

            if (COMMA.matches(sep)) {
                consumeToken();
            }
        }
        consumeToken(CLOSEBRACKET.keyword());
        OWLAxiom ax = dataFactory.getOWLDisjointClassesAxiom(siblings);
        for (OWLOntology ont : onts) {
            assert ont != null;
            axioms.add(new OntologyAxiomPair(ont, ax));
        }
        return axioms;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAxiom

        }
        Set<OWLOntology> ontologies = getOntologies();
        Set<OWLAnnotation> annotations = parseAnnotations();
        Set<OWLPropertyExpression> props = parsePropertyList();
        Set<OntologyAxiomPair> pairs = new HashSet<>();
        OWLAxiom propertiesAxiom;
        if (props.iterator().next().isObjectPropertyExpression()) {
            Set<OWLObjectPropertyExpression> ope = new HashSet<>();
            for (OWLPropertyExpression pe : props) {
                ope.add((OWLObjectPropertyExpression) pe);
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAxiom

        Set<OntologyAxiomPair> result = new HashSet<>();
        String sep = COMMA.keyword();
        while (COMMA.matches(sep)) {
            Set<OWLAnnotation> annotations = parseAnnotations();
            O item = itemParser.parseItem(s);
            OWLAxiom axiom = itemParser.createAxiom(s, item, annotations);
            for (OWLOntology ontology : ontologies) {
                result.add(new OntologyAxiomPair(ontology, axiom));
            }
            sep = peekToken();
            if (COMMA.matches(sep)) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAxiom

    }

    final public void Ontology() throws ParseException, OWLParserException,
            UnloadableImportException {
        OWLAnnotation anno;
        OWLAxiom ax;
        OWLImportsDeclaration decl;
        int count = 0;
        IRI versionIRI = null;
        jj_consume_token(ONTOLOGY);
        jj_consume_token(OPENPAR);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAxiom

    //
    // Axioms
    //
    // /////////////////////////////////////////////////////////////////////////////////////////////////////////
    final public OWLAxiom Axiom() throws ParseException {
        OWLAxiom ax = null;
        switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) {
            case SUBCLASSOF:
            case EQUIVALENTCLASSES:
            case DISJOINTCLASSES:
            case DISJOINTUNION: {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAxiom

    //
    // Annotation Stuff
    //
    // //////////////////////////////////////////////////////////////////////////////////////////////////////////////
    final public OWLAxiom AnnotationAxiom() throws ParseException {
        OWLAxiom axiom;
        switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) {
            case ANNOTATIONASSERTION: {
                axiom = AnnotationAssertion();
                break;
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAxiom

    }

    /** @return current axiom from walker */
    @Nonnull
    public OWLAxiom getCurrentAxiom() {
        OWLAxiom axiom = walker.getAxiom();
        if (axiom == null) {
            throw new OWLRuntimeException(
                    "No current axiom; is the walker being used outside of an ontology visit?");
        }
        return axiom;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAxiom

            List<OWLOntologyChange> changes, Set<OWLAxiom> axioms,
            @Nonnull OWLOntology ont, OWLObjectDuplicator duplicator) {
        for (OWLAxiom ax : axioms) {
            assert ax != null;
            changes.add(new RemoveAxiom(ont, ax));
            OWLAxiom dupAx = duplicator.duplicateObject(ax);
            changes.add(new AddAxiom(ont, dupAx));
        }
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAxiom

    @Test
    public void shouldParseOntologyThatworked()
            throws OWLOntologyCreationException {
        // given
        String working = "@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .\n @prefix foaf:    <http://xmlns.com/foaf/0.1/> .\n foaf:fundedBy rdfs:isDefinedBy <http://xmlns.com/foaf/0.1/> .";
        OWLAxiom expected = AnnotationAssertion(df.getRDFSIsDefinedBy(),
                IRI("http://xmlns.com/foaf/0.1/fundedBy"),
                IRI("http://xmlns.com/foaf/0.1/"));
        // when
        OWLOntology o = loadOntologyFromString(working);
        // then
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAxiom

        // given
        String literal = "Diadenosine 5',5'''-P1,P4-tetraphosphate phosphorylase";
        String working = "@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .\n "
                + "@prefix foaf:    <http://xmlns.com/foaf/0.1/> .\n foaf:fundedBy "
                + "rdfs:label \"\"\"" + literal + "\"\"\"@en .";
        OWLAxiom expected = AnnotationAssertion(df.getRDFSLabel(),
                IRI("http://xmlns.com/foaf/0.1/fundedBy"),
                Literal(literal, "en"));
        // when
        OWLOntology o = loadOntologyFromString(working);
        // then
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.