protected void illegalFacet(OWLDatatypeRestriction node, OWLDatatype datatype, OWLFacetRestriction r) { OWL2Datatype dt = datatype.getBuiltInDatatype(); if (!dt.getFacets().contains(r.getFacet())) { violations.add(new UseOfIllegalFacetRestriction(getCurrentOntology(), getCurrentAxiom(), node, r.getFacet())); } }
protected void illegalFacet(OWLDatatypeRestriction node, OWLDatatype datatype, OWLFacetRestriction r) { OWL2Datatype dt = datatype.getBuiltInDatatype(); if (!dt.getFacets().contains(r.getFacet())) { violations.add(new UseOfIllegalFacetRestriction(getCurrentOntology(), getCurrentAxiom(), node, r.getFacet())); } }
protected void illegalFacet(OWLDatatypeRestriction node, OWLDatatype datatype, OWLFacetRestriction r) { OWL2Datatype dt = datatype.getBuiltInDatatype(); if (!dt.getFacets().contains(r.getFacet())) { violations.add(new UseOfIllegalFacetRestriction(getCurrentOntology(), getCurrentAxiom(), node, r.getFacet())); } }
public Object visit(OWLDatatypeRestriction node) { // The datatype should not be defined with a datatype definition axiom for(OWLOntology ont : man.getImportsClosure(getCurrentOntology())) { for(OWLDatatypeDefinitionAxiom ax : ont.getAxioms(AxiomType.DATATYPE_DEFINITION)) { if(node.getDatatype().equals(ax.getDatatype())) { profileViolations.add(new UseOfDefinedDatatypeInDatatypeRestriction(getCurrentOntology(), getCurrentAxiom(), node)); } } } // All facets must be allowed for the restricted datatype for (OWLFacetRestriction r : node.getFacetRestrictions()) { OWL2Datatype dt = node.getDatatype().getBuiltInDatatype(); if (!dt.getFacets().contains(r.getFacet())) { profileViolations.add(new UseOfIllegalFacetRestriction(getCurrentOntology(), getCurrentAxiom(), node, r.getFacet())); } } return null; }