RDF-based configuration for Gno.Services.
Extends DCATR.Manifest with a Gno.Service link. Manifest files are
Turtle files loaded from a DCATR.Manifest.LoadPath. All files in the
environment-specific subdirectory are loaded and merged into a single graph.
Custom manifest types can be defined via Gno.Manifest.Type, and manifest
files can be generated with Gno.Manifest.Generator.
Application Configuration
Gno's manifest system is configured through the :dcatr application:
config :dcatr,
env: Mix.env(),
load_path: ["config/gno"],
manifest_type: Gno.Manifest,
manifest_base: "http://example.com/":env- the current environment, used to select the environment-specific subdirectory (e.g.config/gno/dev/,config/gno/test/):load_path- directory paths for manifest file discovery (seeDCATR.Manifest.LoadPath):manifest_type- the manifest module to use (alwaysGno.Manifestfor plain Gno, or a custom module implementingGno.Manifest.Type):manifest_base- base URI for resolving relative URIs in manifest files
Additionally, an HTTP adapter must be configured for Tesla:
config :tesla, adapter: Tesla.Adapter.HackneyDirectory Structure
Manifest files are organized by environment:
config/gno/
├── dev/
│ ├── service.ttl
│ ├── repository.ttl
│ └── fuseki.ttl
└── test/
├── service.ttl
├── repository.ttl
└── oxigraph.ttlLoading
The manifest and its components can be loaded programmatically:
{:ok, manifest} = Gno.manifest()
{:ok, service} = Gno.service()
{:ok, store} = Gno.store()
Summary
Functions
Loads the dataset from the cached manifest's repository.
Loads the dataset or raises on error.
Loads the complete manifest with caching support.
Loads the manifest or raises on error.
Loads the repository from the cached manifest's service.
Loads the repository or raises on error.
Loads the service from the cached manifest.
Loads the service or raises on error.
Returns the service type module used by this manifest type.
Types
Functions
Loads the dataset from the cached manifest's repository.
Loads the dataset or raises on error.
@spec from(Grax.Schema.t()) :: {:ok, t()} | {:error, any()}
@spec from!(Grax.Schema.t()) :: t()
@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()
@spec manifest(keyword()) :: {:ok, t()} | {:error, DCATR.ManifestError.t()}
Loads the complete manifest with caching support.
Options
:load_path- Override default load path:service_id- Explicit service ID for loading:reload- Force cache reload (bypass cache)- Additional options passed to
load_dataset/1andload_manifest/2
Loads the manifest or raises on error.
Loads the repository from the cached manifest's service.
Loads the repository or raises on error.
Loads the service from the cached manifest.
Loads the service or raises on error.
Returns the service type module used by this manifest type.
Extracts the service type from the :service link property definition in the
manifest's Grax schema. Used for type introspection and validation.