Story Ontology
EKGF Editor's Draft
1. Story Ontology§
1.1 Overview§
Story Ontology
| Identifier | Value |
|---|---|
| Ontology IRI / Namespace | https://ekgf.org/ontology/story# |
| Prefix | ekg-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 predicate | Range of the predicate |
|---|---|
hasInputConcept | StoryInput |
hasOutputConcept | StoryOutput |
hasDependentConcept | StoryDependent |
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 predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Agent Job Implementation |
rdfs:subClassOf | ekg-story:StoryImplementation |
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 predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | API Proxy Implementation |
rdfs:subClassOf | ekg-story:StoryImplementation |
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 predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Named Statement Implementation |
rdfs:subClassOf | ekg-story:StoryImplementation |
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 predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Story |
owl:disjointWith | ekg-story:StoryImplementation |
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 predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Story 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:disjointWith | ekg-concept:ConceptManifestation |
owl:disjointWith | ekg-concept:DataElementConcept |
owl:disjointWith | ekg-story:Story |
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 predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Story Dependent |
rdfs:subClassOf | ekg-story:StoryConceptUsage |
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 predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Story Implementation |
rdfs:subClassOf | (rdf:type: owl:Restriction; owl:cardinality: 1; owl:onProperty: ekg-story:implementationOf) |
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 predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:Class |
rdfs:label | Story Input |
rdfs:subClassOf | ekg-story:StoryConceptUsage |
owl:disjointWith | ekg-story:StoryDependent |
owl:disjointWith | ekg-story:StoryOutput |
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 predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:Class |
rdfs:label | Story Output |
rdfs:subClassOf | ekg-story:StoryConceptUsage |
owl:disjointWith | ekg-story:StoryDependent |
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 predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Story Stereotype |
owl:disjointWith | ekg-story:Story |
owl:disjointWith | ekg-story:StoryConceptUsage |
owl:disjointWith | ekg-story:StoryImplementation |
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 predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Workflow Implementation |
rdfs:subClassOf | ekg-story:StoryImplementation |
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 predicate | Value |
|---|---|
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | contributes to |
rdfs:range | ekg-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:
| Position | Expected usage | Reason |
|---|---|---|
concept:ParameterPosition | StoryInput | The invocation supplies the value. |
concept:ProjectionPosition | StoryOutput | The story returns it as a result. |
concept:GraphTemplatePosition | StoryOutput | The story constructs or adds it. |
concept:GraphPatternPosition | StoryDependent | The 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 predicate | Value |
rdf:type | owl:AnnotationProperty |
rdfs:label | expected 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 predicate | Value |
|---|---|
rdf:type | owl:InverseFunctionalProperty |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | has concept usage |
rdfs:range | ekg-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 predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | has dependent concept |
rdfs:range | ekg-story:StoryDependent |
rdfs:subPropertyOf | ekg-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 predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | has input concept |
rdfs:range | ekg-story:StoryInput |
rdfs:subPropertyOf | ekg-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 predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | has output concept |
rdfs:range | ekg-story:StoryOutput |
rdfs:subPropertyOf | ekg-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 predicate | Value |
|---|---|
rdf:type | owl:FunctionalProperty |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | has stereotype |
rdfs:range | ekg-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 predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:FunctionalProperty |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story:StoryImplementation |
rdfs:label | implementation of |
rdfs:range | ekg-story:Story |
owl:inverseOf | ekg-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 predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:DatatypeProperty |
rdf:type | owl:FunctionalProperty |
rdfs:domain | ekg-story:StoryImplementation |
rdfs:label | Implementation Type |
rdfs:range | xsd: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 predicate | Value |
|---|---|
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | implemented by |
rdfs:range | ekg-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 predicate | Value |
|---|---|
rdf:type | owl:DatatypeProperty |
rdf:type | owl:FunctionalProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | is deletion |
rdfs:range | xsd: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 predicate | Value |
|---|---|
rdf:type | owl:DatatypeProperty |
rdf:type | owl:FunctionalProperty |
rdfs:domain | ekg-story:StoryInput |
rdfs:label | is mandatory |
rdfs:range | xsd:boolean |
1.3.13 Is Plural§
Do not use, use isSingular
ekg-story:isPlural | |
https://ekgf.org/ontology/story#isPlural | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:DatatypeProperty |
rdf:type | owl:FunctionalProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | Is Plural |
rdfs:range | xsd:boolean |
owl:propertyDisjointWith | ekg-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 predicate | Value |
|---|---|
rdf:type | owl:DatatypeProperty |
rdf:type | owl:FunctionalProperty |
rdfs:domain | ekg-story:StoryInput |
rdfs:label | is server provided |
rdfs:range | xsd: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 predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:DatatypeProperty |
rdf:type | owl:FunctionalProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | Is Singular |
rdfs:range | xsd: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 predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:DatatypeProperty |
rdf:type | owl:FunctionalProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | Is Update |
rdfs:range | xsd: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 predicate | Value |
|---|---|
rdf:type | owl:DatatypeProperty |
rdf:type | owl:FunctionalProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | not found on empty |
rdfs:range | xsd: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 predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:FunctionalProperty |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | Played By |
rdfs:range | ekg-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 predicate | Value |
|---|---|
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | provided 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 predicate | Value |
|---|---|
rdf:type | owl:NamedIndividual |
rdf:type | ekg-story:StoryStereoType |
rdfs:label | Query |
owl:differentFrom | ekg-story:StoryStereoTypeTransformationRule |
owl:differentFrom | ekg-story:StoryStereoTypeUpdate |
owl:differentFrom | ekg-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 predicate | Value |
|---|---|
rdf:type | owl:NamedIndividual |
rdf:type | ekg-story:StoryStereoType |
rdfs:label | Transformation Rule |
owl:differentFrom | ekg-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 predicate | Value |
|---|---|
rdf:type | owl:NamedIndividual |
rdf:type | ekg-story:StoryStereoType |
rdfs:label | Update |
owl:differentFrom | ekg-story:StoryStereoTypeTransformationRule |
owl:differentFrom | ekg-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 predicate | Value |
|---|---|
rdf:type | owl:NamedIndividual |
rdf:type | ekg-story:StoryStereoType |
rdfs:label | Validation 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 predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Legacy 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:targetClass | ekg-story:MandatoryParameter |
sh:targetClass | ekg-story:OptionalParameter |
sh:targetClass | ekg-story:OptionalStoryOutput |
sh:targetSubjectsOf | ekg-story:hasInput |
sh:targetSubjectsOf | ekg-story:hasOutput |
sh:targetSubjectsOf | ekg-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 predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Legacy Implementation Shape |
sh:property | (sh:maxCount: 0; sh:message: hasImplementation was removed. Use implementedBy or its inverse implementationOf.; sh:path: ekg-story:hasImplementation) |
sh:targetSubjectsOf | ekg-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 predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Statement 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:targetObjectsOf | ekg-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 predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Story Classification Shape |
sh:nodeKind | sh: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:targetClass | ekg-story:Story |
sh:targetSubjectsOf | ekg-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 predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Story Concept Usage Shape |
sh:nodeKind | sh: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:targetClass | ekg-story:StoryConceptUsage |
sh:targetObjectsOf | ekg-story:hasConceptUsage |
sh:targetObjectsOf | ekg-story:hasDependentConcept |
sh:targetObjectsOf | ekg-story:hasInputConcept |
sh:targetObjectsOf | ekg-story:hasOutputConcept |
sh:targetSubjectsOf | ekg-story:isMandatory |
sh:targetSubjectsOf | ekg-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 predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Story Implementation Shape |
sh:nodeKind | sh: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:targetClass | ekg-story:StoryImplementation |
sh:targetObjectsOf | ekg-story:implementedBy |
sh:targetSubjectsOf | ekg-story:implementationOf |
sh:targetSubjectsOf | ekg-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 predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Story 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:targetClass | ekg-story:StoryInput |
sh:targetObjectsOf | ekg-story:hasInputConcept |
sh:targetSubjectsOf | ekg-story:isMandatory |
sh:targetSubjectsOf | ekg-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 predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Story Stereotype Shape |
sh:nodeKind | sh: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:targetClass | ekg-story:StoryStereoType |
sh:targetObjectsOf | ekg-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
StoryInputrequires an input usage of the concept. - A position expecting
StoryOutputrequires 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 predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Undeclared Concept Usage Shape |
sh:severity | sh: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:targetClass | ekg-story:StoryImplementation |
sh:targetObjectsOf | ekg-story:implementedBy |
sh:targetSubjectsOf | ekg-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 .
}
}