EKGF Ontologies / Story Ontology

EKGF Editor's Draft

Story Ontology

EKGF Editor's Draft

1. Story Ontology§

1.1 Overview§

Story Ontology

IdentifierValue
Ontology IRI / Namespacehttps://ekgf.org/ontology/story#
Prefixekg-story

A story describes an interaction within a use case, including the persona playing it, the outcome it contributes to, and the concepts it uses. Describe these as input concepts, output concepts, and dependent concepts. An input concept is part of the business requirement; its technical manifestations can include API names, query variables, or source-code identifiers.

1.1.1 Implementations and ownership§

implementedBy links a story to its implementations. Its inverse, implementationOf, identifies the single story an implementation belongs to. A story can have zero or more implementations. Each implementation belongs to exactly one story.

The OWL class restriction records exactly one owner, and implementationOf is functional. OWL can equate different owner names when their distinctness has not been asserted. StoryImplementationShape validates the supplied data and rejects missing or multiple owner terms, counting both link directions. An owner asserted in both directions is counted once. The shape also covers implementation subclasses and relationship endpoints whose types are inferred.

The number of implementations does not select which one executes. A Story Service resolves an appropriate runnable implementation in its execution context and rejects invocation when that selection is absent or ambiguous.

1.1.1.1 Migration and validation§

Replace every hasImplementation assertion with implementedBy, or use implementationOf in the other direction. LegacyImplementationShape rejects the removed predicate, including when a canonical link is also present. Replace previously loaded ontology graphs so the old declaration and inverse axiom are removed.

For a Turtle data file, validate with the Story Ontology as both the shapes graph and the ontology graph. RDFS inference supplies endpoint types and subclass relationships:

pyshacl -s ekgf-story.ttl -e ekgf-story.ttl -i rdfs implementation-data.ttl

Either direction can be supplied:

@prefix ekg-story: <https://ekgf.org/ontology/story#> .
@prefix ex: <https://example.org/> .

ex:findCustomer ekg-story:implementedBy ex:findCustomerSPARQL .
# Equivalently:
# ex:findCustomerSPARQL ekg-story:implementationOf ex:findCustomer .

Validate the graph or deliberately selected graph set representing one coherent version context. Historical snapshots can repeat the same story and implementation IRIs without adding owners. If snapshots link the same implementation IRI to different story-version IRIs, each snapshot must be validated separately; combining them produces a multiple-owner violation. Named graphs alone do not define this context or exempt ownership constraints.

1.1.2 Ownership and reuse§

A story owns its concept-usage objects. Each usage belongs to exactly one story and references exactly one reusable ekg-concept:DataElementConcept through ekg-concept:hasConcept. Different stories reference the same concept through separate usage objects. Deleting a story removes its usage objects; the referenced concepts retain their identity.

Concepts are members of ekg-concept:ConceptSet resources. A use case owns its concept vocabularies through ekg-use-case:ownsConceptSet; stories can draw from their use case's vocabularies and those inherited from ancestor use cases. Using a concept does not transfer its ownership to the story.

1.1.3 Concept-usage model§

The OWL classes, property ranges, ownership restrictions, input flags, and SHACL constraints below are declared in this ontology.

Story predicateRange of the predicate
hasInputConceptStoryInput
hasOutputConceptStoryOutput
hasDependentConceptStoryDependent

The three range classes specialize a common StoryConceptUsage class. The three predicates specialize hasConceptUsage. A specific predicate lets the reasoner infer both the specific usage class and its common superclass, and the general relationship. A separate usage-type value is unnecessary. These usage classes describe relationships to concepts.

For example:

@prefix ekg-story: <https://ekgf.org/ontology/story#> .
@prefix ekg-concept: <https://ekgf.org/ontology/concept#> .
@prefix ex: <https://example.org/> .

ex:findCustomer ekg-story:hasInputConcept [
    ekg-concept:hasConcept ex:customerIdentifier ;
    ekg-story:isMandatory true
] .

ex:customerIdentifier a ekg-concept:DataElementConcept .

The blank node is the story-owned input-concept usage. Its type is inferred from the predicate's range. The customer-identifier concept can be reused by other stories.

1.1.4 Input-concept behavior§

An input usage can carry isMandatory and isServerProvided. isMandatory means that the input is required for execution; isServerProvided means that the Story Service supplies it. The flags are independent: an input can be mandatory and server-provided.

A Story Service interprets each absent flag as false. Missing flags remain valid data. StoryInputShape property shapes record sh:defaultValue false, accept at most one value per flag, and require supplied values to be xsd:boolean. Invalid values are validation errors.

sh:defaultValue records the application default; SHACL Core validation does not insert it. OWL reasoning does not infer false from absence. A service applies these defaults during execution; materializing explicit false triples is an application choice.

StoryConceptUsageShape requires exactly one owning story, one referenced concept, and one of the three usage roles. The role classes are disjoint: use separate usage objects if a concept is both an input and an output. The general hasConceptUsage predicate requires an explicit or inferred role class. Either input flag infers StoryInput through its domain, even when false; specialized predicates infer their roles through their ranges. Blank nodes and IRIs are accepted for usage objects. Shared concepts are never usage objects. Consumers must retain usage identity rather than merge usages by concept IRI: distinct usages of one concept can have different flags.

concept:hasConcept retains its general meaning and has no global domain. Its exactly-one restriction applies to StoryConceptUsage, so other resources can reference concepts without becoming story usages.

1.1.5 Migration from earlier generations§

For an old direct story-to-concept link, create a story-owned usage object and move the concept reference to its concept:hasConcept property. The hasInputConcept, hasOutputConcept, and hasDependentConcept predicates now range over usages, not directly over concepts. Never turn the reusable concept itself into the usage object.

Replace hasInput and hasOutput with hasInputConcept and hasOutputConcept, retaining their usage objects and concept references. Replace MandatoryParameter with StoryInput plus isMandatory true. Replace OptionalParameter with StoryInput; isMandatory false can be explicit or absent. Retired serverProvidedIRI assertions must be resolved to the actual input usage and replaced with isServerProvided there; a story-level flag does not identify that input automatically.

OptionalStoryOutput is retired. Resolve the intended output contract when migrating those records; input flags do not express output optionality. LegacyConceptUsageShape rejects all retired predicates and classes rather than silently translating them. Replace previously loaded ontology graphs to remove old ranges, parameter classes, and the former global domain of concept:hasConcept.

All named validation shapes belong to this ontology's shapes graph; nested shapes are included through their entry definitions. Validate with the Story Ontology as both shapes and ontology graph and enable RDFS inference, as in the validation command above. See the repository's concept-usage guide for a complete executable example.

