# ShEx compact syntax — generated from the same shape model as the
# SHACL and ShExJ artifacts beside this file (BHE-DES-RDF-001 §10.5).
#
# Two differences from the SHACL are inherent to ShEx, not omissions:
#   * Targeting lives in a ShapeMap, outside the schema. A shape whose
#     SHACL form uses sh:targetClass carries an `a [schema:X]` triple
#     constraint instead; sh:targetSubjectsOf has no equivalent and is
#     recorded in the comment above the shape.
#   * Severity has no ShEx equivalent and is carried as an annotation.

PREFIX schema: <http://schema.org/>
PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd:    <http://www.w3.org/2001/XMLSchema#>
PREFIX shape:  <https://bighouseenterprise.com/#shape->

# IriIdentity [Violation] — Every typed node must carry an IRI @id, never a blank node.
# Applies to the subjects of rdf:type (select via a ShapeMap).
shape:IriIdentity IRI {
}  // rdf:value "Violation"

# OfferCatalogBackReference [Violation] — An OfferCatalog must be referenced by something's hasOfferCatalog.
shape:OfferCatalogBackReference {
    a [schema:OfferCatalog] ;
    ^schema:hasOfferCatalog . +
}  // rdf:value "Violation"

# SingularName [Violation] — A node may carry only one name.
# Applies to the subjects of name (select via a ShapeMap).
shape:SingularName {
    schema:name . ?
}  // rdf:value "Violation"

# SingularHeadline [Violation] — An Article may carry only one headline and one publication date.
shape:SingularHeadline {
    a [schema:Article] ;
    schema:headline . ? ;
    schema:datePublished . ?
}  // rdf:value "Violation"

# ArticleCompleteness [Warning] — An Article should carry a headline, a publication date and an image.
shape:ArticleCompleteness {
    a [schema:Article] ;
    schema:headline . + ;
    schema:datePublished . + ;
    schema:image . +
}  // rdf:value "Warning"

# ProductIdentity [Warning] — A Product should carry an offer and a stable identifier.
shape:ProductIdentity {
    a [schema:Product] ;
    schema:offers . + ;
    schema:sku . +
}  // rdf:value "Warning"

# BreadcrumbPositions [Violation] — Every breadcrumb entry needs exactly one position and one name.
shape:BreadcrumbPositions {
    a [schema:ListItem] ;
    schema:position xsd:integer
}  // rdf:value "Violation"

# EntityUriSpace [Warning] — Nodes this export describes must be identified under the entity's own base.
# Applies to the subjects of rdf:type (select via a ShapeMap).
shape:EntityUriSpace /^https:\/\/bighouseenterprise\.com\// {
}  // rdf:value "Warning"

