Documentation
¶
Overview ¶
Package csapi provides Go constants for the OGC API — Connected Systems v1.0 (CS API) vocabulary — specifically the §10 Datastream concept and its surrounding predicates, which SOSA and OMS do not cover.
SOSA models discrete Observations attached to a Sensor; the CS API adds the Datastream concept (§10) — a stream of Observations produced by one System for one ObservableProperty, with temporal bounds and a result-type discriminator. Sister-repo gateways (semconnect, future CS API hosts) that publish or list Datastreams over `POST /datastreams` / `GET /datastreams` need a shared vocabulary primitive so JSON-LD exports resolve and downstream graph consumers can discover Datastreams without grepping for local IRI strings.
Namespace pinning ¶
The Namespace constant pins to the OGC spec-rooted IRI stem for Connected Systems v1.0. The CS API is still a working draft; when the OGC publishes canonical IRIs (which may differ in form), this package gets a one-shot constant swap and existing entities re-tag via the migration playbook. The constant-name surface is the load- bearing API — consumers reference csapi.Datastream etc., not the string form, so the URI change is invisible at the call site.
Coverage ¶
MVP coverage is the load-bearing subset for the CS API §10 → Datastream representation: the Datastream class plus the four predicates needed for the wire shape — ProducedBy, ResultTimeRange, PhenomenonTimeRange, ResultType. The Schema field (SWE Common DataRecord describing observation result structure) is intentionally absent — see [ADR-044] framework-primitives reference §Scope-cut for the rationale (Schema flows as a StorageRef pointer rather than an inline triple).
Standards-at-work, not semweb hell ¶
This package follows the [vocabulary] family pattern. Constants are exported strings; no OWL inferencing, no SPARQL, no operator- authored RDF. Prefix registration is automatic on import.
External references ¶
- Spec (working draft): https://docs.ogc.org/DRAFTS/23-001r0.html
- SOSA (compared/parallel): https://www.w3.org/TR/vocab-ssn/
- OMS bundle (parallel observation vocabulary): [oms]
[vocabulary]: .. [oms]: ../oms [ADR-044]: ../../docs/adr/044-ogc-connected-systems-framework-split.md
Index ¶
Constants ¶
const ( // Prefix is the CS API short token used when compacting IRIs. Prefix = "csapi" // Namespace is the CS API v1.0 IRI stem. Namespace = "http://www.opengis.net/spec/ogcapi-connectedsystems-1/1.0/" )
CS API namespace identifiers. Pinned to the spec-rooted stem used by OGC API Connected Systems v1.0. The spec is a working draft; when canonical IRIs publish, this constant gets a one-shot swap.
const ( // ProducedBy binds a Datastream to the entity ID of the System // (sensor or system of systems) that produces its Observations. // Inverse of a forthcoming `producesDatastream` predicate. ProducedBy = Namespace + "producedBy" // ResultTimeRange is the ISO 8601 time-interval representation // of the temporal bounds during which the Datastream produced // result values (clock time of the measurements). CS API §10.4. ResultTimeRange = Namespace + "resultTimeRange" // PhenomenonTimeRange is the ISO 8601 time-interval representation // of the temporal bounds of the observed phenomena. May differ // from ResultTimeRange for processed or back-dated observations. // CS API §10.4. PhenomenonTimeRange = Namespace + "phenomenonTimeRange" // ResultType discriminates the structure of the Datastream's // Observations — om:Measurement, om:Category, om:CountObservation, // etc. Consumers branch on this to decode the result payload. ResultType = Namespace + "resultType" )
CS API predicate IRIs.
const ( // Datastream — a stream of Observations produced by one System // (sensor or system of systems) for one ObservableProperty, with // declared temporal bounds (PhenomenonTimeRange, // ResultTimeRange) and a result-type discriminator (ResultType). // CS API v1.0 §10. Datastream = Namespace + "Datastream" )
CS API class IRIs. Use as the object of an rdf:type triple, or anywhere a Connected-Systems-aware encoder references the type.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.