@Override public void close() { if(doClose) { datasetGraph.close(); } } }
@Override public void close() { dsg.close() ; }
@Override public void close() { datasetGraph.close(); }
@Override public void shutdown() throws PluginException { LOGGER.debug("Shutting down ontology plugin: {}", PLUGIN_NAME); if (dataset != null) { dataset.close(); } }
public static void ser(DatasetGraph dsg, byte[] b, Lang l) { InputStream is = new ByteArrayInputStream(b); RDFDataMgr.read(dsg, is, l); closeStream(is); dsg.close(); }
@Override public void close() { get().close(); } }
@Override public void close() { getW().close(); }
/** * Serialize a list of quads * @param quads the quads * @return a string */ public static String serialize(final List<Quad> quads) { try (final StringWriter str = new StringWriter()) { final DatasetGraph datasetGraph = create(); quads.stream().map(rdf::asJenaQuad).forEach(datasetGraph::add); write(str, datasetGraph, NQUADS); datasetGraph.close(); return str.toString(); } catch (final IOException ex) { LOGGER.error("Error processing dataset in quad serializer: ", ex.getMessage()); throw new RuntimeTrellisException("Error processing dataset", ex); } }
public void release() { if ( graph != null ) { graph.close(); graph = null ; model = null ; } if ( dsg != null ) { dsg.close(); dsg = null ; } } }
public void release() { if ( graph != null ) { graph.close(); graph = null ; model = null ; } if ( dsg != null ) { dsg.close(); dsg = null ; } } }
@After public void tearDown() { TDB.sync(dsGraph); dsGraph.close(); TDB.closedown(); }
private void expel(DatasetGraph database) { // Text databases. // Close the in-JVM objects for Lucene index and databases. if ( database instanceof DatasetGraphText ) { DatasetGraphText dbtext = (DatasetGraphText)database; database = dbtext.getBase(); dbtext.getTextIndex().close(); } boolean isTDB1 = org.apache.jena.tdb.sys.TDBInternal.isTDB1(database); boolean isTDB2 = org.apache.jena.tdb2.sys.TDBInternal.isTDB2(database); if ( ( isTDB1 || isTDB2 ) ) { // JENA-1586: Remove database from the process. if ( isTDB1 ) org.apache.jena.tdb.sys.TDBInternal.expel(database); if ( isTDB2 ) org.apache.jena.tdb2.sys.TDBInternal.expel(database); } else dataset.close(); }
private void expel(DatasetGraph database) { // Text databases. // Close the in-JVM objects for Lucene index and databases. if ( database instanceof DatasetGraphText ) { DatasetGraphText dbtext = (DatasetGraphText)database; database = dbtext.getBase(); dbtext.getTextIndex().close(); } boolean isTDB1 = org.apache.jena.tdb.sys.TDBInternal.isTDB1(database); boolean isTDB2 = org.apache.jena.tdb2.sys.TDBInternal.isTDB2(database); if ( ( isTDB1 || isTDB2 ) ) { // JENA-1586: Remove database from the process. if ( isTDB1 ) org.apache.jena.tdb.sys.TDBInternal.expel(database); if ( isTDB2 ) org.apache.jena.tdb2.sys.TDBInternal.expel(database); } else dataset.close(); }