public interface TripleStore
Modifier and Type | Method and Description |
---|---|
String |
add(String contextName,
String namespace,
String type,
PropertyBag properties)
Add to the triple store statements for creating a new resource, instance of a specific class
|
void |
add(String contextName,
String namespace,
String type,
PropertyBags objects)
Add to the triple store statements for creating new resources, instances of a specific class
|
void |
add(TripleStore source)
Add all statements of the source Triplestore to this Triplestore.
|
void |
addNamespace(String prefix,
String namespace)
Add a namespace to the triple store
|
void |
clear(String contextName)
Delete all the statements in a given context.
|
Set<String> |
contextNames()
Get all the context names currently defined in the Triplestore.
|
void |
defineQueryPrefix(String prefix,
String namespace)
Define namespace prefix bindings that will be used in the text of queries.
|
String |
getImplementationName()
Return the implementation name defined in the triple store
|
List<PrefixNamespace> |
getNamespaces()
Return the namespaces defined in the triple store
|
void |
print(Consumer<String> liner)
Print a summary of the contents of the Triplestore.
|
void |
print(PrintStream out)
Print a summary of the contents of the Triplestore.
|
PropertyBags |
query(String query)
Perform a SPARQL query on the Triplestore.
|
void |
read(InputStream is,
String base,
String contextName)
Read statements from an input stream and store them in the Triplestore under the given context name.
|
void |
update(String queryText)
Perform a SPARQL update on the Triplestore.
|
void |
write(DataSource ds)
Write the contents of the Triplestore in the given data source.
|
void read(InputStream is, String base, String contextName)
is
- input stream containing statements that will be added to the Triplestorebase
- the base URI used to convert relative URI's to absolute URI'scontextName
- name of the context where statements will be addedvoid write(DataSource ds)
ds
- the output data sourcevoid print(PrintStream out)
out
- output stream where the summary will be writtenvoid print(Consumer<String> liner)
liner
- a function that accepts strings (the lines of the summary report)void clear(String contextName)
contextName
- the context to be clearedvoid defineQueryPrefix(String prefix, String namespace)
tripleStore.defineQueryPrefix("foaf", "http://xmlns.com/foaf/0.1/");
prefix
- the prefix to be used in the text of queries as a replacement for the namespacenamespace
- the URL of the namespacePropertyBags query(String query)
query
- the text of the query, written in SPARQL query languagevoid add(String contextName, String namespace, String type, PropertyBags objects)
contextName
- context where the statements are addednamespace
- the namespace of the class of the new resourcestype
- the class of the new resourcesobjects
- properties of the resourcesString add(String contextName, String namespace, String type, PropertyBag properties)
contextName
- the context where the statements are addednamespace
- the namespace of the class of the new resourcetype
- the class of the new resourceproperties
- properties of the resourcevoid add(TripleStore source)
source
- the Triplestore containing statements to be added to this TriplestoreSet<String> contextNames()
void update(String queryText)
query
- the text of the query, written in SPARQL Update languagevoid addNamespace(String prefix, String namespace)
prefix
- the prefix of the namespacenamespace
- the namespaceList<PrefixNamespace> getNamespaces()
String getImplementationName()
Copyright © 2020. All rights reserved.