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 { problems.add("Found anonymous data property expression in data property range axiom: " + pe); } } }
public void visit(OWLDataPropertyRangeAxiom axiom) { try { OWLDataProperty op = Utils.ensureDataProperty(axiom.getProperty()); OWLDatatype clz = Utils.ensureDatatype(axiom.getRange()); dpRanges.put(op, clz); } catch (UnsupportedICException e) { notSupported(axiom); } }
@Override public T visit(OWLDataPropertyRangeAxiom axiom) { throw new IllegalArgumentException( OWLDataPropertyRangeAxiom.class.getSimpleName() + " cannot be converted to " + getTargetClass().getSimpleName()); }
@Override public void visit(OWLDataPropertyRangeAxiom axiom) { OWLDataRange range = axiom.getRange(); if (range.getDataRangeType() == DataRangeType.DATATYPE) { OWLDataProperty property = axiom.getProperty().asOWLDataProperty(); sparql += subjectVar + " <" + property.toStringID() + "> ?o." + "FILTER (DATATYPE(?o) = <" + range.asOWLDatatype().toStringID() + ">)"; String tmp = subjectVar; subjectVar = objectVar; objectVar = tmp; } else { throw new IllegalArgumentException("Datarange " + range + " not supported yet."); } }
@Override public void visit(OWLDataPropertyRangeAxiom axiom) { hashCode = primes[4]; hashCode = hashCode * MULT + axiom.getProperty().hashCode(); hashCode = hashCode * MULT + axiom.getRange().hashCode(); hashCode = hashCode * MULT + axiom.getAnnotations().hashCode(); }
@Nonnull @Override public OWLDataPropertyRangeAxiom getAxiomWithoutAnnotations() { if (!isAnnotated()) { return this; } return new OWLDataPropertyRangeAxiomImpl(getProperty(), getRange(), NO_ANNOTATIONS); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } return obj instanceof OWLDataPropertyRangeAxiom; }
public void visit(OWLDataPropertyRangeAxiom axiom) { OWLDataPropertyExpression dataProperty=axiom.getProperty(); checkTopDataPropertyUse(dataProperty,axiom); OWLDataAllValuesFrom allPropertyRange=m_factory.getOWLDataAllValuesFrom(dataProperty,positive(axiom.getRange())); m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { allPropertyRange }); }
public Boolean visit(OWLDataPropertyRangeAxiom axiom) { return reasoner.isSubClassOf(factory.getOWLThing(),factory.getOWLDataAllValuesFrom(axiom.getProperty(),axiom.getRange())); }
public void visit(OWLDataPropertyRangeAxiom axiom) { }
@Override public OWLDataPropertyRangeAxiom visit(ElkDataPropertyRangeAxiom axiom) { return owlFactory_.getOWLDataPropertyRangeAxiom( convert(axiom.getProperty()), convert(axiom.getRange())); }
@Override public ElkDataPropertyAxiom visit( OWLDataPropertyRangeAxiom owlDataPropertyRangeAxiom) { return CONVERTER.convert(owlDataPropertyRangeAxiom); }
@SuppressWarnings("static-method") public ElkDataPropertyRangeAxiom convert( OWLDataPropertyRangeAxiom owlDataPropertyRangeAxiom) { return new ElkDataPropertyRangeAxiomWrap<OWLDataPropertyRangeAxiom>( owlDataPropertyRangeAxiom); }
@Override public ElkAxiom visit(OWLDataPropertyRangeAxiom owlDataPropertyRangeAxiom) { return CONVERTER.convert(owlDataPropertyRangeAxiom); }
@Override public void visit(OWLDataPropertyRangeAxiom axiom) { defaultVisit(axiom); }
@Override public OWLAxiom visit(OWLDataPropertyRangeAxiom axiom) { return factory.getOWLDataPropertyRangeAxiom(axiom.getProperty(), axiom.getRange(), annotations); }
@Override public void visit(OWLDataPropertyRangeAxiom axiom) { }
@Override public Boolean visit(OWLDataPropertyRangeAxiom axiom) { return true; }
@Override public Boolean visit(OWLDataPropertyRangeAxiom axiom) { return false; }
@Override public Boolean visit(OWLDataPropertyRangeAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLDataPropertyRangeAxiom(axiom.getProperty(), axiom.getRange(), reg(axiom.getAnnotations()))); }
@Override public Boolean visit(OWLDataPropertyRangeAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLDataPropertyRangeAxiom(axiom.getProperty(), axiom.getRange(), empty())); }
@Override public Set<ComplexIntegerAxiom> visit(OWLDataPropertyRangeAxiom axiom) { Objects.requireNonNull(axiom); throw TranslationException.newUnsupportedAxiomException(axiom); }
@Override public void visit(OWLDataPropertyRangeAxiom axiom) { ignoreOwlAxiom("DataPropertyRange", axiom); }
@Override public O visit(OWLDataPropertyRangeAxiom axiom) { return doDefault(axiom); }
@Override public void visit(OWLDataPropertyRangeAxiom axiom) { type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex(); }
@Override public OWLAxiom visit(OWLDataPropertyRangeAxiom axiom) { return dataFactory.getOWLDataPropertyRangeAxiom(axiom.getProperty(), axiom.getRange().accept(this)); }
@Override public void visit(OWLDataPropertyRangeAxiom axiom) { handleDefault(axiom); }
@Override public void visit(@Nonnull OWLDataPropertyRangeAxiom axiom) { axiom.getProperty().accept(this); axiom.getRange().accept(this); processAxiomAnnotations(axiom); }
public void visit(OWLDataPropertyRangeAxiom arg0) { unusedAxiom(arg0); }
@Override protected void writeAxiom(OWLDataPropertyRangeAxiom axiom, BinaryOWLOutputStream outputStream) throws IOException { outputStream.writeOWLObject(axiom.getProperty()); outputStream.writeOWLObject(axiom.getRange()); }
@Override protected OWLDataPropertyRangeAxiom readAxiom(BinaryOWLInputStream inputStream, Set<OWLAnnotation> annotations) throws IOException, BinaryOWLParseException { OWLDataPropertyExpression propertyExpression = inputStream.readOWLObject(); OWLDataRange dataRange = inputStream.readOWLObject(); return inputStream.getDataFactory().getOWLDataPropertyRangeAxiom(propertyExpression, dataRange, annotations); }
private static String axiomSetToHTML(Set<Object> set, boolean isAddition, Properties lang){ String v = ""; String message; if(isAddition){ message=lang.getProperty(Constants.LANG_ADDED)+": "; }else{ message=lang.getProperty(Constants.LANG_DELETED)+": "; } for(Object f:set){ try{ v+="<li>"; if(f instanceof OWLSubClassOfAxiom){ v+=message+lang.getProperty(Constants.LANG_SUBCLASS_OF) +" "+ ((OWLSubClassOfAxiom)f).getSuperClass().asOWLClass().getIRI(); }else if(f instanceof OWLSubPropertyAxiom){ OWLPropertyExpression prop = ((OWLSubPropertyAxiom)f).getSuperProperty(); if(prop instanceof OWLObjectPropertyImpl){ v+=message+lang.getProperty(Constants.LANG_SUBPROP_OF) +" "+ ((OWLObjectPropertyImpl)prop).getIRI(); }else if(prop instanceof OWLDataPropertyImpl){ v+=message+lang.getProperty(Constants.LANG_SUBPROP_OF) +" "+ ((OWLDataPropertyImpl)prop).getIRI(); } }else if(f instanceof OWLObjectPropertyDomainAxiom){ v+=message+Constants.LANG_DOMAIN+" "+expressionToHTML(((OWLObjectPropertyDomainAxiom)f).getDomain(), lang); }else if(f instanceof OWLDataPropertyDomainAxiom){ v+=message+lang.getProperty(Constants.LANG_DOMAIN)+" "+expressionToHTML(((OWLDataPropertyDomainAxiom)f).getDomain(), lang); }else if(f instanceof OWLObjectPropertyRangeAxiom){ v+=message+lang.getProperty(Constants.LANG_RANGE)+" "+expressionToHTML(((OWLObjectPropertyRangeAxiom)f).getRange(), lang); }else if(f instanceof OWLDataPropertyRangeAxiom){ v+=message+lang.getProperty(Constants.LANG_RANGE)+" "+((OWLDataPropertyRangeAxiom)f).getRange().asOWLDatatype().getIRI(); }else if(f instanceof OWLAnnotationAssertionAxiom){ v+= message+((OWLAnnotationAssertionAxiom)f).getProperty().toString() +" "+ ((OWLAnnotationAssertionAxiom)f).getValue().toString(); }else{ //other less typical axioms v+=message+((OWLAxiom)f).getAxiomType().getName()+" "+f.toString().replace("<", "<").replace(">", ">"); } /** * To add if we want to refine * OWLDisjointClassesAxiom, OWLDisjointDataPropertiesAxiom, OWLDisjointObjectPropertiesAxiom, * OWLEquivalentClassesAxiom, OWLEquivalentDataPropertiesAxiom, OWLEquivalentObjectPropertiesAxiom, * OWLFunctionalDataPropertyAxiom, OWLFunctionalObjectPropertyAxiom, */ v+="</li>\n"; }catch (Exception e){ System.out.println("Error while transforming "+f.toString() +" "+e.getMessage()); } } return v; }
public void visit(OWLDataPropertyRangeAxiom arg0) { }
public void visit(OWLDataPropertyRangeAxiom arg0) { // TODO Auto-generated method stub }