RDF Integration API
SemanticSpacetime.RDFTriple — Type
RDFTripleA simple RDF triple as three URI/literal strings.
SemanticSpacetime.SSTNamespace — Type
SSTNamespaceConfigurable namespace for SST RDF serialization.
SemanticSpacetime.PredicateMapping — Type
PredicateMappingMaps an RDF predicate URI to an SST arrow name and STType.
SemanticSpacetime.sst_namespace — Function
sst_namespace(base::AbstractString="http://sst.example.org/") -> SSTNamespaceReturn an SST RDF namespace configuration.
SemanticSpacetime.sst_to_rdf — Function
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}()) -> storeImport 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 parsingchapter::AbstractString: Default chapter for imported nodespredicate_map::Dict{String,PredicateMapping}: Custom predicate→arrow mappings
SemanticSpacetime.export_turtle — Function
export_turtle(store::AbstractSSTStore; namespace=sst_namespace()) -> StringExport an SST store as an RDF Turtle format string.
SemanticSpacetime.import_turtle! — Function
import_turtle!(store::MemoryStore, text::AbstractString;
namespace=sst_namespace(), chapter="imported") -> storeParse a minimal Turtle string and import triples into the SST store.
Supports <uri> terms and "literal" terms. Handles @prefix declarations.
SemanticSpacetime.triples_to_turtle — Function
triples_to_turtle(triples::Vector{RDFTriple}; namespace=sst_namespace()) -> StringSerialize a vector of RDFTriples as Turtle format.
SemanticSpacetime.parse_turtle — Function
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.