public void visit(OWLObjectPropertyDomainAxiom axiom) { // OWLObjectProperty op = ensureObjectProperty(axiom.getProperty()); // OWLClass clz = ensureClass(axiom.getDomain()); // Set<ObjectDomainConstraint> c = odConstraints.get(op); // if (c == null) { // c = new HashSet<ObjectDomainConstraint>(); // odConstraints.put(op, c); // } // // c.add(IntegrityConstraintFactoryImpl // .ObjectPropertyDomainConstraint(op, clz)); notSupported(axiom); }
@Override public T visit(OWLObjectPropertyDomainAxiom axiom) { throw new IllegalArgumentException( OWLObjectPropertyDomainAxiom.class.getSimpleName() + " cannot be converted to " + getTargetClass().getSimpleName()); }
@Override public Set<ComplexIntegerAxiom> visit(OWLObjectPropertyDomainAxiom axiom) throws TranslationException { Objects.requireNonNull(axiom); IntegerObjectPropertyExpression propertyExpr = translateObjectPropertyExpression(axiom.getProperty()); OWLClassExpression classExpression = axiom.getDomain(); IntegerClassExpression superClassExpression = translateClassExpression(classExpression); IntegerClassExpression subClassExpression = getDataTypeFactory().createObjectSomeValuesFrom(propertyExpr, getDataTypeFactory().createClass(IntegerEntityManager.topClassId)); ComplexIntegerAxiom ret = getAxiomFactory().createSubClassOfAxiom(subClassExpression, superClassExpression, translateAnnotations(axiom.getAnnotations())); return Collections.singleton(ret); }
@Override public void visit(OWLObjectPropertyDomainAxiom axiom) { addSubClassAxiom(axiom.asOWLSubClassOfAxiom()); OWLObjectPropertyExpression op = axiom.getProperty(); OwlNodeSet<OWLPropertyExpression<?,?>> descendants = mPropertyStructureHandler.getDescendants(op, false); for (OwlNode<OWLPropertyExpression<?,?>> node : descendants.getNodes()) { op = (OWLObjectPropertyExpression) node.getEntity(); axiom = mOwlDataFactory.getOWLObjectPropertyDomainAxiom(op, axiom.getDomain()); addSubClassAxiom(axiom.asOWLSubClassOfAxiom()); } }
@Override public void visit(OWLObjectPropertyDomainAxiom axiom) { hashCode = primes[25]; hashCode = hashCode * MULT + axiom.getProperty().hashCode(); hashCode = hashCode * MULT + axiom.getDomain().hashCode(); hashCode = hashCode * MULT + axiom.getAnnotations().hashCode(); }
@Override public OWLObjectPropertyDomainAxiom getAxiomWithoutAnnotations() { if (!isAnnotated()) { return this; } return new OWLObjectPropertyDomainAxiomImpl(getProperty(), getDomain(), NO_ANNOTATIONS); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } return obj instanceof OWLObjectPropertyDomainAxiom; }
public void visit(OWLObjectPropertyDomainAxiom axiom) { OWLObjectAllValuesFrom allPropertyNohting=m_factory.getOWLObjectAllValuesFrom(axiom.getProperty().getSimplified(),m_factory.getOWLNothing()); m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { positive(axiom.getDomain()),allPropertyNohting }); m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(axiom.getProperty().getNamedProperty()); }
public Boolean visit(OWLObjectPropertyDomainAxiom axiom) { return reasoner.isSubClassOf(factory.getOWLObjectSomeValuesFrom(axiom.getProperty(),factory.getOWLThing()),axiom.getDomain()); }
public void visit(OWLObjectPropertyDomainAxiom axiom) { }
@Override public OWLObjectPropertyDomainAxiom visit( ElkObjectPropertyDomainAxiom axiom) { return owlFactory_.getOWLObjectPropertyDomainAxiom( convert(axiom.getProperty()), convert(axiom.getDomain())); }
@SuppressWarnings("static-method") public ElkObjectPropertyDomainAxiom convert( OWLObjectPropertyDomainAxiom owlObjectPropertyDomainAxiom) { return new ElkObjectPropertyDomainAxiomWrap<OWLObjectPropertyDomainAxiom>( owlObjectPropertyDomainAxiom); }
@Override public ElkAxiom visit( OWLObjectPropertyDomainAxiom owlObjectPropertyDomainAxiom) { return CONVERTER.convert(owlObjectPropertyDomainAxiom); }
@Override public ElkObjectPropertyAxiom visit( OWLObjectPropertyDomainAxiom owlObjectPropertyDomainAxiom) { return CONVERTER.convert(owlObjectPropertyDomainAxiom); }
@Override public void visit(OWLObjectPropertyDomainAxiom axiom) { defaultVisit(axiom); }
@Override public OWLAxiom visit(OWLObjectPropertyDomainAxiom axiom) { return factory.getOWLObjectPropertyDomainAxiom(axiom.getProperty(), axiom.getDomain(), annotations); }
@Override public void visit(OWLObjectPropertyDomainAxiom axiom) { }
@Override public Boolean visit(OWLObjectPropertyDomainAxiom axiom) { return true; }
@Override public Boolean visit(OWLObjectPropertyDomainAxiom axiom) { return false; }
@Override public Boolean visit(OWLObjectPropertyDomainAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLObjectPropertyDomainAxiom(axiom.getProperty(), axiom.getDomain(), reg(axiom.getAnnotations()))); }
@Override public Boolean visit(OWLObjectPropertyDomainAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLObjectPropertyDomainAxiom(axiom.getProperty(), axiom.getDomain(), empty())); }
/** * A utility method to process OWL <code>ObjectPropertyDomain(OPE CE)</code> axiom and produce * inferred mapping assertions. This axiom is equivalent to * <code>SubClassOf(ObjectSomeValuesFrom(OPE owl:Thing) CE)</code>. */ @Override public void visit(OWLObjectPropertyDomainAxiom axiom) { axiom.asOWLSubClassOfAxiom().accept(this); }
@Override public void visit(OWLObjectPropertyDomainAxiom axiom) { axiom.asOWLSubClassOfAxiom().accept(this); }
@Override public O visit(OWLObjectPropertyDomainAxiom axiom) { return doDefault(axiom); }
@Override public void visit(OWLObjectPropertyDomainAxiom axiom) { type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex(); }
@Override public OWLAxiom visit(OWLObjectPropertyDomainAxiom axiom) { return dataFactory.getOWLObjectPropertyDomainAxiom(axiom.getProperty(), axiom.getDomain().accept(this)); }
@Override public Set<OWLClassExpression> visit(OWLObjectPropertyDomainAxiom axiom) { return axiom.getDomain().accept(this); }
@Override public void visit(OWLObjectPropertyDomainAxiom axiom) { handleDefault(axiom); }
@Override public OWLObjectPropertyDomainAxiom getAnnotatedAxiom( Set<OWLAnnotation> annotations) { return new OWLObjectPropertyDomainAxiomImpl(getProperty(), getDomain(), mergeAnnos(annotations)); }
@Override public void visit(@Nonnull OWLObjectPropertyDomainAxiom axiom) { axiom.getDomain().accept(this); axiom.getProperty().accept(this); processAxiomAnnotations(axiom); }
public void visit(OWLObjectPropertyDomainAxiom arg0) { unusedAxiom(arg0); }
@Override protected void writeAxiom(OWLObjectPropertyDomainAxiom axiom, BinaryOWLOutputStream outputStream) throws IOException { outputStream.writeOWLObject(axiom.getProperty()); outputStream.writeOWLObject(axiom.getDomain()); }
@Override protected OWLObjectPropertyDomainAxiom readAxiom(BinaryOWLInputStream inputStream, Set<OWLAnnotation> annotations) throws IOException, BinaryOWLParseException { OWLObjectPropertyExpression propertyExpression = inputStream.readOWLObject(); OWLClassExpression classExpression = inputStream.readOWLObject(); return inputStream.getDataFactory().getOWLObjectPropertyDomainAxiom(propertyExpression, classExpression, 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(OWLObjectPropertyDomainAxiom arg0) { }