EKGF Ontologies / Story Service Ontology

EKGF Editor's Draft

Story Service Ontology

EKGF Editor's Draft

1. Story Service Ontology§

1.1 Overview§

Story Service Ontology

IdentifierValue
Ontology IRI / Namespacehttps://ekgf.org/ontology/story-service#
Prefixekg-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:

FlagMeaning when trueEffective value when absent
ekg-story:isMandatoryThe input is required for execution.false
ekg-story:isServerProvidedThe 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 predicateValue
rdf:typeowl:Class
rdfs:labelParameter
owl:disjointWithekg-story-service:Statement
owl:disjointWithekg-story-service:StoryService
UML class diagram for Parameter. Diagram labels: «owl:Class»; Parameter; Is Service Parameter : xsd:boolean; «owl:Class»; SPARQL Parameter; «owl:Class»; Statement; «owl:Class»; Story Service; Has Parameter; owl:; disjointWith; owl:; disjointWith; SPARQL Parameter rdfs:subClassOf Parameter. Parameter owl:disjointWith Statement. Parameter owl:disjointWith Story Service. Has Parameter rdfs:domain Statement. Has Parameter rdfs:range Parameter. Is Service Parameter rdfs:domain Parameter. Is Service Parameter rdfs:range xsd:boolean.«owl:Class»ParameterIs Service Parameter : xsd:boolean«owl:Class»SPARQL Parameter«owl:Class»Statement«owl:Class»Story ServiceHas Parameterowl:disjointWithowl:disjointWith
Class neighborhood: Parameter [1]

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 predicateValue
rdf:typeowl:Class
rdfs:labelResult
UML class diagram for Result. Diagram labels: «owl:Class»; Result; Result Type : xsd:string; «owl:Class»; SPARQL Results; SPARQL Results rdfs:subClassOf Result. Result Type rdfs:domain Result. Result Type rdfs:range xsd:string.«owl:Class»ResultResult Type : xsd:string«owl:Class»SPARQL Results
Class neighborhood: Result [1]

1.2.3 SHACL Statement§

A story-service statement expressed using SHACL.

ekg-story-service:SHACLStatement
https://ekgf.org/ontology/story-service#SHACLStatement
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:Class
rdfs:labelSHACL Statement
rdfs:subClassOfekg-story-service:Statement
UML class diagram for SHACL Statement. Diagram labels: «owl:Class»; SHACL Statement; «owl:Class»; Statement; SHACL Statement rdfs:subClassOf Statement.«owl:Class»SHACL Statement«owl:Class»Statement
Class neighborhood: SHACL Statement [1]

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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:Class
rdfs:labelSPARQL Parameter
rdfs:subClassOfekg-story-service:Parameter
UML class diagram for SPARQL Parameter. Diagram labels: «owl:Class»; Parameter; «owl:Class»; SPARQL Parameter; SPARQL Parameter rdfs:subClassOf Parameter.«owl:Class»Parameter«owl:Class»SPARQL Parameter
Class neighborhood: SPARQL Parameter [1]

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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:Class
rdfs:labelSPARQL Results
rdfs:subClassOfekg-story-service:Result
UML class diagram for SPARQL Results. Diagram labels: «owl:Class»; Story (ekg-story:Story); «owl:Class»; Result; «owl:Class»; SPARQL Results; Result For; SPARQL Results rdfs:subClassOf Result. Result For rdfs:domain SPARQL Results. Result For rdfs:range Story (ekg-story:Story).«owl:Class»Story (ekg-story:Story)«owl:Class»Result«owl:Class»SPARQL ResultsResult For
Class neighborhood: SPARQL Results [1]

1.2.6 SPARQL Statement§

A story-service statement expressed using SPARQL.

