@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix gs1: <https://ref.gs1.org/voc/> .
@prefix usfsma: <https://ref.openepcis.io/extensions/us/fsma204/> .

# SHACL shape validating trade-item master data for a food on the FDA FTL.
# EPCIS events themselves are validated against the EPCIS 2.0 JSON Schema
# from GS1, not against a usfsma: shape.

usfsma:ProductMasterDataShape
    a sh:NodeShape ;
    sh:targetClass gs1:Product ;
    sh:property [
        sh:path usfsma:foodTraceabilityListCategory ;
        sh:minCount 1 ;
        sh:maxCount 1 ;
        sh:class usfsma:FoodTraceabilityList ;
        sh:message "A food subject to FSMA 204 MUST declare its Food Traceability List category (21 CFR 1.1300)." ;
    ] .
