Examples of OWLDataProperty


Examples of org.semanticweb.owl.model.OWLDataProperty

        this.predicate = predicate;
    }

    public void handleTriple(URI subject, URI predicate, OWLConstant object) throws OWLException {
        OWLIndividual subj = getDataFactory().getOWLIndividual(subject);
        OWLDataProperty prop = getDataFactory().getOWLDataProperty(predicate);
        addAxiom(getDataFactory().getOWLDataPropertyAssertionAxiom(subj, prop, object));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

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

    final public OWLDataProperty DataProperty() throws ParseException {
        OWLDataProperty prop;
        jj_consume_token(DATAPROP);
        jj_consume_token(OPENPAR);
        prop = DataPropertyIRI();
        jj_consume_token(CLOSEPAR);
        {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

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

    final public SWRLDataPropertyAtom DataPropertyAtom() throws ParseException {
        OWLDataProperty prop;
        SWRLIArgument arg0;
        SWRLDArgument arg1;
        jj_consume_token(DATAPROPERTYATOM);
        jj_consume_token(OPENPAR);
        prop = DataPropertyIRI();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

        return ind;
    }

    @Nonnull
    private OWLDataProperty getOWLDataProperty(@Nonnull String name) {
        OWLDataProperty prop = owlEntityChecker.getOWLDataProperty(name);
        if (prop == null && dataPropertyNames.contains(name)) {
            prop = dataFactory.getOWLDataProperty(getIRI(name));
        }
        if (prop == null) {
            throw new ExceptionBuilder().withData().build();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

        String tok = consumeToken();
        if (!DATA_PROPERTY.matches(tok)) {
            throw new ExceptionBuilder().withKeyword(DATA_PROPERTY).build();
        }
        String subj = consumeToken();
        OWLDataProperty prop = getOWLDataProperty(subj);
        axioms.add(new OntologyAxiomPair(defaultOntology, dataFactory
                .getOWLDeclarationAxiom(prop)));
        parseFrameSections(false, axioms, prop, dataPropertyFrameSections);
        return axioms;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

            consumeToken();
            negative = true;
        }
        String prop = peekToken();
        if (isDataPropertyName(prop)) {
            OWLDataProperty p = parseDataProperty();
            OWLLiteral con = parseLiteral(null);
            if (!negative) {
                return dataFactory
                        .getOWLDataPropertyAssertionAxiom(p, ind, con);
            } else {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

    @Override
    public Set<OWLDataProperty> parseDataPropertyList() {
        Set<OWLDataProperty> props = new HashSet<>();
        String sep = COMMA.keyword();
        while (COMMA.matches(sep)) {
            OWLDataProperty prop = parseDataProperty();
            props.add(prop);
            sep = peekToken();
            if (COMMA.matches(sep)) {
                consumeToken();
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

        String name = peekToken();
        if (isObjectPropertyName(name)) {
            OWLObjectPropertyExpression prop = parseObjectPropertyExpression(false);
            return dataFactory.getOWLFunctionalObjectPropertyAxiom(prop);
        } else if (isDataPropertyName(name)) {
            OWLDataProperty prop = parseDataProperty();
            return dataFactory.getOWLFunctionalDataPropertyAxiom(prop);
        } else {
            consumeToken();
            throw new ExceptionBuilder().withObject().withData().build();
        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

    }

    @Test
    public void shouldBuildDataProperty() {
        // given
        OWLDataProperty expected = df.getOWLDataProperty(iri);
        BuilderDataProperty builder = new BuilderDataProperty(expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLDataProperty prop = DataProperty(iri("prop"));
        OWLDataRange dr = Integer();
        OWLClass base = Class(iri("A"));
        axioms.add(SubClassOf(base, DataMinCardinality(3, prop, dr)));
        return axioms;
    }
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.