File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
src/org/linkeddatafragments Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -37,4 +37,7 @@ public String getDescription() {
37
37
public String getTitle () {
38
38
return this .title ;
39
39
};
40
+
41
+ @ Override
42
+ public void close () {}
40
43
}
Original file line number Diff line number Diff line change 1
1
package org .linkeddatafragments .datasource ;
2
2
3
+ import java .io .Closeable ;
4
+
3
5
import com .hp .hpl .jena .rdf .model .Property ;
4
6
import com .hp .hpl .jena .rdf .model .RDFNode ;
5
7
import com .hp .hpl .jena .rdf .model .Resource ;
8
10
* A data source of Basic Linked Data Fragments.
9
11
* @author Ruben Verborgh
10
12
*/
11
- public interface IDataSource {
13
+ public interface IDataSource extends Closeable {
12
14
/**
13
15
* Gets a page of the Basic Linked Data Fragment matching the specified triple pattern.
14
16
* @param subject the subject (null to match any subject)
Original file line number Diff line number Diff line change @@ -114,6 +114,19 @@ public void init(ServletConfig servletConfig) throws ServletException {
114
114
}
115
115
}
116
116
117
+ @ Override
118
+ public void destroy ()
119
+ {
120
+ for ( IDataSource dataSource : dataSources .values () ) {
121
+ try {
122
+ dataSource .close ();
123
+ }
124
+ catch ( Exception e ) {
125
+ // ignore
126
+ }
127
+ }
128
+ }
129
+
117
130
/**
118
131
* Get the datasource
119
132
*
You can’t perform that action at this time.
0 commit comments