See the Method's Story/Concept Relationship, its concept-vocabulary ownership rules, and SHACL default-value semantics.

1.2 Classes§

1.2.1 Agent Job Implementation§

A story implementation expressed as a job performed by an agent.

ekg-story:AgentJobImplementation
https://ekgf.org/ontology/story#AgentJobImplementation
RDF predicateValue
rdf:typeowl:Class
rdfs:labelAgent Job Implementation
rdfs:subClassOfekg-story:StoryImplementation
UML class diagram for Agent Job Implementation. Diagram labels: «owl:Class»; Agent Job Implementation; «owl:Class»; Story Implementation; implementation of : Story [1]; OWL restrictions are drawn as class-scoped members, associations and constraints. Qualified counts count only property values in the named target class or datatype; other values are not excluded. A constraint such as {no p} states that the class has no value of p, or {no p in C} none in the named target. A zero minimum imposes no restriction and is omitted visually. {redefines} marks a restriction on a property inherited from a superclass domain. Agent Job Implementation rdfs:subClassOf Story Implementation.«owl:Class»Agent Job Implementation«owl:Class»Story Implementationimplementation of : Story [1]
Class neighborhood: Agent Job Implementation [1]

1.2.2 API Proxy Implementation§

A story implementation that delegates the interaction to an API through a proxy.

ekg-story:ApiProxyImplementation
https://ekgf.org/ontology/story#ApiProxyImplementation
RDF predicateValue
rdf:typeowl:Class
rdfs:labelAPI Proxy Implementation
rdfs:subClassOfekg-story:StoryImplementation
UML class diagram for API Proxy Implementation. Diagram labels: «owl:Class»; API Proxy Implementation; «owl:Class»; Story Implementation; implementation of : Story [1]; OWL restrictions are drawn as class-scoped members, associations and constraints. Qualified counts count only property values in the named target class or datatype; other values are not excluded. A constraint such as {no p} states that the class has no value of p, or {no p in C} none in the named target. A zero minimum imposes no restriction and is omitted visually. {redefines} marks a restriction on a property inherited from a superclass domain. API Proxy Implementation rdfs:subClassOf Story Implementation.«owl:Class»API Proxy Implementation«owl:Class»Story Implementationimplementation of : Story [1]
Class neighborhood: API Proxy Implementation [1]

1.2.3 Named Statement Implementation§

A story implementation identified through a named executable statement.

ekg-story:NamedStatementImplementation
https://ekgf.org/ontology/story#NamedStatementImplementation
RDF predicateValue
rdf:typeowl:Class
rdfs:labelNamed Statement Implementation
rdfs:subClassOfekg-story:StoryImplementation
UML class diagram for Named Statement Implementation. Diagram labels: «owl:Class»; Named Statement; Implementation; «owl:Class»; Story Implementation; implementation of : Story [1]; OWL restrictions are drawn as class-scoped members, associations and constraints. Qualified counts count only property values in the named target class or datatype; other values are not excluded. A constraint such as {no p} states that the class has no value of p, or {no p in C} none in the named target. A zero minimum imposes no restriction and is omitted visually. {redefines} marks a restriction on a property inherited from a superclass domain. Named Statement Implementation rdfs:subClassOf Story Implementation.«owl:Class»Named StatementImplementation«owl:Class»Story Implementationimplementation of : Story [1]
Class neighborhood: Named Statement Implementation [1]

1.2.4 Story§

A description of an interaction in a use case, identifying its participating persona, inputs, outputs, implementations, and the outcomes it helps achieve.

ekg-story:Story
https://ekgf.org/ontology/story#Story
RDF predicateValue
rdf:typeowl:Class
rdfs:labelStory
owl:disjointWithekg-story:StoryImplementation
UML class diagram for Story. Diagram labels: «owl:Class»; Data Element Concept; (ekg-concept:; DataElement; Concept); «owl:Class»; Outcome; (ekg-outcome:Outcome); «owl:Class»; Story; «owl:Class»; Story Concept Usage; has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [1..*]; has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [0..1]; «owl:Class»; Story Implementation; implementation of : Story [1]; «owl:Class»; Story Stereotype; rdfs:comment; rdfs:label [1..*]; Markdown description (ekg-annotation:markdownDescription); contributes to; has concept usage; has stereotype; 0..1; has concept; (ekg-concept:hasConcept); 1; owl:; disjointWith; owl:; disjointWith; owl:; disjointWith; OWL restrictions are drawn as class-scoped members, associations and constraints. Qualified counts count only property values in the named target class or datatype; other values are not excluded. A constraint such as {no p} states that the class has no value of p, or {no p in C} none in the named target. A zero minimum imposes no restriction and is omitted visually. {redefines} marks a restriction on a property inherited from a superclass domain. Story Concept Usage owl:disjointWith Story. Story owl:disjointWith Story Implementation. Story Stereotype owl:disjointWith Story. contributes to rdfs:domain Story. contributes to rdfs:range Outcome (ekg-outcome:Outcome). has concept usage rdfs:domain Story. has concept usage rdfs:range Story Concept Usage.«owl:Class»Data Element Concept(ekg-concept:DataElementConcept)«owl:Class»Outcome(ekg-outcome:Outcome)«owl:Class»Story«owl:Class»Story Concept Usagehas concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [1..*]has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [0..1]«owl:Class»Story Implementationimplementation of : Story [1]«owl:Class»Story Stereotyperdfs:commentrdfs:label [1..*]Markdown description (ekg-annotation:markdownDescription)contributes tohas concept usagehas stereotype0..1has concept(ekg-concept:hasConcept)1owl:disjointWithowl:disjointWithowl:disjointWith
Class neighborhood: Story [1]

1.2.5 Story Concept Usage§

A story-owned relationship object with exactly one owning story and exactly one referenced data element concept. Its input, output, or dependent role describes the usage, not the reusable concept.

