Package com.powsybl.triplestore.api
Class AbstractPowsyblTripleStore
- java.lang.Object
-
- com.powsybl.triplestore.api.AbstractPowsyblTripleStore
-
- All Implemented Interfaces:
TripleStore
- Direct Known Subclasses:
TripleStoreJena
,TripleStoreRDF4J
public abstract class AbstractPowsyblTripleStore extends Object implements TripleStore
- Author:
- Luma ZamarreƱo
-
-
Constructor Summary
Constructors Constructor Description AbstractPowsyblTripleStore()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
adjustedQuery(String q)
void
defineQueryPrefix(String prefix, String cimNamespace)
Define namespace prefix bindings that will be used in the text of queries.protected 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
-
-
-
-
Method Detail
-
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)
-
-