public class TripleStoreRDF4J extends AbstractPowsyblTripleStore
Constructor and Description |
---|
TripleStoreRDF4J() |
Modifier and Type | Method and Description |
---|---|
String |
add(String contextName,
String objNs,
String objType,
PropertyBag object)
Add to the triple store statements for creating a new resource, instance of a specific class
|
void |
add(String contextName,
String objNs,
String objType,
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.
|
String |
getImplementationName()
Return the implementation name defined in the triple store
|
List<PrefixNamespace> |
getNamespaces()
Return the namespaces defined in the triple store
|
org.eclipse.rdf4j.repository.Repository |
getRepository() |
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 baseName,
String contextName)
Read statements from an input stream and store them in the Triplestore under the given context name.
|
void |
setWriteBySubject(boolean writeBySubject) |
void |
update(String query)
Perform a SPARQL update on the Triplestore.
|
void |
write(DataSource ds)
Write the contents of the Triplestore in the given data source.
|
adjustedQuery, defineQueryPrefix, namespaceForContexts, outputStream, print, rdfDescriptionClass
public String getImplementationName()
TripleStore
public org.eclipse.rdf4j.repository.Repository getRepository()
public void setWriteBySubject(boolean writeBySubject)
public void read(InputStream is, String baseName, String contextName)
TripleStore
is
- input stream containing statements that will be added to the TriplestorebaseName
- the base URI used to convert relative URI's to absolute URI'scontextName
- name of the context where statements will be addedpublic void write(DataSource ds)
TripleStore
ds
- the output data sourcepublic void print(PrintStream out)
TripleStore
out
- output stream where the summary will be writtenpublic Set<String> contextNames()
TripleStore
public void clear(String contextName)
TripleStore
contextName
- the context to be clearedpublic PropertyBags query(String query)
TripleStore
query
- the text of the query, written in SPARQL query languagepublic void add(TripleStore source)
TripleStore
source
- the Triplestore containing statements to be added to this Triplestorepublic void update(String query)
TripleStore
public void add(String contextName, String objNs, String objType, PropertyBags objects)
TripleStore
contextName
- context where the statements are addedobjNs
- the namespace of the class of the new resourcesobjType
- the class of the new resourcesobjects
- properties of the resourcespublic String add(String contextName, String objNs, String objType, PropertyBag object)
TripleStore
contextName
- the context where the statements are addedobjNs
- the namespace of the class of the new resourceobjType
- the class of the new resourceobject
- properties of the resourcepublic void addNamespace(String prefix, String namespace)
TripleStore
prefix
- the prefix of the namespacenamespace
- the namespacepublic List<PrefixNamespace> getNamespaces()
TripleStore
Copyright © 2020. All rights reserved.