Class Context
- All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, SequencedMap<String, Object>
A helper class which still stores all the values in a map but gives member
variables easily access certain keys
- Author:
- tristan
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionContext()Context(JsonLdOptions opts) Context(Object context, JsonLdOptions opts) Context(Map<String, Object> map, JsonLdOptions opts) -
Method Summary
Modifier and TypeMethodDescriptionstatic String_iriCompactionStep5point4(String iri, Object value, String compactIRI, String candidate, Map<String, Object> termDefinitions) clone()compactValue(String activeProperty, Map<String, Object> value) Value Compaction Algorithm http://json-ld.org/spec/latest/json-ld-api/#value-compactionexpandValue(String activeProperty, Object value) getContainer(String property) Retrieve container mapping.Inverse Context Creation http://json-ld.org/spec/latest/json-ld-api/#inverse-context-creation Generates an inverse context for use in the compaction algorithm, if not already generated for the given active context.getLanguageMapping(String property) getPrefixes(boolean onlyCommonPrefixes) Return a map of potential RDF prefixes based on the JSON-LD Term Definitions in this context.getTypeMapping(String property) isReverseProperty(String property) Context Processing Algorithm http://json-ld.org/spec/latest/json-ld-api/#context-processing-algorithmsDeprecated.Methods inherited from class LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class HashMap
compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class AbstractMap
equals, hashCode, toStringMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Field Details
-
inverse
-
-
Constructor Details
-
Context
public Context() -
Context
-
Context
-
Context
-
Context
-
-
Method Details
-
compactValue
-
parse
Context Processing Algorithm http://json-ld.org/spec/latest/json-ld-api/#context-processing-algorithms- Parameters:
localContext- The Local Context object.remoteContexts- The list of Strings denoting the remote Context URLs.- Returns:
- The parsed and merged Context.
- Throws:
JsonLdError- If there is an error parsing the contexts.
-
parse
- Throws:
JsonLdError
-
_iriCompactionStep5point4
-
getPrefixes
Return a map of potential RDF prefixes based on the JSON-LD Term Definitions in this context.No guarantees of the prefixes are given, beyond that it will not contain ":".
- Parameters:
onlyCommonPrefixes- Iftrue, the result will not include "not so useful" prefixes, such as "term1": "http://example.com/term1", e.g. all IRIs will end with "/" or "#". Iffalse, all potential prefixes are returned.- Returns:
- A map from prefix string to IRI string
-
clone
-
getInverse
-
getContainer
-
isReverseProperty
-
getTypeMapping
-
getLanguageMapping
-
expandValue
- Throws:
JsonLdError
-
serialize
Deprecated.
-