ekg-story:StoryConceptUsage
https://ekgf.org/ontology/story#StoryConceptUsage
RDF predicateValue
rdf:typeowl:Class
rdfs:labelStory Concept Usage
rdfs:subClassOf(rdf:type: owl:Restriction; owl:minCardinality: 1; owl:onProperty: (owl:inverseOf: ekg-story:hasConceptUsage))
rdfs:subClassOf(rdf:type: owl:Restriction; owl:minCardinality: 1; owl:onProperty: ekg-concept:hasConcept)
rdfs:subClassOf(rdf:type: owl:Restriction; owl:maxCardinality: 1; owl:onProperty: ekg-concept:hasConcept)
rdfs:subClassOf(rdf:type: owl:Restriction; owl:maxCardinality: 1; owl:onProperty: (owl:inverseOf: ekg-story:hasConceptUsage))
owl:disjointWithekg-concept:ConceptManifestation
owl:disjointWithekg-concept:DataElementConcept
owl:disjointWithekg-story:Story
UML class diagram for Story Concept Usage. Diagram labels: «owl:Class»; Concept Manifestation; (ekg-concept:; ConceptManifestation); «owl:Class»; Data Element Concept; (ekg-concept:; DataElement; Concept); «owl:Class»; Story; «owl:Class»; Story Concept Usage; «owl:Class»; Story Dependent; «owl:Class»; Story Input; is mandatory : xsd:boolean [0..1]; is server provided : xsd:boolean [0..1]; «owl:Class»; Story Stereotype; has stereotype; 0..1; has concept; (ekg-concept:hasConcept); 1; owl:; disjointWith; owl:; disjointWith; owl:; disjointWith; Story Concept Usage owl:disjointWith Concept Manifestation (ekg-concept:ConceptManifestation). Story Concept Usage owl:disjointWith Data Element Concept (ekg-concept:DataElementConcept). Story Concept Usage owl:disjointWith Story. Story Dependent rdfs:subClassOf Story Concept Usage. Story Input rdfs:subClassOf Story Concept Usage.«owl:Class»Concept Manifestation(ekg-concept:ConceptManifestation)«owl:Class»Data Element Concept(ekg-concept:DataElementConcept)«owl:Class»Story«owl:Class»Story Concept Usage«owl:Class»Story Dependent«owl:Class»Story Inputis mandatory : xsd:boolean [0..1]is server provided : xsd:boolean [0..1]«owl:Class»Story Stereotypehas stereotype0..1has concept(ekg-concept:hasConcept)1owl:disjointWithowl:disjointWithowl:disjointWith
Class neighborhood: Story Concept Usage [1]

1.2.6 Story Dependent§

This usage records a concept used inside the story's implementation without exposing it as an input or output, such as a join or filter concept. It is a subclass of StoryConceptUsage and the range of hasDependentConcept. The story owns the usage; concept:hasConcept points to the shared meaning. Input flags apply only to input usages.

ekg-story:StoryDependent
https://ekgf.org/ontology/story#StoryDependent
RDF predicateValue
rdf:typeowl:Class
rdfs:labelStory Dependent
rdfs:subClassOfekg-story:StoryConceptUsage
UML class diagram for Story Dependent. Diagram labels: «owl:Class»; Data Element Concept; (ekg-concept:; DataElement; Concept); «owl:Class»; Story; «owl:Class»; Story Concept Usage; has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [1..*]; has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [0..1]; «owl:Class»; Story Dependent; «owl:Class»; Story Input; is mandatory : xsd:boolean [0..1]; is server provided : xsd:boolean [0..1]; «owl:Class»; Story Output; «owl:Class»; Story Stereotype; has dependent concept; has stereotype; 0..1; has concept; (ekg-concept:hasConcept); 1; owl:; disjointWith; owl:; disjointWith; OWL restrictions are drawn as class-scoped members, associations and constraints. Qualified counts count only property values in the named target class or datatype; other values are not excluded. A constraint such as {no p} states that the class has no value of p, or {no p in C} none in the named target. A zero minimum imposes no restriction and is omitted visually. {redefines} marks a restriction on a property inherited from a superclass domain. Story Dependent rdfs:subClassOf Story Concept Usage. Story Input owl:disjointWith Story Dependent. Story Output owl:disjointWith Story Dependent. has dependent concept rdfs:domain Story. has dependent concept rdfs:range Story Dependent.«owl:Class»Data Element Concept(ekg-concept:DataElementConcept)«owl:Class»Story«owl:Class»Story Concept Usagehas concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [1..*]has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [0..1]«owl:Class»Story Dependent«owl:Class»Story Inputis mandatory : xsd:boolean [0..1]is server provided : xsd:boolean [0..1]«owl:Class»Story Output«owl:Class»Story Stereotypehas dependent concepthas stereotype0..1has concept(ekg-concept:hasConcept)1owl:disjointWithowl:disjointWith
Class neighborhood: Story Dependent [1]

1.2.7 Story Implementation§

Each implementation belongs to exactly one story through implementationOf. The inverse implementedBy lets a story refer to zero or more implementations. An implementation can evolve independently of its story and coexist with other implementations of that story.

The OWL cardinality restriction expresses ownership. SHACL validates actual owner assertions in either direction, rejecting missing owners and multiple owner terms. This validation is required because OWL's open-world semantics does not report a missing assertion as a data error, and functionality can equate owner names.

Validate within one coherent version context. Repeated assertions about the same story identity across snapshots still identify one owner. Different story-version IRIs count as different owner terms when their graphs are combined; historical snapshots must be validated in their intended contexts.

The ontology's Markdown description includes the validation command and migration from hasImplementation to the canonical inverse pair.

ekg-story:StoryImplementation
https://ekgf.org/ontology/story#StoryImplementation
RDF predicateValue
rdf:typeowl:Class
rdfs:labelStory Implementation
rdfs:subClassOf(rdf:type: owl:Restriction; owl:cardinality: 1; owl:onProperty: ekg-story:implementationOf)
UML class diagram for Story Implementation. Diagram labels: «owl:Class»; Agent Job Implementation; «owl:Class»; API Proxy Implementation; «owl:Class»; Named Statement; Implementation; «owl:Class»; Story; «owl:Class»; Story Implementation; «owl:Class»; Story Stereotype; rdfs:comment; rdfs:label [1..*]; Markdown description (ekg-annotation:markdownDescription); has stereotype; 0..1; owl:; disjointWith; owl:; disjointWith; Agent Job Implementation rdfs:subClassOf Story Implementation. API Proxy Implementation rdfs:subClassOf Story Implementation. Named Statement Implementation rdfs:subClassOf Story Implementation. Story owl:disjointWith Story Implementation. Story Stereotype owl:disjointWith Story Implementation.«owl:Class»Agent Job Implementation«owl:Class»API Proxy Implementation«owl:Class»Named StatementImplementation«owl:Class»Story«owl:Class»Story Implementation«owl:Class»Story Stereotyperdfs:commentrdfs:label [1..*]Markdown description (ekg-annotation:markdownDescription)has stereotype0..1owl:disjointWithowl:disjointWith
Class neighborhood: Story Implementation [1]

