RDF Integration API

SemanticSpacetime.sst_namespaceFunction
sst_namespace(base::AbstractString="http://sst.example.org/") -> SSTNamespace

Return an SST RDF namespace configuration.

SemanticSpacetime.sst_to_rdfFunction
sst_to_rdf(store::AbstractSSTStore; namespace=sst_namespace()) -> Vector{RDFTriple}

Convert all nodes and edges in an SST store to RDF triples.

Nodes are mapped to URIs under the namespace base, with rdf:type, rdfs:label, and chapter membership triples. Edges become triples with the arrow short name as the predicate URI.

Keyword Arguments

  • namespace::SSTNamespace: The namespace configuration (default: sst_namespace())
SemanticSpacetime.rdf_to_sst!Function
rdf_to_sst!(store::MemoryStore, triples::Vector{RDFTriple};
            namespace=sst_namespace(),
            chapter="imported",
            predicate_map=Dict{String,PredicateMapping}()) -> store

Import RDF triples into an SST store. Subjects and objects become nodes; predicates become edges.

Metadata predicates (rdf:type, rdfs:label, chapter) are used to set node properties rather than creating edges.

Unknown predicates are auto-registered as NEAR arrows unless a custom predicate_map provides a mapping.

Keyword Arguments

  • namespace::SSTNamespace: Namespace for URI parsing
  • chapter::AbstractString: Default chapter for imported nodes
  • predicate_map::Dict{String,PredicateMapping}: Custom predicate→arrow mappings
SemanticSpacetime.export_turtleFunction
export_turtle(store::AbstractSSTStore; namespace=sst_namespace()) -> String

Export an SST store as an RDF Turtle format string.

SemanticSpacetime.import_turtle!Function
import_turtle!(store::MemoryStore, text::AbstractString;
               namespace=sst_namespace(), chapter="imported") -> store

Parse a minimal Turtle string and import triples into the SST store.

Supports <uri> terms and "literal" terms. Handles @prefix declarations.

SemanticSpacetime.triples_to_turtleFunction
triples_to_turtle(triples::Vector{RDFTriple}; namespace=sst_namespace()) -> String

Serialize a vector of RDFTriples as Turtle format.

SemanticSpacetime.parse_turtleFunction
parse_turtle(text::AbstractString) -> Vector{RDFTriple}

Parse a minimal Turtle string into RDFTriples.

Handles <URI> and "literal" terms, and @prefix declarations. Does not handle blank nodes, collections, or shorthand predicates.