Package com.powsybl.triplestore.api
Class AbstractPowsyblTripleStore
- java.lang.Object
-
- com.powsybl.triplestore.api.AbstractPowsyblTripleStore
-
- All Implemented Interfaces:
TripleStore
- Direct Known Subclasses:
TripleStoreRDF4J
public abstract class AbstractPowsyblTripleStore extends Object implements TripleStore
- Author:
- Luma ZamarreƱo
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPowsyblTripleStore()
protected
AbstractPowsyblTripleStore(TripleStoreOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
adjustedQuery(String q)
protected static String
createRdfId()
void
defineQueryPrefix(String prefix, String cimNamespace)
Define namespace prefix bindings that will be used in the text of queries.TripleStoreOptions
getOptions()
Obtain the options that have been used to configure this Triplestoreprotected static String
namespaceForContexts()
protected OutputStream
outputStream(DataSource ds, String cname)
void
print(Consumer<String> liner)
Print a summary of the contents of the Triplestore.protected static String
rdfDescriptionClass()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.triplestore.api.TripleStore
add, add, add, addNamespace, clear, contextNames, getImplementationName, getNamespaces, print, query, read, update, write, write
-
-
-
-
Constructor Detail
-
AbstractPowsyblTripleStore
protected AbstractPowsyblTripleStore()
-
AbstractPowsyblTripleStore
protected AbstractPowsyblTripleStore(TripleStoreOptions options)
-
-
Method Detail
-
getOptions
public TripleStoreOptions getOptions()
Description copied from interface:TripleStore
Obtain the options that have been used to configure this Triplestore- Specified by:
getOptions
in interfaceTripleStore
- Returns:
- options Triplestore configuration options
-
createRdfId
protected static String createRdfId()
-
defineQueryPrefix
public void defineQueryPrefix(String prefix, String cimNamespace)
Description copied from interface:TripleStore
Define namespace prefix bindings that will be used in the text of queries. Example:tripleStore.defineQueryPrefix("foaf", "http://xmlns.com/foaf/0.1/");
- Specified by:
defineQueryPrefix
in interfaceTripleStore
- Parameters:
prefix
- the prefix to be used in the text of queries as a replacement for the namespacecimNamespace
- the URL of the namespace
-
print
public void print(Consumer<String> liner)
Description copied from interface:TripleStore
Print a summary of the contents of the Triplestore. Typically a list of contexts and its size (number of statements).- Specified by:
print
in interfaceTripleStore
- Parameters:
liner
- a function that accepts strings (the lines of the summary report)
-
namespaceForContexts
protected static String namespaceForContexts()
-
rdfDescriptionClass
protected static String rdfDescriptionClass()
-
outputStream
protected OutputStream outputStream(DataSource ds, String cname)
-
-