1.2.8 Story Input§

This resource describes how one story uses a reusable concept as an input. The story owns this usage object; ekg-concept:hasConcept references the shared data element concept. Separate stories use separate usage objects even when they reference the same concept.

This class is a subclass of StoryConceptUsage and the range of hasInputConcept. Input characteristics such as requiredness and server provision belong on the usage. Their false defaults are applied by the Story Service.

StoryInputShape validates the flags, and StoryConceptUsageShape validates the owner, concept, and usage role. See the ontology's Markdown description for validation and migration instructions.

ekg-story:StoryInput
https://ekgf.org/ontology/story#StoryInput
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:Class
rdfs:labelStory Input
rdfs:subClassOfekg-story:StoryConceptUsage
owl:disjointWithekg-story:StoryDependent
owl:disjointWithekg-story:StoryOutput
UML class diagram for Story Input. Diagram labels: «owl:Class»; Data Element Concept; (ekg-concept:; DataElement; Concept); «owl:Class»; Story; «owl:Class»; Story Concept Usage; has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [1..*]; has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [0..1]; «owl:Class»; Story Dependent; «owl:Class»; Story Input; is mandatory : xsd:boolean [0..1]; is server provided : xsd:boolean [0..1]; «owl:Class»; Story Output; «owl:Class»; Story Stereotype; has input concept; has stereotype; 0..1; has concept; (ekg-concept:hasConcept); 1; owl:; disjointWith; owl:; disjointWith; OWL restrictions are drawn as class-scoped members, associations and constraints. Qualified counts count only property values in the named target class or datatype; other values are not excluded. A constraint such as {no p} states that the class has no value of p, or {no p in C} none in the named target. A zero minimum imposes no restriction and is omitted visually. {redefines} marks a restriction on a property inherited from a superclass domain. Story Input rdfs:subClassOf Story Concept Usage. Story Input owl:disjointWith Story Dependent. Story Input owl:disjointWith Story Output. has input concept rdfs:domain Story. has input concept rdfs:range Story Input. is mandatory rdfs:domain Story Input. is mandatory rdfs:range xsd:boolean.«owl:Class»Data Element Concept(ekg-concept:DataElementConcept)«owl:Class»Story«owl:Class»Story Concept Usagehas concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [1..*]has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [0..1]«owl:Class»Story Dependent«owl:Class»Story Inputis mandatory : xsd:boolean [0..1]is server provided : xsd:boolean [0..1]«owl:Class»Story Output«owl:Class»Story Stereotypehas input concepthas stereotype0..1has concept(ekg-concept:hasConcept)1owl:disjointWithowl:disjointWith
Class neighborhood: Story Input [1]

1.2.9 Story Output§

This resource describes how one story uses a reusable concept as an output. The story owns the usage object; ekg-concept:hasConcept references the shared data element concept. A concept can describe a compound output, including the meaning represented by a whole class or shape.

This class is a subclass of StoryConceptUsage and the range of hasOutputConcept. The input flags do not apply to outputs. Use a separate input usage if the same concept is also an input to this story.

ekg-story:StoryOutput
https://ekgf.org/ontology/story#StoryOutput
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:Class
rdfs:labelStory Output
rdfs:subClassOfekg-story:StoryConceptUsage
owl:disjointWithekg-story:StoryDependent
UML class diagram for Story Output. Diagram labels: «owl:Class»; Data Element Concept; (ekg-concept:; DataElement; Concept); «owl:Class»; Story; «owl:Class»; Story Concept Usage; has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [1..*]; has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [0..1]; «owl:Class»; Story Dependent; «owl:Class»; Story Input; is mandatory : xsd:boolean [0..1]; is server provided : xsd:boolean [0..1]; «owl:Class»; Story Output; «owl:Class»; Story Stereotype; has output concept; has stereotype; 0..1; has concept; (ekg-concept:hasConcept); 1; owl:; disjointWith; owl:; disjointWith; OWL restrictions are drawn as class-scoped members, associations and constraints. Qualified counts count only property values in the named target class or datatype; other values are not excluded. A constraint such as {no p} states that the class has no value of p, or {no p in C} none in the named target. A zero minimum imposes no restriction and is omitted visually. {redefines} marks a restriction on a property inherited from a superclass domain. Story Output rdfs:subClassOf Story Concept Usage. Story Output owl:disjointWith Story Dependent. Story Input owl:disjointWith Story Output. has output concept rdfs:domain Story. has output concept rdfs:range Story Output.«owl:Class»Data Element Concept(ekg-concept:DataElementConcept)«owl:Class»Story«owl:Class»Story Concept Usagehas concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [1..*]has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [0..1]«owl:Class»Story Dependent«owl:Class»Story Inputis mandatory : xsd:boolean [0..1]is server provided : xsd:boolean [0..1]«owl:Class»Story Output«owl:Class»Story Stereotypehas output concepthas stereotype0..1has concept(ekg-concept:hasConcept)1owl:disjointWithowl:disjointWith
Class neighborhood: Story Output [1]

1.2.10 Story Stereotype§

hasStereoType assigns zero or one primary-purpose classification to a story. The built-in individuals are StoryStereoTypeQuery, StoryStereoTypeUpdate, StoryStereoTypeTransformationRule, and StoryStereoTypeValidationRule. They are distinct individuals of this class. Applications can define more stereotypes using their own IRIs with labels and meaningful definitions. No stereotype is inferred when the relationship is absent.

Classify the story's primary purpose. A validation story may be implemented by a query or an API; a transformation story may use a query, pipeline, or rule engine. A stereotype does not select an implementation, infer executable source, or assign isUpdate or isDeletion. Those properties retain their separately documented meanings. The word "Rule" does not imply SHACL.

A stereotype is not a Story subclass. Multiple stories can share one stereotype without acquiring the same identity. hasStereoType is functional, and the four built-ins are asserted distinct. OWL can equate otherwise unconstrained custom stereotype IRIs to satisfy functionality; SHACL instead rejects multiple supplied terms. Validate the intended version context before identity reasoning.

StoryClassificationShape checks assignments, and StoryStereoTypeShape checks definitions. Both belong to the Story Ontology's shapes graph. Existing unclassified stories remain valid. When migrating application-defined classifications, map terms by confirmed meaning and replace the relationship and object IRIs explicitly. Do not infer purpose from labels, flags, or the language of an implementation.

SHACL-based implementation selection and rule execution are separate modeling work. The stereotype guide contains examples, validation, and migration guidance.