ekg-story-service:SPARQLStatement
https://ekgf.org/ontology/story-service#SPARQLStatement
RDF predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:Class
rdfs:labelSPARQL Statement
rdfs:subClassOfekg-story-service:Statement
UML class diagram for SPARQL Statement. Diagram labels: «owl:Class»; SPARQL Statement; «owl:Class»; Statement; SPARQL Statement rdfs:subClassOf Statement.«owl:Class»SPARQL Statement«owl:Class»Statement
Class neighborhood: SPARQL Statement [1]

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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:Class
rdfs:labelStatement
owl:disjointWithekg-story-service:StoryService
UML class diagram for Statement. Diagram labels: «owl:Class»; Parameter; «owl:Class»; SHACL Statement; «owl:Class»; SPARQL Statement; «owl:Class»; Statement; «owl:Class»; Story Service; Has Parameter; owl:; disjointWith; owl:; disjointWith; Parameter owl:disjointWith Statement. SHACL Statement rdfs:subClassOf Statement. SPARQL Statement rdfs:subClassOf Statement. Statement owl:disjointWith Story Service. Has Parameter rdfs:domain Statement. Has Parameter rdfs:range Parameter.«owl:Class»Parameter«owl:Class»SHACL Statement«owl:Class»SPARQL Statement«owl:Class»Statement«owl:Class»Story ServiceHas Parameterowl:disjointWithowl:disjointWith
Class neighborhood: Statement [1]

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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:Class
rdfs:labelStory Service
UML class diagram for Story Service. Diagram labels: «owl:Class»; Story (ekg-story:Story); «owl:Class»; Parameter; «owl:Class»; Statement; «owl:Class»; Story Service; should be supplied by; Should Be Generated By; owl:; disjointWith; owl:; disjointWith; Parameter owl:disjointWith Story Service. Statement owl:disjointWith Story Service. should be supplied by rdfs:domain Story (ekg-story:Story). should be supplied by rdfs:range Story Service. Should Be Generated By rdfs:domain Parameter. Should Be Generated By rdfs:range Story Service.«owl:Class»Story (ekg-story:Story)«owl:Class»Parameter«owl:Class»Statement«owl:Class»Story Serviceshould be supplied byShould Be Generated Byowl:disjointWithowl:disjointWith
Class neighborhood: Story Service [1]

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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:InverseFunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-story-service:Statement
rdfs:labelHas Parameter
rdfs:rangeekg-story-service:Parameter
owl:inverseOfekg-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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdfs:domainekg-story-service:Parameter
rdfs:labelIs Service Parameter
rdfs:rangexsd: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 predicateValue
rdf:typeowl:ObjectProperty
rdfs:domain(rdf:type: owl:Class; owl:unionOf: (ekg-story-service:Parameter, ekg-story-service:Result))
rdfs:labelOn
rdfs:rangeekg-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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdfs:domainekg-story-service:Parameter
rdfs:labelParameter Direction
rdfs:rangexsd: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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:FunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-story-service:Parameter
rdfs:labelParameter For
rdfs:rangeekg-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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story-service:Parameter
rdfs:labelParameter Key
rdfs:rangexsd: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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story-service:Parameter
rdfs:labelParameter 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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story-service:Parameter
rdfs:labelParameter Type
rdfs:rangexsd: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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:ObjectProperty
rdfs:domainekg-story:Story
rdfs:labelshould be supplied by
rdfs:rangeekg-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 predicateValue
rdf:typeowl:ObjectProperty
rdfs:domainekg-story-service:SPARQLResults
rdfs:labelResult For
rdfs:rangeekg-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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdfs:domainekg-story-service:Parameter
rdfs:labelResult Key
rdfs:rangexsd: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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdfs:domainekg-story-service:Result
rdfs:labelResult Type
rdfs:rangexsd: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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:FunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-story-service:Parameter
rdfs:labelShould Be Generated By
rdfs:rangeekg-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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-story:Story
rdfs:labelSparql Query Name
rdfs:rangexsd: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 predicateValue
dc:creatorhttp://orcid.org/0000-0003-2309-5068
dc:date
rdf:typeowl:DatatypeProperty
rdfs:domainekg-story:Story
rdfs:labelSparql Statement File Name
rdfs:rangexsd:string

Document provenance

Search this specification