Namespaces¶
app.namespaces
¶
Shared RDF namespace definitions and SPARQL prefix declarations.
Single source of truth for namespace URIs and prefix shorthands used across
the query layer (shacl_to_entities, sparql_builder,
sparql_to_geojson_translator).
COMPASS = Namespace('http://example.org/ocean-org/ontology#')
module-attribute
¶
Compass ontology namespace (entity classes and properties).
GEO = Namespace('http://www.w3.org/2003/01/geo/wgs84_pos#')
module-attribute
¶
W3C WGS84 geo namespace (lat / long).
SCHEMA = Namespace('https://schema.org/')
module-attribute
¶
schema.org namespace (url, image, …).
ITEM_SEP = ';;'
module-attribute
¶
Separator between multi-valued items in GROUP_CONCAT output.
FIELD_SEP = '|'
module-attribute
¶
Separator between fields within a single GROUP_CONCAT item (IRI|label).
PREFIX_MAP = {'http://example.org/ocean-org/ontology#': 'compass:', 'http://www.w3.org/2003/01/geo/wgs84_pos#': 'geo:', 'https://schema.org/': 'schema:'}
module-attribute
¶
Full namespace URI → SPARQL prefix used by to_prefixed.
SPARQL_PREFIXES = '\n PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n PREFIX skos: <http://www.w3.org/2004/02/skos/core#>\n PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>\n PREFIX compass: <http://example.org/ocean-org/ontology#>\n PREFIX schema: <https://schema.org/>\n PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n '
module-attribute
¶
PREFIX block prepended to every generated SPARQL query.