public class RDFDataset extends LinkedHashMap<String,Object>
| Modifier and Type | Class and Description |
|---|---|
static class |
RDFDataset.BlankNode |
static class |
RDFDataset.IRI |
static class |
RDFDataset.Literal |
static class |
RDFDataset.Node |
static class |
RDFDataset.Quad |
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
RDFDataset() |
RDFDataset(JsonLdApi jsonLdApi) |
| Modifier and Type | Method and Description |
|---|---|
void |
addQuad(String subject,
String predicate,
String object,
String graph)
Adds a triple to the specified graph of this dataset
|
void |
addQuad(String s,
String p,
String value,
String datatype,
String language,
String graph)
Adds a triple to the specified graph of this dataset
|
void |
addTriple(String subject,
String predicate,
String object)
Adds a triple to the default graph of this dataset
|
void |
addTriple(String subject,
String predicate,
String value,
String datatype,
String language)
Adds a triple to the @default graph of this dataset
|
void |
clearNamespaces()
clears all the namespaces in this dataset
|
Map<String,Object> |
getContext()
Returns a valid context containing any namespaces set
|
String |
getNamespace(String ns) |
Map<String,String> |
getNamespaces() |
List<RDFDataset.Quad> |
getQuads(String graphName) |
Set<String> |
graphNames() |
void |
parseContext(Object contextLike)
parses a context object and sets any namespaces found within it
|
void |
setNamespace(String ns,
String prefix) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, 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 RDFDataset()
public RDFDataset(JsonLdApi jsonLdApi)
public void clearNamespaces()
public Map<String,Object> getContext()
public void parseContext(Object contextLike) throws JsonLdError
contextLike - The context to parseJsonLdError - If the context can't be parsedpublic void addTriple(String subject, String predicate, String value, String datatype, String language)
subject - the subject for the triplepredicate - the predicate for the triplevalue - the value of the literal object for the tripledatatype - the datatype of the literal object for the triple (null values
will default to xsd:string)language - the language of the literal object for the triple (or null)public void addQuad(String s, String p, String value, String datatype, String language, String graph)
s - the subject for the triplep - the predicate for the triplevalue - the value of the literal object for the tripledatatype - the datatype of the literal object for the triple (null values
will default to xsd:string)graph - the graph to add this triple tolanguage - the language of the literal object for the triple (or null)public void addTriple(String subject, String predicate, String object)
subject - the subject for the triplepredicate - the predicate for the tripleobject - the object for the triplepublic void addQuad(String subject, String predicate, String object, String graph)
subject - the subject for the triplepredicate - the predicate for the tripleobject - the object for the triplegraph - the graph to add this triple topublic List<RDFDataset.Quad> getQuads(String graphName)
Copyright © 2018. All rights reserved.