ekg-story:StoryStereoType
https://ekgf.org/ontology/story#StoryStereoType
RDF predicateValue
rdf:typeowl:Class
rdfs:labelStory Stereotype
owl:disjointWithekg-story:Story
owl:disjointWithekg-story:StoryConceptUsage
owl:disjointWithekg-story:StoryImplementation
UML class diagram for Story Stereotype. Diagram labels: «owl:Class»; Data Element Concept; (ekg-concept:; DataElement; Concept); «owl:Class»; Story; «owl:Class»; Story Concept Usage; has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [1..*]; has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [0..1]; «owl:Class»; Story Implementation; implementation of : Story [1]; «owl:Class»; Story Stereotype; rdfs:comment; rdfs:label [1..*]; Markdown description (ekg-annotation:markdownDescription); has stereotype; 0..1; has concept; (ekg-concept:hasConcept); 1; owl:; disjointWith; owl:; disjointWith; owl:; disjointWith; OWL restrictions are drawn as class-scoped members, associations and constraints. Qualified counts count only property values in the named target class or datatype; other values are not excluded. A constraint such as {no p} states that the class has no value of p, or {no p in C} none in the named target. A zero minimum imposes no restriction and is omitted visually. {redefines} marks a restriction on a property inherited from a superclass domain. Story Stereotype owl:disjointWith Story. Story Stereotype owl:disjointWith Story Concept Usage. Story Stereotype owl:disjointWith Story Implementation. has stereotype rdfs:domain Story. has stereotype rdfs:range Story Stereotype.«owl:Class»Data Element Concept(ekg-concept:DataElementConcept)«owl:Class»Story«owl:Class»Story Concept Usagehas concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [1..*]has concept (ekg-concept:hasConcept) : Data Element Concept (ekg-concept:DataElementConcept) [0..1]«owl:Class»Story Implementationimplementation of : Story [1]«owl:Class»Story Stereotyperdfs:commentrdfs:label [1..*]Markdown description (ekg-annotation:markdownDescription)has stereotype0..1has concept(ekg-concept:hasConcept)1owl:disjointWithowl:disjointWithowl:disjointWith
Class neighborhood: Story Stereotype [1]

1.2.11 Workflow Implementation§

A story implementation expressed as a workflow of execution steps.

ekg-story:WorkflowImplementation
https://ekgf.org/ontology/story#WorkflowImplementation
RDF predicateValue
rdf:typeowl:Class
rdfs:labelWorkflow Implementation
rdfs:subClassOfekg-story:StoryImplementation
UML class diagram for Workflow Implementation. Diagram labels: «owl:Class»; Story Implementation; implementation of : Story [1]; «owl:Class»; Workflow Implementation; OWL restrictions are drawn as class-scoped members, associations and constraints. Qualified counts count only property values in the named target class or datatype; other values are not excluded. A constraint such as {no p} states that the class has no value of p, or {no p in C} none in the named target. A zero minimum imposes no restriction and is omitted visually. {redefines} marks a restriction on a property inherited from a superclass domain. Workflow Implementation rdfs:subClassOf Story Implementation.«owl:Class»Story Implementationimplementation of : Story [1]«owl:Class»Workflow Implementation
Class neighborhood: Workflow Implementation [1]

1.3 Properties§

1.3.1 contributes to§

The business outcome this story contributes to.

ekg-story:contributesTo
https://ekgf.org/ontology/story#contributesTo
RDF predicateValue
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:Story
rdfs:labelcontributes to
rdfs:rangeekg-outcome:Outcome

1.3.2 expected usage role§

Maps a concept:StatementPosition to the Story usage role that a sighting in that position implies for the sighted concept:

PositionExpected usageReason
concept:ParameterPositionStoryInputThe invocation supplies the value.
concept:ProjectionPositionStoryOutputThe story returns it as a result.
concept:GraphTemplatePositionStoryOutputThe story constructs or adds it.
concept:GraphPatternPositionStoryDependentThe story only matches it against data.

The value is one of the three usage classes. The property is an annotation, so OWL does not treat those classes as individuals. An application-defined position compared with Story declarations must declare its expected role; StatementPositionUsageRoleShape rejects positions without exactly one.

The mapping classifies evidence. It never creates a usage or changes a declared one. UndeclaredConceptUsageShape compares the expectations with the story's declared usages.

ekg-story:expectedUsageRole
https://ekgf.org/ontology/story#expectedUsageRole
RDF predicateValue
rdf:typeowl:AnnotationProperty
rdfs:labelexpected usage role

1.3.3 has concept usage§

Links a story to a concept-usage object owned by that story. Different stories use separate usage objects when referencing the same reusable concept.

ekg-story:hasConceptUsage
https://ekgf.org/ontology/story#hasConceptUsage
RDF predicateValue
rdf:typeowl:InverseFunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:Story
rdfs:labelhas concept usage
rdfs:rangeekg-story:StoryConceptUsage

1.3.4 has dependent concept§

Links a story to a dependent-concept usage referencing a shared data element concept used internally rather than exposed as an input or output.

ekg-story:hasDependentConcept
https://ekgf.org/ontology/story#hasDependentConcept
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:Story
rdfs:labelhas dependent concept
rdfs:rangeekg-story:StoryDependent
rdfs:subPropertyOfekg-story:hasConceptUsage

1.3.5 has input concept§

Links a story to its input-concept usage. The usage references a shared data element concept through concept:hasConcept and carries the story's input requirements.

ekg-story:hasInputConcept
https://ekgf.org/ontology/story#hasInputConcept
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:Story
rdfs:labelhas input concept
rdfs:rangeekg-story:StoryInput
rdfs:subPropertyOfekg-story:hasConceptUsage

1.3.6 has output concept§

Links a story to an output-concept usage referencing the shared data element concept produced by the story.

ekg-story:hasOutputConcept
https://ekgf.org/ontology/story#hasOutputConcept
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:Story
rdfs:labelhas output concept
rdfs:rangeekg-story:StoryOutput
rdfs:subPropertyOfekg-story:hasConceptUsage

1.3.7 has stereotype§

Assigns a story's optional primary-purpose classification. A story has at most one stereotype; no default is inferred. Stereotypes classify the story's intent independently of implementation language, mechanism, and mutation flags.

ekg-story:hasStereoType
https://ekgf.org/ontology/story#hasStereoType
RDF predicateValue
rdf:typeowl:FunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:Story
rdfs:labelhas stereotype
rdfs:rangeekg-story:StoryStereoType

1.3.8 implementation of§

Identifies the one story implemented by this resource. It is functional and the inverse of implementedBy. StoryImplementationShape counts owners from both directions, so duplicating an assertion in its inverse form still identifies one owner, while conflicting links are rejected.

