Returns the primary graph from the repository if one is designated.
This implementation of DCATR.Service.Type.primary_graph/1 delegates to
DCATR.Service.Type.primary_graph/1.
A DCATR.Service for SPARQL triple stores.
A service combines the structural model from DCATR.Service with Gno-specific
operational concerns:
store - a Gno.Store backend providing the SPARQL triple store connectioncommit_operation - a Gno.CommitOperation defining the middleware pipeline
and commit workflowServices are typically loaded from RDF manifest files via Gno.Manifest and
then used with the functions in the top-level Gno module. Repository
initialization is handled by Gno.Service.Setup.
Many operations accept a graph selector (via the :graph option or
graph_name/2) that is resolved to a concrete graph IRI. Built-in
selectors include:
:default — the default graph of the RDF dataset:primary — the primary data graph designated in the repository manifest:repo_manifest — the repository manifest graph:service — all service graphs (for bulk operations like drop/2)Custom selectors can be added by overriding DCATR.GraphResolver.resolve_graph_selector/2.
Builds a service with the given ID and attributes.
Checks if the service's repository exists in its store.
Returns the default graph if one is designated.
Returns a graph by ID, local name, or symbolic selector.
Returns a graph by its ID.
Returns a graph by its local name.
Returns the graph name for a given graph, selector, or ID.
Returns the complete local name to graph ID mapping.
Returns all graphs aggregated from repository and local_data catalogs.
Executes a Gno.Store.SPARQL.Operation through this service's store.
Checks if a graph exists in the container.
Loads a service from a dataset.
Loads graph name mappings from a service manifest graph.
Creates a new service with an auto-generated blank node ID.
Returns the primary graph from the repository if one is designated.
Returns the repository type module for this service type.
Resolves a symbolic selector to a graph.
Returns the service data type module for this service type.
Returns the effective value of use_primary_as_default for this service.
Validates basic setup integrity.
Builds a service with the given ID and attributes.
Checks if the service's repository exists in its store.
Returns the default graph if one is designated.
This implementation of DCATR.Service.Type.default_graph/1 delegates to
DCATR.Service.Type.default_graph/1.
@spec from(Grax.Schema.t()) :: {:ok, t()} | {:error, any()}
@spec from!(Grax.Schema.t()) :: t()
@spec graph(DCATR.GraphResolver.container(), DCATR.GraphResolver.id_or_selector()) :: DCATR.Graph.t() | nil
Returns a graph by ID, local name, or symbolic selector.
This overrides DCATR.GraphResolver's generated graph/2 to add local name lookup.
Delegates to DCATR.Service.Type.graph/2.
Returns a graph by its ID.
Delegates to DCATR.Service.Type.graph_by_id/2.
Returns a graph by its local name.
This implementation of DCATR.Service.Type.graph_by_name/2 delegates to
DCATR.Service.Type.graph_by_name/2.
Returns the graph name for a given graph, selector, or ID.
This implementation of DCATR.Service.Type.graph_name/3 delegates to
DCATR.Service.Type.graph_name/3.
Returns the complete local name to graph ID mapping.
Delegates to DCATR.Service.Type.graph_name_mapping/1.
Returns all graphs aggregated from repository and local_data catalogs.
Delegates to DCATR.Service.Type.graphs/1.
Executes a Gno.Store.SPARQL.Operation through this service's store.
Resolves graph names via graph_name/2 before dispatching to Gno.Store.
@spec has_graph?( DCATR.GraphResolver.container(), DCATR.GraphResolver.id_or_selector() ) :: boolean()
Checks if a graph exists in the container.
Convenience function based on graph/2 - returns true if the graph exists,
false otherwise.
@spec load( RDF.Graph.t() | RDF.Description.t(), RDF.IRI.coercible() | RDF.BlankNode.t(), opts :: keyword() ) :: {:ok, t()} | {:error, any()}
@spec load!( RDF.Graph.t() | RDF.Description.t(), RDF.IRI.coercible() | RDF.BlankNode.t(), opts :: keyword() ) :: t()
Loads a service from a dataset.
This implementation of DCATR.Service.Type.load_from_dataset/3 delegates to
DCATR.Service.Type.load_from_dataset/4.
Loads graph name mappings from a service manifest graph.
This implementation of DCATR.Service.Type.load_graph_names/2 delegates to
DCATR.Service.Type.load_graph_names/2.
Creates a new service with an auto-generated blank node ID.
Returns the primary graph from the repository if one is designated.
This implementation of DCATR.Service.Type.primary_graph/1 delegates to
DCATR.Service.Type.primary_graph/1.
Returns the repository type module for this service type.
Resolves a symbolic selector to a graph.
This implementation of DCATR.GraphResolver.resolve_graph_selector/2 delegates to
DCATR.Service.Type.resolve_graph_selector/2.
Returns the service data type module for this service type.
Returns the effective value of use_primary_as_default for this service.
This implementation of DCATR.Service.Type.use_primary_as_default/1 delegates to
DCATR.Service.Type.use_primary_as_default/1.
Validates basic setup integrity.
The default implementation checks for repository existence (same as check_setup/1).
Extensions can override this via Gno.Service.Setup.Extension.validate/2 for
deeper structural validation.