You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: to generate the Java code from the OWL/SHACL file, we need to determine if a particular class is an enumeration type
Based on the information available in the OWL/SHACL file, we would have to find all property references to the class and do some rather messy heuristics to determine if a particular class is an Enum class.
Suggestion is to add some information at the class level to more accurately and easily determine if a class represents an Enum with a limited range of values.
Currently, it looks like the only hints as to whether a class is an Enum class is in the properties whose range is that class.
Details:
The current generated file only has basic information for a class containing only enumerated values. For example, HashAlgorithm is defined only containing the comment:
ns2:HashAlgorithm a owl:Class ;
rdfs:comment "A mathematical algorithm that maps data of arbitrary size to a bit string."@en .
The individuals defined for that class can be a hint, but they only have a label and a comment. Example:
<https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/adler32> a owl:NamedIndividual,
ns2:HashAlgorithm ;
rdfs:label "adler32" ;
rdfs:comment "Adler-32 checksum is part of the widely used zlib compression library as defined in [RFC 1950](https://datatracker.ietf.org/doc/rfc1950/) Section 2.3."@en .
The properties which are limited to the class do provide a restriction which can be useful.
Context: to generate the Java code from the OWL/SHACL file, we need to determine if a particular class is an enumeration type
Based on the information available in the OWL/SHACL file, we would have to find all property references to the class and do some rather messy heuristics to determine if a particular class is an Enum class.
Suggestion is to add some information at the class level to more accurately and easily determine if a class represents an Enum with a limited range of values.
Currently, it looks like the only hints as to whether a class is an Enum class is in the properties whose range is that class.
Details:
The current generated file only has basic information for a class containing only enumerated values. For example,
HashAlgorithm
is defined only containing the comment:The individuals defined for that class can be a hint, but they only have a label and a comment. Example:
The properties which are limited to the class do provide a restriction which can be useful.
Example:
The text was updated successfully, but these errors were encountered: