robot icon indicating copy to clipboard operation
robot copied to clipboard

How to trigger datatype property range review?

Open ajnelson-nist opened this issue 1 year ago • 1 comments

I just encountered a behavior I'm not understanding.

Given this input file, try.ttl:

@prefix ex: <http://example.org/ontology/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:dp1
	a owl:DatatypeProperty ;
	rdfs:range xsd:dateTimeStamp ;
	.

[]
	a owl:Thing ;
	ex:dp1 2 ;
	.

I have this shell transcript (ROBOT 1.9.6):

$ java -jar robot.jar validate-profile \
	  --input try.ttl \
	  --profile DL \
	  --strict
OWL 2 DL Profile Report: [Ontology and imports closure in profile]

Is this the expected behavior?

ajnelson-nist avatar Jul 01 '24 13:07 ajnelson-nist

I don't think we can be much help with this. ROBOT just calls OWLAPI's profile validator: https://github.com/ontodev/robot/blob/master/robot-command/src/main/java/org/obolibrary/robot/ValidateProfileCommand.java#L104

I'm not surprised that the OWL profile validator does not check that 2 is not a datetime. If you replace 2 with owl:Thing you will see a profile violation, which is the kind of thing that I expect the OWL profile validator to check.

To properly validate datatypes you may need to use another approach, such as ShEx or SHACL.

jamesaoverton avatar Jul 02 '24 13:07 jamesaoverton

Thank you for letting me know.

ajnelson-nist avatar Jul 08 '24 21:07 ajnelson-nist