public class Context extends LinkedHashMap<String,Object>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
Context() |
Context(JsonLdOptions opts) |
Context(Map<String,Object> map) |
Context(Map<String,Object> map,
JsonLdOptions opts) |
Context(Object context,
JsonLdOptions opts) |
| Modifier and Type | Method and Description |
|---|---|
static String |
_iriCompactionStep5point4(String iri,
Object value,
String compactIRI,
String candidate,
Map<String,Object> termDefinitions) |
Context |
clone() |
Object |
compactValue(String activeProperty,
Map<String,Object> value)
Value Compaction Algorithm
http://json-ld.org/spec/latest/json-ld-api/#value-compaction
|
Object |
expandValue(String activeProperty,
Object value) |
String |
getContainer(String property)
Retrieve container mapping.
|
Map<String,Object> |
getInverse()
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.
|
String |
getLanguageMapping(String property) |
Map<String,String> |
getPrefixes(boolean onlyCommonPrefixes)
Return a map of potential RDF prefixes based on the JSON-LD Term
Definitions in this context.
|
String |
getTypeMapping(String property) |
Boolean |
isReverseProperty(String property) |
Context |
parse(Object localContext) |
Context |
parse(Object localContext,
List<String> remoteContexts)
Context Processing Algorithm
http://json-ld.org/spec/latest/json-ld-api/#context-processing-algorithms
|
Map<String,Object> |
serialize() |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuescompute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizepublic Context()
public Context(JsonLdOptions opts)
public Context(Map<String,Object> map, JsonLdOptions opts)
public Context(Object context, JsonLdOptions opts)
public Object compactValue(String activeProperty, Map<String,Object> value)
activeProperty - The Active Propertyvalue - The value to compactpublic Context parse(Object localContext, List<String> remoteContexts) throws JsonLdError
localContext - The Local Context object.remoteContexts - The list of Strings denoting the remote Context URLs.JsonLdError - If there is an error parsing the contexts.public Context parse(Object localContext) throws JsonLdError
JsonLdErrorpublic static String _iriCompactionStep5point4(String iri, Object value, String compactIRI, String candidate, Map<String,Object> termDefinitions)
public Map<String,String> getPrefixes(boolean onlyCommonPrefixes)
No guarantees of the prefixes are given, beyond that it will not contain ":".
onlyCommonPrefixes - If true, the result will not include "not so
useful" prefixes, such as "term1": "http://example.com/term1",
e.g. all IRIs will end with "/" or "#". If false,
all potential prefixes are returned.public Map<String,Object> getInverse()
public String getContainer(String property)
property - The Property to get a container mapping for.public Object expandValue(String activeProperty, Object value) throws JsonLdError
JsonLdErrorCopyright © 2018. All rights reserved.