ekg-story:implementationOf
https://ekgf.org/ontology/story#implementationOf
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:FunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:StoryImplementation
rdfs:labelimplementation of
rdfs:rangeekg-story:Story
owl:inverseOfekg-story:implementedBy

1.3.9 Implementation Type§

Coarse implementation type. Supported values: NamedStatement, ApiProxy, Workflow, AgentJob, Pipeline, UiAction.

ekg-story:implementationType
https://ekgf.org/ontology/story#implementationType
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story:StoryImplementation
rdfs:labelImplementation Type
rdfs:rangexsd:token

1.3.10 implemented by§

Links a story to each of its implementations. Its inverse is implementationOf; asserting either direction lets an OWL reasoner derive the other. Several implementations can belong to the same story.

Execution selection belongs to the Story Service's execution context. This relationship records ownership of implementations. The retired hasImplementation predicate must be migrated to this predicate.

ekg-story:implementedBy
https://ekgf.org/ontology/story#implementedBy
RDF predicateValue
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:Story
rdfs:labelimplemented by
rdfs:rangeekg-story:StoryImplementation

1.3.11 is deletion§

The story deletes. It is invoked by DELETE, and refuses a GET; how a story mutates is a property of the story, never a subclass of it.

ekg-story:isDeletion
https://ekgf.org/ontology/story#isDeletion
RDF predicateValue
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story:Story
rdfs:labelis deletion
rdfs:rangexsd:boolean

1.3.12 is mandatory§

Whether this story's input-concept usage is required for execution. A Story Service interprets an absent value as false; OWL and SHACL validation do not insert a value.

ekg-story:isMandatory
https://ekgf.org/ontology/story#isMandatory
RDF predicateValue
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story:StoryInput
rdfs:labelis mandatory
rdfs:rangexsd:boolean

1.3.13 Is Plural§

Do not use, use isSingular

ekg-story:isPlural
https://ekgf.org/ontology/story#isPlural
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story:Story
rdfs:labelIs Plural
rdfs:rangexsd:boolean
owl:propertyDisjointWithekg-story:isSingular

1.3.14 is server provided§

Whether the Story Service supplies this story's input concept. Independent of requiredness. A Story Service interprets an absent value as false; the flag does not specify how the value is generated or injected.

ekg-story:isServerProvided
https://ekgf.org/ontology/story#isServerProvided
RDF predicateValue
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story:StoryInput
rdfs:labelis server provided
rdfs:rangexsd:boolean

1.3.15 Is Singular§

Means that the user story results in a singular Thing as its output

ekg-story:isSingular
https://ekgf.org/ontology/story#isSingular
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story:Story
rdfs:labelIs Singular
rdfs:rangexsd:boolean

1.3.16 Is Update§

Means that the user story mutates the database by insert or delete statements

ekg-story:isUpdate
https://ekgf.org/ontology/story#isUpdate
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story:Story
rdfs:labelIs Update
rdfs:rangexsd:boolean

1.3.17 not found on empty§

A singular story that returns no rows answers 404 rather than an empty object.

ekg-story:notFoundOnEmpty
https://ekgf.org/ontology/story#notFoundOnEmpty
RDF predicateValue
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story:Story
rdfs:labelnot found on empty
rdfs:rangexsd:boolean

1.3.18 Played By§

Identifies the persona playing the actor role in a story. The functional-property axiom limits a story to one persona through this property.

ekg-story:playedBy
https://ekgf.org/ontology/story#playedBy
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:FunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:Story
rdfs:labelPlayed By
rdfs:rangeekg-persona:Persona

1.3.19 provided by§

The provider a story is supplied by. No range is asserted: every assertion in the corpus points at a resource the corpus does not define, so the intended class is not evidenced.

ekg-story:providedBy
https://ekgf.org/ontology/story#providedBy
RDF predicateValue
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:Story
rdfs:labelprovided by

1.4 Named Individuals§

1.4.1 Query§

Instance of: ekg-story:StoryStereoType

A story whose primary purpose is to retrieve or present information. This classification does not select a query language, implementation mechanism, or mutation-flag value.

ekg-story:StoryStereoTypeQuery
https://ekgf.org/ontology/story#StoryStereoTypeQuery
RDF predicateValue
rdf:typeowl:NamedIndividual
rdf:typeekg-story:StoryStereoType
rdfs:labelQuery
owl:differentFromekg-story:StoryStereoTypeTransformationRule
owl:differentFromekg-story:StoryStereoTypeUpdate
owl:differentFromekg-story:StoryStereoTypeValidationRule

1.4.2 Transformation Rule§

Instance of: ekg-story:StoryStereoType

A story whose primary purpose is to derive or transform data according to a rule. This does not require SHACL, SPARQL, or any particular rule engine, and does not specify whether derived data is persisted.

ekg-story:StoryStereoTypeTransformationRule
https://ekgf.org/ontology/story#StoryStereoTypeTransformationRule
RDF predicateValue
rdf:typeowl:NamedIndividual
rdf:typeekg-story:StoryStereoType
rdfs:labelTransformation Rule
owl:differentFromekg-story:StoryStereoTypeValidationRule

1.4.3 Update§

Instance of: ekg-story:StoryStereoType

A story whose primary purpose is to apply an explicitly requested change to data. This describes the intended action, independently of the implementation technology and separately recorded mutation flags.

ekg-story:StoryStereoTypeUpdate
https://ekgf.org/ontology/story#StoryStereoTypeUpdate
RDF predicateValue
rdf:typeowl:NamedIndividual
rdf:typeekg-story:StoryStereoType
rdfs:labelUpdate
owl:differentFromekg-story:StoryStereoTypeTransformationRule
owl:differentFromekg-story:StoryStereoTypeValidationRule

1.4.4 Validation Rule§

Instance of: ekg-story:StoryStereoType

A story whose primary purpose is to assess data against requirements and report conformance or violations. The classification does not determine whether the implementation uses SHACL constraints, a query, an API, or another mechanism.

ekg-story:StoryStereoTypeValidationRule
https://ekgf.org/ontology/story#StoryStereoTypeValidationRule
RDF predicateValue
rdf:typeowl:NamedIndividual
rdf:typeekg-story:StoryStereoType
rdfs:labelValidation Rule

1.5 Shapes§

1.5.1 Legacy Concept Usage Shape§

Rejects retired story input/output predicates, parameter classification classes, and the story-level server-provided flag. Data must migrate to typed concept usages and input flags.

