File tree Expand file tree Collapse file tree
src/org/linkeddatafragments Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,4 +37,7 @@ public String getDescription() {
3737 public String getTitle () {
3838 return this .title ;
3939 };
40+
41+ @ Override
42+ public void close () {}
4043}
Original file line number Diff line number Diff line change 11package org .linkeddatafragments .datasource ;
22
3+ import java .io .Closeable ;
4+
35import com .hp .hpl .jena .rdf .model .Property ;
46import com .hp .hpl .jena .rdf .model .RDFNode ;
57import com .hp .hpl .jena .rdf .model .Resource ;
810 * A data source of Basic Linked Data Fragments.
911 * @author Ruben Verborgh
1012 */
11- public interface IDataSource {
13+ public interface IDataSource extends Closeable {
1214 /**
1315 * Gets a page of the Basic Linked Data Fragment matching the specified triple pattern.
1416 * @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 {
114114 }
115115 }
116116
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+
117130 /**
118131 * Get the datasource
119132 *
You can’t perform that action at this time.
0 commit comments