public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { ensurePrepared(); DefaultNodeSet<OWLClass> result = new OWLClassNodeSet(); for (OWLOntology ontology : getRootOntology().getImportsClosure()) { for (OWLDataPropertyDomainAxiom axiom : ontology.getDataPropertyDomainAxioms(pe)) { result.addNode(getEquivalentClasses(axiom.getDomain())); if (!direct) { result.addAllNodes(getSuperClasses(axiom.getDomain(), false).getNodes()); } } } return result; }
public void visit(OWLDataPropertyDomainAxiom axiom) { // OWLDataProperty op = ensureDataProperty(axiom.getProperty()); // OWLClass clz = ensureClass(axiom.getDomain()); // Set<DataDomainConstraint> c = ddConstraints.get(op); // if (c == null) { // c = new HashSet<DataDomainConstraint>(); // ddConstraints.put(op, c); // } // // c.add(IntegrityConstraintFactoryImpl.DataPropertyDomainConstraint(op, // clz)); notSupported(axiom); }
public void visit(OWLDataPropertyDomainAxiom axiom) { OWLDataPropertyExpression dataProperty=axiom.getProperty(); checkTopDataPropertyUse(dataProperty,axiom); OWLDataRange dataNothing=m_factory.getOWLDataComplementOf(m_factory.getTopDatatype()); OWLDataAllValuesFrom allPropertyDataNothing=m_factory.getOWLDataAllValuesFrom(dataProperty,dataNothing); m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { positive(axiom.getDomain()),allPropertyDataNothing }); }
@Override public T visit(OWLDataPropertyDomainAxiom axiom) { throw new IllegalArgumentException( OWLDataPropertyDomainAxiom.class.getSimpleName() + " cannot be converted to " + getTargetClass().getSimpleName()); }
@Override public void visit(OWLDataPropertyDomainAxiom axiom) { hashCode = primes[3]; hashCode = hashCode * MULT + axiom.getProperty().hashCode(); hashCode = hashCode * MULT + axiom.getDomain().hashCode(); hashCode = hashCode * MULT + axiom.getAnnotations().hashCode(); }
@Override public OWLDataPropertyDomainAxiom getAxiomWithoutAnnotations() { if (!isAnnotated()) { return this; } return new OWLDataPropertyDomainAxiomImpl(getProperty(), getDomain(), NO_ANNOTATIONS); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } return obj instanceof OWLDataPropertyDomainAxiom; }
public Boolean visit(OWLDataPropertyDomainAxiom axiom) { return reasoner.isSubClassOf(factory.getOWLDataSomeValuesFrom(axiom.getProperty(),factory.getTopDatatype()),axiom.getDomain()); }
public void visit(OWLDataPropertyDomainAxiom axiom) { }
@Override public OWLDataPropertyDomainAxiom visit(ElkDataPropertyDomainAxiom axiom) { return owlFactory_.getOWLDataPropertyDomainAxiom( convert(axiom.getProperty()), convert(axiom.getDomain())); }
@Override public ElkDataPropertyAxiom visit( OWLDataPropertyDomainAxiom owlDataPropertyDomainAxiom) { return CONVERTER.convert(owlDataPropertyDomainAxiom); }
@SuppressWarnings("static-method") public ElkDataPropertyDomainAxiom convert( OWLDataPropertyDomainAxiom owlDataPropertyDomainAxiom) { return new ElkDataPropertyDomainAxiomWrap<OWLDataPropertyDomainAxiom>( owlDataPropertyDomainAxiom); }
@Override public ElkAxiom visit(OWLDataPropertyDomainAxiom owlDataPropertyDomainAxiom) { return CONVERTER.convert(owlDataPropertyDomainAxiom); }
@Override public void visit(OWLDataPropertyDomainAxiom axiom) { defaultVisit(axiom); }
@Override public OWLAxiom visit(OWLDataPropertyDomainAxiom axiom) { return factory.getOWLDataPropertyDomainAxiom(axiom.getProperty(), axiom.getDomain(), annotations); }
@Override public void visit(OWLDataPropertyDomainAxiom axiom) { }
@Override public Boolean visit(OWLDataPropertyDomainAxiom axiom) { return true; }
@Override public Boolean visit(OWLDataPropertyDomainAxiom axiom) { return false; }
@Override public Boolean visit(OWLDataPropertyDomainAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLDataPropertyDomainAxiom(axiom.getProperty(), axiom.getDomain(), reg(axiom.getAnnotations()))); }
@Override public Boolean visit(OWLDataPropertyDomainAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLDataPropertyDomainAxiom(axiom.getProperty(), axiom.getDomain(), empty())); }
@Override public Set<ComplexIntegerAxiom> visit(OWLDataPropertyDomainAxiom axiom) { Objects.requireNonNull(axiom); throw TranslationException.newUnsupportedAxiomException(axiom); }
/** * A utility method to process OWL <code>DataPropertyDomain(DPE CE)</code> axiom and produce * inferred mapping assertions. This axiom is equivalent to * <code>SubClassOf(DataSomeValuesFrom(DPE rdfs:Literal) CE)</code>. */ @Override public void visit(OWLDataPropertyDomainAxiom axiom) { axiom.asOWLSubClassOfAxiom().accept(this); }
@Override public void visit(OWLDataPropertyDomainAxiom axiom) { axiom.asOWLSubClassOfAxiom().accept(this); }
@Override public O visit(OWLDataPropertyDomainAxiom axiom) { return doDefault(axiom); }
@Override public void visit(OWLDataPropertyDomainAxiom axiom) { type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex(); }
@Override public OWLAxiom visit(OWLDataPropertyDomainAxiom axiom) { return dataFactory.getOWLDataPropertyDomainAxiom(axiom.getProperty(), axiom.getDomain().accept(this)); }
@Override public Set<OWLClassExpression> visit(OWLDataPropertyDomainAxiom axiom) { return axiom.getDomain().accept(this); }
@Override public void visit(OWLDataPropertyDomainAxiom axiom) { handleDefault(axiom); }
@Override public void visit(@Nonnull OWLDataPropertyDomainAxiom axiom) { axiom.getDomain().accept(this); axiom.getProperty().accept(this); processAxiomAnnotations(axiom); }
public void visit(OWLDataPropertyDomainAxiom arg0) { unusedAxiom(arg0); }
@Override protected void writeAxiom(OWLDataPropertyDomainAxiom axiom, BinaryOWLOutputStream outputStream) throws IOException { outputStream.writeOWLObject(axiom.getProperty()); outputStream.writeOWLObject(axiom.getDomain()); }
@Override protected OWLDataPropertyDomainAxiom readAxiom(BinaryOWLInputStream inputStream, Set<OWLAnnotation> annotations) throws IOException, BinaryOWLParseException { OWLDataPropertyExpression propertyExpression = inputStream.readOWLObject(); OWLClassExpression domain = inputStream.readOWLObject(); return inputStream.getDataFactory().getOWLDataPropertyDomainAxiom(propertyExpression, domain, 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(OWLDataPropertyDomainAxiom arg0) { }
public void visit(OWLDataPropertyDomainAxiom arg0) { // TODO Auto-generated method stub }