Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLLiteral


    @Test
    public void testCorrectAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass clsA = Class(iri("A"));
        OWLLiteral literal = Literal(3);
        OWLLiteral stringLiteral = Literal("A", "");
        OWLDataProperty propP = DataProperty(iri("p"));
        axioms.add(SubClassOf(clsA, DataHasValue(propP, literal)));
        axioms.add(Declaration(propP));
        axioms.add(SubClassOf(clsA, DataHasValue(propP, stringLiteral)));
        Set<OWLAxiom> axioms2 = getOnt().getAxioms();
View Full Code Here


        @Override
        public void handleTriple(IRI subject, IRI predicate, IRI object) {
            IRI annotatedSource = getObjectOfSourceTriple(subject);
            IRI annotatedProperty = getObjectOfPropertyTriple(subject);
            IRI annotatedTarget = getObjectOfTargetTriple(subject);
            OWLLiteral annotatedTargetLiteral = null;
            if (annotatedTarget == null) {
                annotatedTargetLiteral = getTargetLiteral(subject);
            }
            // check that other conditions are not invalid
            if (annotatedSource != null && annotatedProperty != null) {
View Full Code Here

            return consumer.getLastAddedAxiom();
        }

        @Nonnull
        private OWLLiteral getTargetLiteral(IRI subject) {
            OWLLiteral con = consumer.getLiteralObject(subject,
                    getTargetTriplePredicate(), true);
            if (con == null) {
                con = consumer.getLiteralObject(subject,
                        DeprecatedVocabulary.RDF_OBJECT, true);
            }
View Full Code Here

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

    final public OWLClassExpression DataHasValue() throws ParseException {
        OWLDataPropertyExpression prop = null;
        OWLLiteral literal = null;
        jj_consume_token(DATAHASVALUE);
        jj_consume_token(OPENPAR);
        prop = DataPropertyExpression();
        literal = Literal();
        jj_consume_token(CLOSEPAR);
View Full Code Here

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

    final public OWLDataRange DataOneOf() throws ParseException {
        Set<OWLLiteral> values = new HashSet<OWLLiteral>();
        OWLLiteral con = null;
        OWLDataRange rng = null;
        jj_consume_token(DATAONEOF);
        jj_consume_token(OPENPAR);
        label_6: while (true) {
            con = Literal();
View Full Code Here

    }

    final public OWLFacetRestriction DataRangeFacetRestriction()
            throws ParseException {
        IRI iri;
        OWLLiteral con;
        iri = IRI();
        con = Literal();
        OWLFacet v = OWLFacet.getFacetByShortName(iri.getFragment());
        {
            if ("" != null) {
View Full Code Here

    final public OWLIndividualAxiom DataPropertyAssertion()
            throws ParseException {
        OWLIndividual subj;
        OWLDataPropertyExpression prop;
        OWLLiteral obj;
        Set<OWLAnnotation> axiomAnnos;
        jj_consume_token(DATAPROPERTYASSERTION);
        jj_consume_token(OPENPAR);
        axiomAnnos = AxiomAnnotationSet();
        prop = DataPropertyExpression();
View Full Code Here

    final public OWLIndividualAxiom NegativeDataPropertyAssertion()
            throws ParseException {
        OWLIndividual subj;
        OWLDataPropertyExpression prop;
        OWLLiteral obj;
        Set<OWLAnnotation> axiomAnnos;
        jj_consume_token(NEGATIVEDATAPROPERTYASSERTION);
        jj_consume_token(OPENPAR);
        axiomAnnos = AxiomAnnotationSet();
        prop = DataPropertyExpression();
View Full Code Here

    }

    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);
        axiomAnnos = AxiomAnnotationSet();
        entity = Entity();
View Full Code Here

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

    final public SWRLDArgument DArg() throws ParseException {
        OWLLiteral literal;
        IRI iri;
        switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) {
            case VARIABLE: {
                jj_consume_token(VARIABLE);
                jj_consume_token(OPENPAR);
View Full Code Here

TOP

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

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.