1#ifndef SOURCEMETA_CORE_JSONLD_MATERIALIZE_H_
2#define SOURCEMETA_CORE_JSONLD_MATERIALIZE_H_
4#ifndef SOURCEMETA_CORE_JSONLD_EXPORT
5#include <sourcemeta/core/jsonld_export.h>
8#include <sourcemeta/core/json.h>
9#include <sourcemeta/core/jsonpointer.h>
16namespace sourcemeta::core {
43 std::optional<JSON::String>
id{};
45 std::vector<JSON::String>
types{};
77 std::vector<JSON::String>
types{};
91 std::optional<JSON::String>
id{};
93 std::vector<JSON::String>
types{};
153template <
typename Po
interT>
198SOURCEMETA_CORE_JSONLD_EXPORT
238SOURCEMETA_CORE_JSONLD_EXPORT
266SOURCEMETA_CORE_JSONLD_EXPORT
std::basic_string< Char, CharTraits, Allocator< Char > > String
The string type used by the JSON document.
Definition json_value.h:52
static auto make_object() -> JSON
bool graph
Whether the node's descendants are asserted in the named graph it denotes.
Definition jsonld_materialize.h:47
JSON::String value
The predicate that carries the scalar.
Definition jsonld_materialize.h:95
std::optional< JSON::String > language
The language tag of the literal.
Definition jsonld_materialize.h:64
std::vector< JSONLDEdge > edges
How the position connects to its parent.
Definition jsonld_materialize.h:134
JSONLDContainer container
The container form of the collection.
Definition jsonld_materialize.h:126
JSON constants
Definition jsonld_materialize.h:102
bool json
Whether the literal is preserved as an opaque JSON literal.
Definition jsonld_materialize.h:68
JSONLDLiteral literal
Definition jsonld_materialize.h:98
JSON constants
Definition jsonld_materialize.h:51
std::optional< JSON::String > datatype
Definition jsonld_materialize.h:62
JSON::String predicate
The predicate that connects the position to its parent.
Definition jsonld_materialize.h:23
std::vector< JSON::String > types
The types of the promoted node.
Definition jsonld_materialize.h:93
std::optional< JSONLDDirection > direction
The base direction of the literal.
Definition jsonld_materialize.h:66
bool reverse
Whether the edge is asserted in reverse.
Definition jsonld_materialize.h:25
std::vector< JSON::String > types
The types of the node.
Definition jsonld_materialize.h:45
JSONLDDescriptor descriptor
The JSON-LD semantics of the position.
Definition jsonld_materialize.h:147
std::variant< JSONLDNode, JSONLDLiteral, JSONLDReference, JSONLDCollection, JSONLDPromotion > value
What the position is.
Definition jsonld_materialize.h:138
JSON constants
Definition jsonld_materialize.h:81
std::vector< JSON::String > types
The types of the promoted node.
Definition jsonld_materialize.h:77
JSONLDContainer
Definition jsonld_materialize.h:108
JSONLDBasicAnnotationList< Pointer > JSONLDAnnotationList
Definition jsonld_materialize.h:158
JSONLDDirection
Definition jsonld_materialize.h:30
JSONLDBasicAnnotationList< WeakPointer > JSONLDWeakAnnotationList
Definition jsonld_materialize.h:164
SOURCEMETA_CORE_JSONLD_EXPORT auto jsonld_materialize(const JSON &instance, const JSONLDAnnotationList &annotations) -> JSON
std::vector< JSONLDBasicAnnotation< PointerT > > JSONLDBasicAnnotationList
Definition jsonld_materialize.h:154
SOURCEMETA_CORE_JSONLD_EXPORT auto jsonld_canonicalize_fragment(const JSON &fragment) -> JSON
@ Language
A map of language tag to string ranging over an object.
Definition jsonld_materialize.h:114
@ List
An ordered RDF list ranging over an array.
Definition jsonld_materialize.h:110
@ Set
An unordered set ranging over an array.
Definition jsonld_materialize.h:112
@ Index
A map of index labels carrying no RDF ranging over an object.
Definition jsonld_materialize.h:116
@ LTR
The left-to-right base direction.
Definition jsonld_materialize.h:32
@ RTL
The right-to-left base direction.
Definition jsonld_materialize.h:34