Skip to content

Package: TransactionalRepositoryConnection

TransactionalRepositoryConnection

nameinstructionbranchcomplexitylinemethod
TransactionalRepositoryConnection(RepositoryConnection)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
add(File, String, RDFFormat, Resource[])
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
add(InputStream, String, RDFFormat, Resource[])
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
add(Iterable, Resource[])
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
add(Iteration, Resource[])
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
add(Reader, String, RDFFormat, Resource[])
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
add(Resource, URI, Value, Resource[])
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
add(Statement, Resource[])
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
add(URL, String, RDFFormat, Resource[])
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
begin()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
begin(IsolationLevel)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
clear(Resource[])
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
clearNamespaces()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
close()
M: 0 C: 1
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
commit()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
export(RDFHandler, Resource[])
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
exportStatements(Resource, URI, Value, boolean, RDFHandler, Resource[])
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getContextIDs()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getIsolationLevel()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getNamespace(String)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getNamespaces()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getParserConfig()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getRepository()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getStatements(Resource, URI, Value, boolean, Resource[])
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getValueFactory()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hasStatement(Resource, URI, Value, boolean, Resource[])
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hasStatement(Statement, boolean, Resource[])
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isActive()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isAutoCommit()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isEmpty()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isOpen()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
prepareBooleanQuery(QueryLanguage, String)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
prepareBooleanQuery(QueryLanguage, String, String)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
prepareGraphQuery(QueryLanguage, String)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
prepareGraphQuery(QueryLanguage, String, String)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
prepareQuery(QueryLanguage, String)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
prepareQuery(QueryLanguage, String, String)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
prepareTupleQuery(QueryLanguage, String)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
prepareTupleQuery(QueryLanguage, String, String)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
prepareUpdate(QueryLanguage, String)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
prepareUpdate(QueryLanguage, String, String)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
remove(Iterable, Resource[])
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
remove(Iteration, Resource[])
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
remove(Resource, URI, Value, Resource[])
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
remove(Statement, Resource[])
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
removeNamespace(String)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
rollback()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setAutoCommit(boolean)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setIsolationLevel(IsolationLevel)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setNamespace(String, String)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setParserConfig(ParserConfig)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
size(Resource[])
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package cz.cvut.kbss.ontodriver.sesame.connector;
2:
3: import info.aduna.iteration.Iteration;
4: import org.openrdf.IsolationLevel;
5: import org.openrdf.model.*;
6: import org.openrdf.query.*;
7: import org.openrdf.repository.*;
8: import org.openrdf.rio.*;
9:
10: import java.io.File;
11: import java.io.IOException;
12: import java.io.InputStream;
13: import java.io.Reader;
14: import java.net.URL;
15:
16: /**
17: * Wraps a standard Sesame {@link RepositoryConnection} and prevents its closing.
18: * <p>
19: * This is because the connector will handle closing when a transaction finishes or the connector is closed.
20: *
21: * @see PoolingStorageConnector
22: */
23: class TransactionalRepositoryConnection implements RepositoryConnection {
24:
25: private final RepositoryConnection wrappedConnection;
26:
27: TransactionalRepositoryConnection(RepositoryConnection wrappedConnection) {
28: this.wrappedConnection = wrappedConnection;
29: }
30:
31: @Override
32: public Repository getRepository() {
33: return wrappedConnection.getRepository();
34: }
35:
36: @Override
37: public void setParserConfig(ParserConfig config) {
38: wrappedConnection.setParserConfig(config);
39: }
40:
41: @Override
42: public ParserConfig getParserConfig() {
43: return wrappedConnection.getParserConfig();
44: }
45:
46: @Override
47: public ValueFactory getValueFactory() {
48: return wrappedConnection.getValueFactory();
49: }
50:
51: @Override
52: public boolean isOpen() throws RepositoryException {
53: return wrappedConnection.isOpen();
54: }
55:
56: @Override
57: public void close() throws RepositoryException {
58: // Do nothing !!!
59: }
60:
61: @Override
62: public Query prepareQuery(QueryLanguage ql, String query) throws RepositoryException, MalformedQueryException {
63: return wrappedConnection.prepareQuery(ql, query);
64: }
65:
66: @Override
67: public Query prepareQuery(QueryLanguage ql, String query, String baseURI)
68: throws RepositoryException, MalformedQueryException {
69: return wrappedConnection.prepareQuery(ql, query, baseURI);
70: }
71:
72: @Override
73: public TupleQuery prepareTupleQuery(QueryLanguage ql, String query)
74: throws RepositoryException, MalformedQueryException {
75: return wrappedConnection.prepareTupleQuery(ql, query);
76: }
77:
78: @Override
79: public TupleQuery prepareTupleQuery(QueryLanguage ql, String query, String baseURI)
80: throws RepositoryException, MalformedQueryException {
81: return wrappedConnection.prepareTupleQuery(ql, query, baseURI);
82: }
83:
84: @Override
85: public GraphQuery prepareGraphQuery(QueryLanguage ql, String query)
86: throws RepositoryException, MalformedQueryException {
87: return wrappedConnection.prepareGraphQuery(ql, query);
88: }
89:
90: @Override
91: public GraphQuery prepareGraphQuery(QueryLanguage ql, String query, String baseURI)
92: throws RepositoryException, MalformedQueryException {
93: return wrappedConnection.prepareGraphQuery(ql, query, baseURI);
94: }
95:
96: @Override
97: public BooleanQuery prepareBooleanQuery(QueryLanguage ql, String query)
98: throws RepositoryException, MalformedQueryException {
99: return wrappedConnection.prepareBooleanQuery(ql, query);
100: }
101:
102: @Override
103: public BooleanQuery prepareBooleanQuery(QueryLanguage ql, String query, String baseURI)
104: throws RepositoryException, MalformedQueryException {
105: return wrappedConnection.prepareBooleanQuery(ql, query, baseURI);
106: }
107:
108: @Override
109: public Update prepareUpdate(QueryLanguage ql, String update) throws RepositoryException, MalformedQueryException {
110: return wrappedConnection.prepareUpdate(ql, update);
111: }
112:
113: @Override
114: public Update prepareUpdate(QueryLanguage ql, String update, String baseURI)
115: throws RepositoryException, MalformedQueryException {
116: return wrappedConnection.prepareUpdate(ql, update, baseURI);
117: }
118:
119: @Override
120: public RepositoryResult<Resource> getContextIDs() throws RepositoryException {
121: return wrappedConnection.getContextIDs();
122: }
123:
124: @Override
125: public RepositoryResult<Statement> getStatements(Resource subj, URI pred, Value obj, boolean includeInferred,
126: Resource... contexts) throws RepositoryException {
127: return wrappedConnection.getStatements(subj, pred, obj, includeInferred, contexts);
128: }
129:
130: @Override
131: public boolean hasStatement(Resource subj, URI pred, Value obj, boolean includeInferred, Resource... contexts)
132: throws RepositoryException {
133: return wrappedConnection.hasStatement(subj, pred, obj, includeInferred, contexts);
134: }
135:
136: @Override
137: public boolean hasStatement(Statement st, boolean includeInferred, Resource... contexts)
138: throws RepositoryException {
139: return wrappedConnection.hasStatement(st, includeInferred, contexts);
140: }
141:
142: @Override
143: public void exportStatements(Resource subj, URI pred, Value obj, boolean includeInferred, RDFHandler handler,
144: Resource... contexts) throws RepositoryException, RDFHandlerException {
145: wrappedConnection.exportStatements(subj, pred, obj, includeInferred, handler, contexts);
146: }
147:
148: @Override
149: public void export(RDFHandler handler, Resource... contexts) throws RepositoryException, RDFHandlerException {
150: wrappedConnection.export(handler, contexts);
151: }
152:
153: @Override
154: public long size(Resource... contexts) throws RepositoryException {
155: return wrappedConnection.size(contexts);
156: }
157:
158: @Override
159: public boolean isEmpty() throws RepositoryException {
160: return wrappedConnection.isEmpty();
161: }
162:
163: @Override
164: public void setAutoCommit(boolean autoCommit) throws RepositoryException {
165: wrappedConnection.setAutoCommit(autoCommit);
166: }
167:
168: @Override
169: public boolean isAutoCommit() throws RepositoryException {
170: return wrappedConnection.isAutoCommit();
171: }
172:
173: @Override
174: public boolean isActive() throws UnknownTransactionStateException, RepositoryException {
175: return wrappedConnection.isActive();
176: }
177:
178: @Override
179: public void setIsolationLevel(IsolationLevel level) throws IllegalStateException {
180: wrappedConnection.setIsolationLevel(level);
181: }
182:
183: @Override
184: public IsolationLevel getIsolationLevel() {
185: return wrappedConnection.getIsolationLevel();
186: }
187:
188: @Override
189: public void begin() throws RepositoryException {
190: wrappedConnection.begin();
191: }
192:
193: @Override
194: public void begin(IsolationLevel level) throws RepositoryException {
195: wrappedConnection.begin(level);
196: }
197:
198: @Override
199: public void commit() throws RepositoryException {
200: wrappedConnection.commit();
201: }
202:
203: @Override
204: public void rollback() throws RepositoryException {
205: wrappedConnection.rollback();
206: }
207:
208: @Override
209: public void add(InputStream in, String baseURI, RDFFormat dataFormat, Resource... contexts)
210: throws IOException, RDFParseException, RepositoryException {
211: wrappedConnection.add(in, baseURI, dataFormat, contexts);
212: }
213:
214: @Override
215: public void add(Reader reader, String baseURI, RDFFormat dataFormat, Resource... contexts)
216: throws IOException, RDFParseException, RepositoryException {
217: wrappedConnection.add(reader, baseURI, dataFormat, contexts);
218: }
219:
220: @Override
221: public void add(URL url, String baseURI, RDFFormat dataFormat, Resource... contexts)
222: throws IOException, RDFParseException, RepositoryException {
223: wrappedConnection.add(url, baseURI, dataFormat, contexts);
224: }
225:
226: @Override
227: public void add(File file, String baseURI, RDFFormat dataFormat, Resource... contexts)
228: throws IOException, RDFParseException, RepositoryException {
229: wrappedConnection.add(file, baseURI, dataFormat, contexts);
230: }
231:
232: @Override
233: public void add(Resource subject, URI predicate, Value object, Resource... contexts) throws RepositoryException {
234: wrappedConnection.add(subject, predicate, object, contexts);
235: }
236:
237: @Override
238: public void add(Statement st, Resource... contexts) throws RepositoryException {
239: wrappedConnection.add(st, contexts);
240: }
241:
242: @Override
243: public void add(Iterable<? extends Statement> statements, Resource... contexts) throws RepositoryException {
244: wrappedConnection.add(statements, contexts);
245: }
246:
247: @Override
248: public <E extends Exception> void add(Iteration<? extends Statement, E> statements, Resource... contexts)
249: throws RepositoryException, E {
250: wrappedConnection.add(statements, contexts);
251: }
252:
253: @Override
254: public void remove(Resource subject, URI predicate, Value object, Resource... contexts) throws RepositoryException {
255: wrappedConnection.remove(subject, predicate, object, contexts);
256: }
257:
258: @Override
259: public void remove(Statement st, Resource... contexts) throws RepositoryException {
260: wrappedConnection.remove(st, contexts);
261: }
262:
263: @Override
264: public void remove(Iterable<? extends Statement> statements, Resource... contexts) throws RepositoryException {
265: wrappedConnection.remove(statements, contexts);
266: }
267:
268: @Override
269: public <E extends Exception> void remove(Iteration<? extends Statement, E> statements, Resource... contexts)
270: throws RepositoryException, E {
271: wrappedConnection.remove(statements, contexts);
272: }
273:
274: @Override
275: public void clear(Resource... contexts) throws RepositoryException {
276: wrappedConnection.clear(contexts);
277: }
278:
279: @Override
280: public RepositoryResult<Namespace> getNamespaces() throws RepositoryException {
281: return wrappedConnection.getNamespaces();
282: }
283:
284: @Override
285: public String getNamespace(String prefix) throws RepositoryException {
286: return wrappedConnection.getNamespace(prefix);
287: }
288:
289: @Override
290: public void setNamespace(String prefix, String name) throws RepositoryException {
291: wrappedConnection.setNamespace(prefix, name);
292: }
293:
294: @Override
295: public void removeNamespace(String prefix) throws RepositoryException {
296: wrappedConnection.removeNamespace(prefix);
297: }
298:
299: @Override
300: public void clearNamespaces() throws RepositoryException {
301: wrappedConnection.clearNamespaces();
302: }
303: }