z_rdf_props (zotonic_core v1.0.0-rc.17)
Extract properties from a compact RDF document encoded by zotonic_rdf.
Summary
Functions
Extract standard Zotonic edges from an RDF document. The document is a "compact" document returned by zotonic_rdf. This collects the @id attributes in the top-level predicates of the document.
Extract standard Zotonic properties from an RDF document. The document is a "compact" document returned by zotonic_rdf. All predicates in the document are of the form "namespace:term", for example: "dc:title". The namespaces are the ones defined in zotonic_rdf.
Extract standard Zotonic src import from an RDF document. The document is a "compact" document returned by zotonic_rdf.
Map all values in the RDF doc to values we can handle in the system
Check if a property can be mapped to a standard property. This is used in m_rsc:p/3 for fetching namespaced properties.
Translate the given value to a simpler value
Functions
-spec extract_edges(RDFDoc, Context) -> Edges when RDFDoc :: map(), Edges :: #{Predicate := [Edge]}, Predicate :: binary(), Edge :: map(), Context :: z:context().
Extract standard Zotonic edges from an RDF document. The document is a "compact" document returned by zotonic_rdf. This collects the @id attributes in the top-level predicates of the document.
Extract standard Zotonic properties from an RDF document. The document is a "compact" document returned by zotonic_rdf. All predicates in the document are of the form "namespace:term", for example: "dc:title". The namespaces are the ones defined in zotonic_rdf.
-spec extract_resource(RDFDoc, z:context()) -> {ok, Import} | {error, term()} when RDFDoc :: map(), Import :: map().
Extract standard Zotonic src import from an RDF document. The document is a "compact" document returned by zotonic_rdf.
Map all values in the RDF doc to values we can handle in the system
Check if a property can be mapped to a standard property. This is used in m_rsc:p/3 for fetching namespaced properties.
Translate the given value to a simpler value