ekg-story:LegacyConceptUsageShape
https://ekgf.org/ontology/story#LegacyConceptUsageShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelLegacy Concept Usage Shape
sh:not(sh:or: ((sh:class: ekg-story:MandatoryParameter), (sh:class: ekg-story:OptionalParameter), (sh:class: ekg-story:OptionalStoryOutput)))
sh:property(sh:maxCount: 0; sh:message: hasInput was removed. Use hasInputConcept to link to a StoryInput usage object.; sh:path: ekg-story:hasInput)
sh:property(sh:maxCount: 0; sh:message: hasOutput was removed. Use hasOutputConcept to link to a StoryOutput usage object.; sh:path: ekg-story:hasOutput)
sh:property(sh:maxCount: 0; sh:message: serverProvidedIRI was removed. Identify the input usage and set isServerProvided on that usage.; sh:path: ekg-story:serverProvidedIRI)
sh:targetClassekg-story:MandatoryParameter
sh:targetClassekg-story:OptionalParameter
sh:targetClassekg-story:OptionalStoryOutput
sh:targetSubjectsOfekg-story:hasInput
sh:targetSubjectsOfekg-story:hasOutput
sh:targetSubjectsOfekg-story:serverProvidedIRI

1.5.2 Legacy Implementation Shape§

Rejects the retired hasImplementation predicate. Story implementation links use implementedBy and its inverse implementationOf.

ekg-story:LegacyImplementationShape
https://ekgf.org/ontology/story#LegacyImplementationShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelLegacy Implementation Shape
sh:property(sh:maxCount: 0; sh:message: hasImplementation was removed. Use implementedBy or its inverse implementationOf.; sh:path: ekg-story:hasImplementation)
sh:targetSubjectsOfekg-story:hasImplementation

1.5.3 Statement Position Usage Role Shape§

Targets each object of concept:statementPosition. The position must identify exactly one of StoryInput, StoryOutput or StoryDependent through expectedUsageRole. This prevents a missing mapping from silently disabling the undeclared-usage comparison, for example when the Story Ontology was not supplied as the ontology graph.

ekg-story:StatementPositionUsageRoleShape
https://ekgf.org/ontology/story#StatementPositionUsageRoleShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelStatement Position Usage Role Shape
sh:property(sh:in: (ekg-story:StoryInput, ekg-story:StoryOutput, ekg-story:StoryDependent); sh:maxCount: 1; sh:message: A statement position compared with Story declarations must identify exactly one expected usage role: StoryInput, StoryOutput or StoryDependent. Supply the Story Ontology as the ontology graph for the built-in positions.; sh:minCount: 1; sh:path: ekg-story:expectedUsageRole)
sh:targetObjectsOfekg-concept:statementPosition

1.5.4 Story Classification Shape§

Validates optional primary-purpose classification on stories, rejecting multiple stereotype terms, nonresource stories, and classification assigned to implementations, concept usages, or stereotype resources.

ekg-story:StoryClassificationShape
https://ekgf.org/ontology/story#StoryClassificationShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelStory Classification Shape
sh:nodeKindsh:BlankNodeOrIRI
sh:not(sh:or: ((sh:class: ekg-story:StoryImplementation), (sh:class: ekg-story:StoryConceptUsage), (sh:class: ekg-story:StoryStereoType)))
sh:property(sh:class: ekg-story:StoryStereoType; sh:maxCount: 1; sh:message: A story may have at most one primary-purpose stereotype, identified by an IRI.; sh:nodeKind: sh:IRI; sh:path: ekg-story:hasStereoType)
sh:targetClassekg-story:Story
sh:targetSubjectsOfekg-story:hasStereoType

1.5.5 Story Concept Usage Shape§

Validates one owning story, one referenced concept, and exactly one input, output, or dependent role. Usage objects are distinct from stories, concepts, and manifestations.

ekg-story:StoryConceptUsageShape
https://ekgf.org/ontology/story#StoryConceptUsageShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelStory Concept Usage Shape
sh:nodeKindsh:BlankNodeOrIRI
sh:not(sh:or: ((sh:class: ekg-story:Story), (sh:class: ekg-concept:DataElementConcept), (sh:class: ekg-concept:ConceptManifestation)))
sh:property(sh:class: ekg-story:Story; sh:maxCount: 1; sh:message: A concept usage must belong to exactly one story, counting general and specialized usage links together.; sh:minCount: 1; sh:nodeKind: sh:BlankNodeOrIRI; sh:path: (sh:inversePath: (sh:alternativePath: (ekg-story:hasConceptUsage, ekg-story:hasInputConcept, ekg-story:hasOutputConcept, ekg-story:hasDependentConcept))))
sh:property(sh:class: ekg-concept:DataElementConcept; sh:maxCount: 1; sh:message: A concept usage must reference exactly one reusable data element concept through concept:hasConcept.; sh:minCount: 1; sh:nodeKind: sh:BlankNodeOrIRI; sh:path: ekg-concept:hasConcept)
sh:targetClassekg-story:StoryConceptUsage
sh:targetObjectsOfekg-story:hasConceptUsage
sh:targetObjectsOfekg-story:hasDependentConcept
sh:targetObjectsOfekg-story:hasInputConcept
sh:targetObjectsOfekg-story:hasOutputConcept
sh:targetSubjectsOfekg-story:isMandatory
sh:targetSubjectsOfekg-story:isServerProvided
sh:xone((sh:class: ekg-story:StoryInput), (sh:class: ekg-story:StoryOutput), (sh:class: ekg-story:StoryDependent))

1.5.6 Story Implementation Shape§

Validates exactly one owning story per implementation in the supplied version context. Counts both directions without requiring OWL inverse inference, including untyped relationship endpoints and implementation metadata.

ekg-story:StoryImplementationShape
https://ekgf.org/ontology/story#StoryImplementationShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelStory Implementation Shape
sh:nodeKindsh:BlankNodeOrIRI
sh:property(sh:class: ekg-story:Story; sh:maxCount: 1; sh:message: A story implementation must belong to exactly one story, counting both implementationOf and inverse implementedBy links.; sh:minCount: 1; sh:nodeKind: sh:BlankNodeOrIRI; sh:path: (sh:alternativePath: (ekg-story:implementationOf, (sh:inversePath: ekg-story:implementedBy))))
sh:targetClassekg-story:StoryImplementation
sh:targetObjectsOfekg-story:implementedBy
sh:targetSubjectsOfekg-story:implementationOf
sh:targetSubjectsOfekg-story:implementationType

1.5.7 Story Input Shape§

