Examples of OWLDataPropertyExpression


Examples of org.semanticweb.owlapi.model.OWLDataPropertyExpression

    }

    @Override
    protected int compareObjectOfSameType(OWLObject object) {
        OWLQuantifiedDataRestriction other = (OWLQuantifiedDataRestriction) object;
        OWLDataPropertyExpression p1 = getProperty();
        OWLDataPropertyExpression p2 = other.getProperty();
        int diff = p1.compareTo(p2);
        if (diff != 0) {
            return diff;
        }
        return getFiller().compareTo(other.getFiller());
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataPropertyExpression

        return res;
    }
   
    private void checkInconsistentProperty(OWLDataProperty dp, OWLDatatype type) {
        for (OWLDataPropertyRangeAxiom a : dprAxioms) {
            OWLDataPropertyExpression pe = a.getProperty();
            OWLDataRange r = a.getRange();
            // TODO: check DataOneOf
            // TODO: check OWLDataIntersectionOf
            OWLDatatype otype = r.asOWLDatatype();

            if (!pe.isAnonymous()) {
                if (!otype.equals(type)) {
                    problems.add("The literal value restriction " + dp + " is inconsistent with the data property " +
                        "range axiom " + a);
                }
            } else {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataPropertyExpression

            public void visit(OWLDataMinCardinality e) {
                unimplemented(e);
            }

            public void visit(OWLDataHasValue e) {
                OWLDataPropertyExpression dpe = e.getProperty();
                // TODO: consider the case where dpe is anonymous
                OWLDataProperty dp = dpe.asOWLDataProperty();
                OWLLiteral l = e.getValue();
                OWLDatatype type = l.getDatatype();

                checkInconsistentProperty(dp, type);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataPropertyExpression

        }
    }


    public OWLClassExpression parseDataRestriction() throws ParserException {
        OWLDataPropertyExpression prop = parseDataProperty();
        String kw = consumeToken();
        if (kw.equalsIgnoreCase(SOME)) {
            OWLDataRange rng = parseDataRange();
            if(rng==null) {
              throw new ParserException(getTokenSequence(), getTokenPos(), getTokenRow(), getTokenCol(), true, false, false, false, true, false, Collections.<String>emptySet());
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataPropertyExpression

        }
        throw createException(TYPE);
    }

    public OWLAxiom parseAxiomWithDataPropertyStart() throws ParserException {
    OWLDataPropertyExpression prop = parseDataProperty();
    String kw = consumeToken();
    if (kw.equalsIgnoreCase(SOME)) {
      OWLDataRange dataRange = parseDataIntersectionOf();
      return parseClassAxiomRemainder(getDataFactory()
          .getOWLDataSomeValuesFrom(prop, dataRange));
    } else if (kw.equalsIgnoreCase(ONLY)) {
      OWLDataRange dataRange = parseDataIntersectionOf();
      return parseClassAxiomRemainder(getDataFactory()
          .getOWLDataAllValuesFrom(prop, dataRange));
    } else if (kw.equalsIgnoreCase(MIN)) {
      int cardi = parseInteger();
      OWLDataRange dataRange = parseDataIntersectionOf();
      return parseClassAxiomRemainder(getDataFactory()
          .getOWLDataMinCardinality(cardi, prop, dataRange));
    } else if (kw.equalsIgnoreCase(MAX)) {
      int cardi = parseInteger();
      OWLDataRange dataRange = parseDataIntersectionOf();
      return parseClassAxiomRemainder(getDataFactory()
          .getOWLDataMaxCardinality(cardi, prop, dataRange));
    } else if (kw.equalsIgnoreCase(EXACTLY)) {
      int cardi = parseInteger();
      OWLDataRange dataRange = parseDataIntersectionOf();
      return parseClassAxiomRemainder(getDataFactory()
          .getOWLDataExactCardinality(cardi, prop, dataRange));
    } else if (kw.equalsIgnoreCase(SUB_PROPERTY_OF)) {
      OWLDataPropertyExpression superProperty = parseDataPropertyExpression();
      return getDataFactory().getOWLSubDataPropertyOfAxiom(prop,
          superProperty);
    } else if (kw.equalsIgnoreCase(EQUIVALENT_TO)) {
      OWLDataPropertyExpression equivProp = parseDataPropertyExpression();
      return getDataFactory().getOWLEquivalentDataPropertiesAxiom(prop,
          equivProp);
    } else if (kw.equalsIgnoreCase(DISJOINT_WITH)) {
      OWLDataPropertyExpression disjProp = parseDataPropertyExpression();
      return getDataFactory().getOWLDisjointDataPropertiesAxiom(prop,
          disjProp);
    } else if (kw.equals(DOMAIN)) {
      OWLClassExpression domain = parseClassExpression();
      return getDataFactory().getOWLDataPropertyDomainAxiom(prop, domain);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataPropertyExpression

    public OWLDataHasValue translate(IRI mainNode) {
        getConsumer().consumeTriple(mainNode, RDF_TYPE.getIRI(), OWL_RESTRICTION.getIRI());
        OWLLiteral lit = getConsumer().getLiteralObject(mainNode, OWL_HAS_VALUE, true);
        IRI propertyIRI = getConsumer().getResourceObject(mainNode, OWL_ON_PROPERTY, true);
        OWLDataPropertyExpression property = getConsumer().translateDataPropertyExpression(propertyIRI);
        return getDataFactory().getOWLDataHasValue(property, lit);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataPropertyExpression

        }
        else if (consumer.isSWRLDataValuedPropertyAtom(firstObject)) {
            SWRLIArgument arg1 = translateSWRLAtomIObject(firstObject, ARGUMENT_1.getIRI());
            SWRLDArgument arg2 = translateSWRLAtomDObject(firstObject, ARGUMENT_2.getIRI());
            IRI dataPropertyIRI = consumer.getResourceObject(firstObject, PROPERTY_PREDICATE.getIRI(), true);
            OWLDataPropertyExpression prop = consumer.translateDataPropertyExpression(dataPropertyIRI);
            return dataFactory.getSWRLDataPropertyAtom(prop, arg1, arg2);
        }
        else if (consumer.isSWRLIndividualPropertyAtom(firstObject)) {
            SWRLIArgument arg1 = translateSWRLAtomIObject(firstObject, ARGUMENT_1.getIRI());
            SWRLIArgument arg2 = translateSWRLAtomIObject(firstObject, ARGUMENT_2.getIRI());
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataPropertyExpression

        }
   
  }

  final public OWLClassExpression DataAllValuesFrom() throws ParseException {
    OWLDataPropertyExpression prop = null;
    OWLDataRange dataRange = null;
    jj_consume_token(DATAALLVALUESFROM);
    jj_consume_token(OPENPAR);
    prop = DataPropertyExpression();
    dataRange = DataRange();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataPropertyExpression

        return dataFactory.getOWLDataAllValuesFrom(prop, dataRange);
   
  }

  final public OWLClassExpression DataSomeValuesFrom() throws ParseException {
    OWLDataPropertyExpression prop = null;
    OWLDataRange dataRange = null;
    jj_consume_token(DATASOMEVALUESFROM);
    jj_consume_token(OPENPAR);
    prop = DataPropertyExpression();
    dataRange = DataRange();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataPropertyExpression

        return dataFactory.getOWLDataSomeValuesFrom(prop, dataRange);
   
  }

  final public OWLClassExpression DataHasValue() throws ParseException {
    OWLDataPropertyExpression prop = null;
    OWLLiteral literal = null;
    jj_consume_token(DATAHASVALUE);
    jj_consume_token(OPENPAR);
    prop = DataPropertyExpression();
    literal = Literal();
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.