Module z_rdf_props

Extract properties from a compact RDF document encoded by zotonic_rdf.

Copyright © 2021 Driebit BV

Description

Extract properties from a compact RDF document encoded by zotonic_rdf.

Function Index

extract_edges/2Extract standard Zotonic edges from an RDF document.
extract_props/1Extract standard Zotonic properties from an RDF document.
extract_resource/2Extract standard Zotonic src import from an RDF document.
map_values/1Map all values in the RDF doc to values we can handle in the system.
mapping/1Check if a property can be mapped to a standard property.
to_simple_value/1Translate the given value to a simpler value.

Function Details

extract_edges/2

extract_edges(RDFDoc, Context) -> Edges

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_props/1

extract_props(RDFDoc) -> Props

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_resource/2

extract_resource(RDFDoc, Context::z:context()) -> {ok, Import} | {error, term()}

Extract standard Zotonic src import from an RDF document. The document is a "compact" document returned by zotonic_rdf.

map_values/1

map_values(V) -> any()

Map all values in the RDF doc to values we can handle in the system

mapping/1

mapping(Prop::binary()) -> binary() | undefined

Check if a property can be mapped to a standard property. This is used in m_rsc:p/3 for fetching namespaced properties.

to_simple_value/1

to_simple_value(V::map()) -> error | term()

Translate the given value to a simpler value


Generated by EDoc