Validates optional, single-valued boolean input flags and records their false application defaults without materializing them.

ekg-story:StoryInputShape
https://ekgf.org/ontology/story#StoryInputShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelStory Input Shape
sh:property(sh:datatype: xsd:boolean; sh:defaultValue: false; sh:maxCount: 1; sh:name: Is mandatory; sh:path: ekg-story:isMandatory)
sh:property(sh:datatype: xsd:boolean; sh:defaultValue: false; sh:maxCount: 1; sh:name: Is server provided; sh:path: ekg-story:isServerProvided)
sh:targetClassekg-story:StoryInput
sh:targetObjectsOfekg-story:hasInputConcept
sh:targetSubjectsOfekg-story:isMandatory
sh:targetSubjectsOfekg-story:isServerProvided

1.5.8 Story Stereotype Shape§

Requires a stereotype IRI, a nonempty literal label, and a nonempty literal definition in rdfs:comment or markdownDescription. Covers built-in and application-defined stereotypes, including subclasses; the vocabulary is not a closed enumeration.

ekg-story:StoryStereoTypeShape
https://ekgf.org/ontology/story#StoryStereoTypeShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelStory Stereotype Shape
sh:nodeKindsh:IRI
sh:not(sh:or: ((sh:class: ekg-story:Story), (sh:class: ekg-story:StoryImplementation), (sh:class: ekg-story:StoryConceptUsage)))
sh:or((sh:property: (sh:minCount: 1; sh:path: rdfs:comment)), (sh:property: (sh:minCount: 1; sh:path: ekg-annotation:markdownDescription)))
sh:property(sh:minLength: 1; sh:nodeKind: sh:Literal; sh:path: rdfs:comment)
sh:property(sh:minCount: 1; sh:minLength: 1; sh:nodeKind: sh:Literal; sh:path: rdfs:label)
sh:property(sh:minLength: 1; sh:nodeKind: sh:Literal; sh:path: ekg-annotation:markdownDescription)
sh:targetClassekg-story:StoryStereoType
sh:targetObjectsOfekg-story:hasStereoType

1.5.9 Undeclared Concept Usage Shape§

Compares sightings in a story implementation with the concept usages that its story declares, and reports gaps as warnings: quality findings for review, not structural violations. A sighting is in scope when it is foundIn the implementation and has a statement position. The implementation's story is found through implementationOf or inverse implementedBy. The sighted concept is found from the occurrence's manifestation, through concept:hasManifestation or concept:concept. With RDFS inference, preferred-manifestation links count as hasManifestation.

For each implementation and concept:

  • A position expecting StoryInput requires an input usage of the concept.
  • A position expecting StoryOutput requires an output usage of the concept.
  • If the concept is sighted only in positions expecting StoryDependent, any declared usage of it satisfies the expectation. Graph patterns also use inputs and outputs. A concept with no declared usage is reported as an expected dependent.

Input or output evidence takes the place of the dependent expectation. Each missing role is reported once per implementation and concept, however many sightings support it. The result's value is the concept, and its message names the expected role.

The warnings rely on the harvested evidence. Missing sightings are not reported: harvest coverage, indirect use, template rendering and service-side input handling can all hide a use. Validate a coherent version context, with the Story Ontology as the ontology graph so that the position mappings are present. Allowing warnings, for example with pyshacl --allow-warnings, keeps these findings visible while only violations fail conformance. See the sightings guide for an executable example.

ekg-story:UndeclaredConceptUsageShape
https://ekgf.org/ontology/story#UndeclaredConceptUsageShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelUndeclared Concept Usage Shape
sh:severitysh:Warning
sh:sparql(sh:message: Used, not declared: concept {?value} was sighted in this implementation in a position expecting a {?role} usage, but the implemented story declares no such usage of it.; sh:select: SPARQL SELECT query 1)
sh:sparql(sh:message: Used, not declared: concept {?value} was sighted in this implementation only in positions expecting a {?role} usage, and the implemented story declares no usage of it.; sh:select: SPARQL SELECT query 2)
sh:targetClassekg-story:StoryImplementation
sh:targetObjectsOfekg-story:implementedBy
sh:targetSubjectsOfekg-story:implementationOf
1.5.9.1 SPARQL query 1§

Used, not declared: concept {?value} was sighted in this implementation in a position expecting a {?role} usage, but the implemented story declares no such usage of it.

PREFIX concept: <https://ekgf.org/ontology/concept#>
PREFIX story: <https://ekgf.org/ontology/story#>
SELECT DISTINCT $this ?value ?role WHERE {
    $this story:implementationOf|^story:implementedBy ?story .
    ?sighting concept:foundIn $this ;
        concept:statementPosition/story:expectedUsageRole ?role ;
        concept:occurrenceOf/(^concept:hasManifestation|concept:concept) ?value .
    FILTER (?role IN (story:StoryInput, story:StoryOutput))
    FILTER NOT EXISTS {
        ?story story:hasConceptUsage|story:hasInputConcept|story:hasOutputConcept|story:hasDependentConcept ?usage .
        ?usage concept:hasConcept ?value .
        { ?usage a ?role }
        UNION { ?story story:hasInputConcept ?usage . FILTER (?role = story:StoryInput) }
        UNION { ?story story:hasOutputConcept ?usage . FILTER (?role = story:StoryOutput) }
    }
}
1.5.9.2 SPARQL query 2§

Used, not declared: concept {?value} was sighted in this implementation only in positions expecting a {?role} usage, and the implemented story declares no usage of it.

PREFIX concept: <https://ekgf.org/ontology/concept#>
PREFIX story: <https://ekgf.org/ontology/story#>
SELECT DISTINCT $this ?value ?role WHERE {
    $this story:implementationOf|^story:implementedBy ?story .
    ?sighting concept:foundIn $this ;
        concept:statementPosition/story:expectedUsageRole story:StoryDependent ;
        concept:occurrenceOf/(^concept:hasManifestation|concept:concept) ?value .
    BIND (story:StoryDependent AS ?role)
    FILTER NOT EXISTS {
        ?evidence concept:foundIn $this ;
            concept:statementPosition/story:expectedUsageRole ?evidenceRole ;
            concept:occurrenceOf/(^concept:hasManifestation|concept:concept) ?value .
        FILTER (?evidenceRole != story:StoryDependent)
    }
    FILTER NOT EXISTS {
        ?story story:hasConceptUsage|story:hasInputConcept|story:hasOutputConcept|story:hasDependentConcept ?usage .
        ?usage concept:hasConcept ?value .
    }
}

Document provenance

Search this specification