Story Service Ontology
EKGF Editor's Draft
1. Story Service Ontology§
1.1 Overview§
Story Service Ontology
| Identifier | Value |
|---|---|
| Ontology IRI / Namespace | https://ekgf.org/ontology/story-service# |
| Prefix | ekg-story-service |
A Story Service is an application that executes stories through their implementations. The story describes business concept usage; an implementation binds that usage to technical manifestations such as API names or SPARQL variables. Reusing a concept preserves its meaning across implementations.
1.1.1 Input-concept defaults§
The story model gives each story its own StoryInput usage objects,
referencing shared data element concepts. On each input usage:
| Flag | Meaning when true | Effective value when absent |
|---|---|---|
ekg-story:isMandatory | The input is required for execution. | false |
ekg-story:isServerProvided | The Story Service supplies the input. | false |
The flags are independent. An input can be required for execution and supplied by the service. Explicit values take precedence over the declared defaults. The service must reject invalid or conflicting values.
Missing flag assertions remain valid. A Story Service applies the false defaults when executing a story. Storing explicit false triples is optional; consumers must not assume that loading or validating the RDF populated them.
The Story Ontology's SHACL shapes declare sh:defaultValue false and validate
supplied boolean values with a maximum count of one. SHACL Core default-value
annotations do not populate data, and OWL does not infer false from an
absent assertion. See SHACL default values.
1.1.2 Business concepts and technical bindings§
The Story Ontology declares the common usage
class, specialized story predicates, input flags, and validation shapes.
Its input flags describe a particular story's use of a shared concept.
This source's Parameter, Result, and statement properties describe a
technical statement interface; they do not replace story concept usages or
establish a mapping to a particular execution binding. Variable manifestations
record technical expressions independently of the mechanism used to supply
their values.
For a statement template, a template processor renders the source using the story's validated input values before parsing and executing the resulting SPARQL query or update. Support must be limited to explicitly documented language profiles. Value substitution requires RDF-aware serialization and escaping; shell evaluation and arbitrary query-fragment insertion are not input-value substitution. Unresolved placeholders and invalid generated statements are execution errors. A template-placeholder manifestation does not select or certify a template engine.
The SPARQL Story Implementation Ontology declares
StorySPARQLTemplateImplementation, which selects a template document and
renderer through hasTemplate and usesRenderer. The document's
concept:templateLanguage identifies its source language/profile, and the
renderer declares matching supportsTemplateLanguage capabilities. The
placeholder manifestation also identifies its template language. The service
renders that document into a separate SPARQL statement for each invocation;
the generated text is parsed before it is sent for execution.
1.2 Classes§
1.2.1 Parameter§
A parameter description used by an executable statement in the story service. Parameters are distinct from statements and service instances.
ekg-story-service:Parameter | |
https://ekgf.org/ontology/story-service#Parameter | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Parameter |
owl:disjointWith | ekg-story-service:Statement |
owl:disjointWith | ekg-story-service:StoryService |
1.2.2 Result§
A description of an output supplied by a story-service execution.
ekg-story-service:Result | |
https://ekgf.org/ontology/story-service#Result | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Result |
1.2.3 SHACL Statement§
A story-service statement expressed using SHACL.
ekg-story-service:SHACLStatement | |
https://ekgf.org/ontology/story-service#SHACLStatement | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:Class |
rdfs:label | SHACL Statement |
rdfs:subClassOf | ekg-story-service:Statement |
1.2.4 SPARQL Parameter§
A statement parameter used by a SPARQL story implementation.
ekg-story-service:SPARQLParameter | |
https://ekgf.org/ontology/story-service#SPARQLParameter | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:Class |
rdfs:label | SPARQL Parameter |
rdfs:subClassOf | ekg-story-service:Parameter |
1.2.5 SPARQL Results§
A story-service result description for the output of a SPARQL execution.
ekg-story-service:SPARQLResults | |
https://ekgf.org/ontology/story-service#SPARQLResults | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:Class |
rdfs:label | SPARQL Results |
rdfs:subClassOf | ekg-story-service:Result |
1.2.6 SPARQL Statement§
A story-service statement expressed using SPARQL.
ekg-story-service:SPARQLStatement | |
https://ekgf.org/ontology/story-service#SPARQLStatement | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:Class |
rdfs:label | SPARQL Statement |
rdfs:subClassOf | ekg-story-service:Statement |
1.2.7 Statement§
An executable statement used by the story service to implement a story, such as a SPARQL or SHACL statement. It is distinct from the service that executes it.
ekg-story-service:Statement | |
https://ekgf.org/ontology/story-service#Statement | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:Class |
rdfs:label | Statement |
owl:disjointWith | ekg-story-service:StoryService |
1.2.8 Story Service§
A service application executes stories and applies their input-concept
requirements. Under the agreed contract, it interprets absent
ekg-story:isMandatory and ekg-story:isServerProvided flags as false on the
story's input usages. The ontology's Markdown description records the full
contract and links to the declared Story vocabulary.
ekg-story-service:StoryService | |
https://ekgf.org/ontology/story-service#StoryService | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:Class |
rdfs:label | Story Service |
1.3 Properties§
1.3.1 Has Parameter§
Associates a statement with one of its parameters; it is the inverse of parameterFor.
ekg-story-service:hasParameter | |
https://ekgf.org/ontology/story-service#hasParameter | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:InverseFunctionalProperty |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story-service:Statement |
rdfs:label | Has Parameter |
rdfs:range | ekg-story-service:Parameter |
owl:inverseOf | ekg-story-service:parameterFor |
1.3.2 Is Service Parameter§
Records whether a parameter is classified as a service parameter by the story-service configuration.
ekg-story-service:isServiceParameter | |
https://ekgf.org/ontology/story-service#isServiceParameter | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:DatatypeProperty |
rdfs:domain | ekg-story-service:Parameter |
rdfs:label | Is Service Parameter |
rdfs:range | xsd:boolean |
1.3.3 On§
Identifies the story to which a parameter or result description relates.
ekg-story-service:on | |
https://ekgf.org/ontology/story-service#on | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:ObjectProperty |
rdfs:domain | (rdf:type: owl:Class; owl:unionOf: (ekg-story-service:Parameter, ekg-story-service:Result)) |
rdfs:label | On |
rdfs:range | ekg-story:Story |
1.3.4 Parameter Direction§
Records the direction assigned to a parameter as a string. The ontology does not declare a controlled set of direction values.
ekg-story-service:parameterDirection | |
https://ekgf.org/ontology/story-service#parameterDirection | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:DatatypeProperty |
rdfs:domain | ekg-story-service:Parameter |
rdfs:label | Parameter Direction |
rdfs:range | xsd:string |
1.3.5 Parameter For§
Identifies the statement for which a parameter is defined. The functional-property axiom limits a parameter to one statement.
ekg-story-service:parameterFor | |
https://ekgf.org/ontology/story-service#parameterFor | |
| 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-service:Parameter |
rdfs:label | Parameter For |
rdfs:range | ekg-story-service:Statement |
1.3.6 Parameter Key§
Records the string key by which a parameter is identified in a statement or service configuration.
ekg-story-service:parameterKey | |
https://ekgf.org/ontology/story-service#parameterKey | |
| 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-service:Parameter |
rdfs:label | Parameter Key |
rdfs:range | xsd:string |
1.3.7 Parameter Op§
Records an operation value associated with a parameter. The ontology does not specify its literal datatype or the allowed operations.
ekg-story-service:parameterOp | |
https://ekgf.org/ontology/story-service#parameterOp | |
| 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-service:Parameter |
rdfs:label | Parameter Op |
1.3.8 Parameter Type§
Records the parameter type identifier used by the story-service configuration. The value is a string rather than a link to an RDF class or datatype.
ekg-story-service:parameterType | |
https://ekgf.org/ontology/story-service#parameterType | |
| 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-service:Parameter |
rdfs:label | Parameter Type |
rdfs:range | xsd:string |
1.3.9 should be supplied by§
The execution of any given story can be done by (supplied by) a given (logical) instance of the story Service.
ekg-story-service:providedBy | |
https://ekgf.org/ontology/story-service#providedBy | |
| 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 | should be supplied by |
rdfs:range | ekg-story-service:StoryService |
1.3.10 Result For§
Relates a SPARQL result description to the story that produces the result.
ekg-story-service:resultFor | |
https://ekgf.org/ontology/story-service#resultFor | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-story-service:SPARQLResults |
rdfs:label | Result For |
rdfs:range | ekg-story:Story |
1.3.11 Result Key§
Records a result-entry key in the story-service configuration. Its currently declared domain is Parameter, which requires review before treating it as a property restricted to Result.
ekg-story-service:resultKey | |
https://ekgf.org/ontology/story-service#resultKey | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:DatatypeProperty |
rdfs:domain | ekg-story-service:Parameter |
rdfs:label | Result Key |
rdfs:range | xsd:string |
1.3.12 Result Type§
Records the result type identifier used by the story-service configuration as a string.
ekg-story-service:resultType | |
https://ekgf.org/ontology/story-service#resultType | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:DatatypeProperty |
rdfs:domain | ekg-story-service:Result |
rdfs:label | Result Type |
rdfs:range | xsd:string |
1.3.13 Should Be Generated By§
Identifies the story-service instance expected to generate a parameter. The property is functional; its intended distinction from other parameter-to-service relationships requires modeling review.
ekg-story-service:shouldBeGeneratedBy | |
https://ekgf.org/ontology/story-service#shouldBeGeneratedBy | |
| 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-service:Parameter |
rdfs:label | Should Be Generated By |
rdfs:range | ekg-story-service:StoryService |
1.3.14 Sparql Query Name§
Records the configured name of a story's SPARQL query.
ekg-story-service:sparqlQueryName | |
https://ekgf.org/ontology/story-service#sparqlQueryName | |
| 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 | Sparql Query Name |
rdfs:range | xsd:string |
1.3.15 Sparql Statement File Name§
Records the name of the SPARQL statement file associated with a story.
ekg-story-service:sparqlStatementFileName | |
https://ekgf.org/ontology/story-service#sparqlStatementFileName | |
| RDF predicate | Value |
|---|---|
dc:creator | http://orcid.org/0000-0003-2309-5068 |
dc:date | |
rdf:type | owl:DatatypeProperty |
rdfs:domain | ekg-story:Story |
rdfs:label | Sparql Statement File Name |
rdfs:range | xsd:string |