Class: RDF::Vocab::JSONLD

Inherits:
StrictVocabulary
  • Object
show all
Defined in:
lib/rdf/vocab/jsonld.rb

Overview

Vocabulary for <www.w3.org/ns/json-ld#>

The JSON-LD Vocabulary

This is a vocabulary document and is used to achieve certain features of the JSON-LD language.

Instance Attribute Summary collapse

Instance Attribute Details

#baseRDF::Vocabulary::Term (readonly)

If the [context definition](www.w3.org/TR/json-ld11/#dfn-context-definition) has an ‘@base` key, its value MUST be an _IRI reference_, or `null`.

Returns:

  • (RDF::Vocabulary::Term)


23
24
25
# File 'lib/rdf/vocab/jsonld.rb', line 23

def base
  @base
end

#compactedRDF::Vocabulary::Term (readonly)

This profile IRI is used to request or specify compacted JSON-LD document form.

Returns:

  • (RDF::Vocabulary::Term)


91
92
93
# File 'lib/rdf/vocab/jsonld.rb', line 91

def compacted
  @compacted
end

#containerRDF::Vocabulary::Term (readonly)

The associated ‘@container` value in an [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions). If the [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions) contains the `@container` keyword, its value MUST be either `@list`, `@set`, `@language`, `@index`, `@id`, `@graph`, `@type`, or be `null` or an array containing exactly any one of those keywords, or a combination of `@set` and any of `@index`, `@id`, `@graph`, `@type`, `@language` in any order. `@container` may also be an array containing `@graph` along with either `@id` or `@index` and also optionally including `@set`. If the value is `@language`, when the term is used outside of the `@context`, the associated value MUST be a language map. If the value is `@index`, when the term is used outside of the `@context`, the associated value MUST be an index map.

Returns:

  • (RDF::Vocabulary::Term)


27
28
29
# File 'lib/rdf/vocab/jsonld.rb', line 27

def container
  @container
end

#ContextRDF::Vocabulary::Term (readonly)

Defines term definitions and other aspects of a JSON-LD ‘Context`. A [context definition](www.w3.org/TR/json-ld11/#dfn-context-definition) MUST be a map whose keys MUST be either terms, _compact IRIs_, IRIs, or one of the keywords `@base`, `@import`, `@language`, `@propagate`, `@protected`, `@type`, `@version`, or `@vocab`.

Returns:

  • (RDF::Vocabulary::Term)


11
12
13
# File 'lib/rdf/vocab/jsonld.rb', line 11

def Context
  @Context
end

#contextRDF::Vocabulary::Term (readonly)

As an IRI, this link relation is used to associate a JSON-LD context with a JSON document so that it can be interpreted as JSON-LD. In an HTTP request header, specifies the location of a context to use for compaction. As a Context, defines an inline ‘context definition`.

Returns:

  • (RDF::Vocabulary::Term)


31
32
33
# File 'lib/rdf/vocab/jsonld.rb', line 31

def context
  @context
end

#definitionRDF::Vocabulary::Term (readonly)

Term definition(s) associated with this context.

Returns:

  • (RDF::Vocabulary::Term)


35
36
37
# File 'lib/rdf/vocab/jsonld.rb', line 35

def definition
  @definition
end

#directionRDF::Vocabulary::Term (readonly)

If the [context definition](www.w3.org/TR/json-ld11/#dfn-context-definition) has an ‘@direction` key, its value MUST be one of `“ltr”` or `“rtl”`, or be `null`.

Returns:

  • (RDF::Vocabulary::Term)


39
40
41
# File 'lib/rdf/vocab/jsonld.rb', line 39

def direction
  @direction
end

#expandedRDF::Vocabulary::Term (readonly)

This profile URI is used to request or specify expanded JSON-LD document form.

Returns:

  • (RDF::Vocabulary::Term)


95
96
97
# File 'lib/rdf/vocab/jsonld.rb', line 95

def expanded
  @expanded
end

#flattenedRDF::Vocabulary::Term (readonly)

This profile URI is used to request or specify flattened JSON-LD document form.

Returns:

  • (RDF::Vocabulary::Term)


99
100
101
# File 'lib/rdf/vocab/jsonld.rb', line 99

def flattened
  @flattened
end

#frameRDF::Vocabulary::Term (readonly)

As an IRI, this link relation is used to associate a JSON-LD frame with a JSON-LD document. In an HTTP request header, specifies the location of a frame to use for framing.

Returns:

  • (RDF::Vocabulary::Term)


103
104
105
# File 'lib/rdf/vocab/jsonld.rb', line 103

def frame
  @frame
end

#framedRDF::Vocabulary::Term (readonly)

This profile URI is used to request or specify framed JSON-LD document form.

Returns:

  • (RDF::Vocabulary::Term)


107
108
109
# File 'lib/rdf/vocab/jsonld.rb', line 107

def framed
  @framed
end

#graphContainerTypeRDF::Vocabulary::Term (readonly)

If the [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions) contains the ‘@container` keyword, its value MUST be either `@list`, `@set`, `@language`, `@index`, `@id`, `@graph`, `@type`, or be `null` or an array containing exactly any one of those keywords.

Returns:

  • (RDF::Vocabulary::Term)


111
112
113
# File 'lib/rdf/vocab/jsonld.rb', line 111

def graphContainerType
  @graphContainerType
end

#idRDF::Vocabulary::Term (readonly)

The ‘@id` mapping of a [term definition](#TermDefinition).

Returns:

  • (RDF::Vocabulary::Term)


43
44
45
# File 'lib/rdf/vocab/jsonld.rb', line 43

def id
  @id
end

#idContainerTypeRDF::Vocabulary::Term (readonly)

If the [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions) contains the ‘@container` keyword, its value MUST be either `@list`, `@set`, `@language`, `@index`, `@id`, `@graph`, `@type`, or be `null` or an array containing exactly any one of those keywords.

Returns:

  • (RDF::Vocabulary::Term)


115
116
117
# File 'lib/rdf/vocab/jsonld.rb', line 115

def idContainerType
  @idContainerType
end

#importRDF::Vocabulary::Term (readonly)

If the [context definition](www.w3.org/TR/json-ld11/#dfn-context-definition) contains the ‘@import` keyword, its value MUST be an _IRI reference_. When used as a reference from an `@import`, the referenced context definition MUST NOT include an `@import` key, itself.

Returns:

  • (RDF::Vocabulary::Term)


47
48
49
# File 'lib/rdf/vocab/jsonld.rb', line 47

def import
  @import
end

#indexContainerTypeRDF::Vocabulary::Term (readonly)

If the [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions) contains the ‘@container` keyword, its value MUST be either `@list`, `@set`, `@language`, `@index`, `@id`, `@graph`, `@type`, or be `null` or an array containing exactly any one of those keywords.

Returns:

  • (RDF::Vocabulary::Term)


119
120
121
# File 'lib/rdf/vocab/jsonld.rb', line 119

def indexContainerType
  @indexContainerType
end

#languageRDF::Vocabulary::Term (readonly)

The [default language](www.w3.org/TR/json-ld11/#dfn-default-language) is set in the context using the ‘@language` key whose value MUST be a string representing a [BCP47](tools.ietf.org/html/bcp47) language code or null.

Returns:

  • (RDF::Vocabulary::Term)


51
52
53
# File 'lib/rdf/vocab/jsonld.rb', line 51

def language
  @language
end

#languageContainerTypeRDF::Vocabulary::Term (readonly)

If the [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions) contains the ‘@container` keyword, its value MUST be either `@list`, `@set`, `@language`, `@index`, `@id`, `@graph`, `@type`, or be `null` or an array containing exactly any one of those keywords.

Returns:

  • (RDF::Vocabulary::Term)


123
124
125
# File 'lib/rdf/vocab/jsonld.rb', line 123

def languageContainerType
  @languageContainerType
end

#listContainerTypeRDF::Vocabulary::Term (readonly)

If the [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions) contains the ‘@container` keyword, its value MUST be either `@list`, `@set`, `@language`, `@index`, `@id`, `@graph`, `@type`, or be `null` or an array containing exactly any one of those keywords.

Returns:

  • (RDF::Vocabulary::Term)


127
128
129
# File 'lib/rdf/vocab/jsonld.rb', line 127

def listContainerType
  @listContainerType
end

#nestRDF::Vocabulary::Term (readonly)

If the [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions) contains the ‘@nest` keyword, its value MUST be either `@nest`, or a term which expands to `@nest`.

Returns:

  • (RDF::Vocabulary::Term)


55
56
57
# File 'lib/rdf/vocab/jsonld.rb', line 55

def nest
  @nest
end

#prefixRDF::Vocabulary::Term (readonly)

With the value ‘true`, allows this term to be used to construct a compact IRI when compacting.

Returns:

  • (RDF::Vocabulary::Term)


59
60
61
# File 'lib/rdf/vocab/jsonld.rb', line 59

def prefix
  @prefix
end

#PrefixDefinitionRDF::Vocabulary::Term (readonly)

A string ([simple term definition](www.w3.org/TR/json-ld11/#dfn-simple-term-definitions)), expanding to an IRI.

Returns:

  • (RDF::Vocabulary::Term)


15
16
17
# File 'lib/rdf/vocab/jsonld.rb', line 15

def PrefixDefinition
  @PrefixDefinition
end

#propagateRDF::Vocabulary::Term (readonly)

If the [context definition](www.w3.org/TR/json-ld11/#dfn-context-definition) contains the ‘@propagate` keyword, its value MUST be `true` or `false`.

Returns:

  • (RDF::Vocabulary::Term)


63
64
65
# File 'lib/rdf/vocab/jsonld.rb', line 63

def propagate
  @propagate
end

#protectedRDF::Vocabulary::Term (readonly)

If the [context definition](www.w3.org/TR/json-ld11/#dfn-context-definition) contains the ‘@protected` keyword, its value MUST be `true` or `false`.

Returns:

  • (RDF::Vocabulary::Term)


67
68
69
# File 'lib/rdf/vocab/jsonld.rb', line 67

def protected
  @protected
end

#reverseRDF::Vocabulary::Term (readonly)

The ‘@reverse` mapping of an [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions).

Returns:

  • (RDF::Vocabulary::Term)


71
72
73
# File 'lib/rdf/vocab/jsonld.rb', line 71

def reverse
  @reverse
end

#setContainerTypeRDF::Vocabulary::Term (readonly)

If the [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions) contains the ‘@container` keyword, its value MUST be either `@list`, `@set`, `@language`, `@index`, `@id`, `@graph`, `@type`, or be `null` or an array containing exactly any one of those keywords.

Returns:

  • (RDF::Vocabulary::Term)


131
132
133
# File 'lib/rdf/vocab/jsonld.rb', line 131

def setContainerType
  @setContainerType
end

#termRDF::Vocabulary::Term (readonly)

The term associated with a [term definition](#TermDefinition).

Returns:

  • (RDF::Vocabulary::Term)


75
76
77
# File 'lib/rdf/vocab/jsonld.rb', line 75

def term
  @term
end

#TermDefinitionRDF::Vocabulary::Term (readonly)

A [term definition](www.w3.org/TR/json-ld11/#dfn-term-definitions) is an entry in a [context](#Context), where the key defines a term which may be used within a dictionary as a key, type, or elsewhere that a string is interpreted as a vocabulary item. Its value is an [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions). An [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definition) MUST be a map composed of zero or more keys from ‘@id`, `@reverse`, `@type`, `@language`, `@container`, `@context`, `@prefix`, `@propagate`, or `@protected`. An expanded term definition SHOULD NOT contain any other keys.

Returns:

  • (RDF::Vocabulary::Term)


19
20
21
# File 'lib/rdf/vocab/jsonld.rb', line 19

def TermDefinition
  @TermDefinition
end

#typeRDF::Vocabulary::Term (readonly)

If the [context definition](www.w3.org/TR/json-ld11/#dfn-context-definition) contains the ‘@type` keyword, its value MUST be a map with only the entry `@container` set to `@set`, and optionally an entry `@protected`. If the [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions) contains the `@type` keyword, its value MUST be an _IRI reference_, a term, `null`, or one of the keywords `@id`, `@json`, `@none`, or `@vocab`.

Returns:

  • (RDF::Vocabulary::Term)


79
80
81
# File 'lib/rdf/vocab/jsonld.rb', line 79

def type
  @type
end

#typeContainerTypeRDF::Vocabulary::Term (readonly)

If the [expanded term definition](www.w3.org/TR/json-ld11/#dfn-expanded-term-definitions) contains the ‘@container` keyword, its value MUST be either `@list`, `@set`, `@language`, `@index`, `@id`, `@graph`, `@type`, or be `null` or an array containing exactly any one of those keywords.

Returns:

  • (RDF::Vocabulary::Term)


135
136
137
# File 'lib/rdf/vocab/jsonld.rb', line 135

def typeContainerType
  @typeContainerType
end

#versionRDF::Vocabulary::Term (readonly)

The [processing mode](www.w3.org/TR/json-ld11/#dfn-processing-mode) defines how a JSON-LD document is processed. By default, all documents are assumed to be conformant with [JSON-LD 1.1`](www.w3.org/TR/json-ld11). By defining a different version via explicit API option, other processing modes can be accessed. This specification defines extensions for the ‘json-ld-1.1` processing mode.

Returns:

  • (RDF::Vocabulary::Term)


83
84
85
# File 'lib/rdf/vocab/jsonld.rb', line 83

def version
  @version
end

#vocabRDF::Vocabulary::Term (readonly)

Used to expand properties and values in ‘@type` with a common prefix IRI.

Returns:

  • (RDF::Vocabulary::Term)


87
88
89
# File 'lib/rdf/vocab/jsonld.rb', line 87

def vocab
  @vocab
end