Conversation
rule-owl-cls-iso191502Enumeration adds owl:oneOf directly to the named
rdfs:Datatype of an enumeration. The OWL 2 mapping to RDF does not read
that pattern as a data range, so OWL 2 tools do not see the literals of
the enumeration. The OWL API reads it as EquivalentClasses(DT
ObjectOneOf()), and its OWL 2 DL profile check reports EmptyOneOfAxiom,
DatatypeIRIAlsoUsedAsClassIRI and UseOfUndeclaredClass.
The new target parameter iso191502EnumerationAsDatatypeDefinition
(default false, so the output is unchanged) encodes the enumeration as
the datatype definition DatatypeDefinition( DT DataOneOf( lt1 ... ltn ) )
of the OWL 2 Structural Specification, Sec. 9.4: the named rdfs:Datatype
is owl:equivalentClass to an anonymous rdfs:Datatype that carries the
owl:oneOf list (OWL 2 Mapping to RDF Graphs, Sec. 2.1, Table 1). OWL 2
DL requires such a definition for every datatype that is not built in
(Sec. 11.2).
The documentation of the rule and of the new parameter describes both
forms. It also names the two cases that stay outside OWL 2 DL with the
parameter set: an enumeration without literals, which DataOneOf cannot
express, and an enumeration that a stereotype or type conversion
parameter makes a subclass, since OWL 2 has no subclass relation
between datatypes.
The new integration test testOwl_iso191502EnumerationAsDatatypeDefinition
runs the model of testOwl_enumerationDatatypeProperty with the parameter
set. That existing test pins the default form and the new one the
datatype definition, so one of them fails if the parameter is ignored
or always applied. Under the OWL API 5.5.0 OWL2DLProfile, the five
violations that the enumeration causes in the default reference are
gone from the new one, which the OWL API reads as
DatatypeDefinition(ex:ExampleEnumeration DataOneOf("alpha" "beta" "gamma")).
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror of upstream ShapeChange#800.