| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>DataStore (Apache SIS 1.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2019-09-20"> |
| <meta name="keywords" content="org.apache.sis.storage.DataStore class"> |
| <meta name="keywords" content="provider"> |
| <meta name="keywords" content="listeners"> |
| <meta name="keywords" content="getProvider()"> |
| <meta name="keywords" content="getOpenParameters()"> |
| <meta name="keywords" content="setLocale()"> |
| <meta name="keywords" content="getLocale()"> |
| <meta name="keywords" content="getDisplayName()"> |
| <meta name="keywords" content="getIdentifier()"> |
| <meta name="keywords" content="getMetadata()"> |
| <meta name="keywords" content="findResource()"> |
| <meta name="keywords" content="addListener()"> |
| <meta name="keywords" content="removeListener()"> |
| <meta name="keywords" content="addWarningListener()"> |
| <meta name="keywords" content="removeWarningListener()"> |
| <meta name="keywords" content="close()"> |
| <meta name="keywords" content="toString()"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../sis.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="DataStore (Apache SIS 1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":42,"i2":6,"i3":10,"i4":10,"i5":10,"i6":10,"i7":6,"i8":6,"i9":10,"i10":10,"i11":42,"i12":10,"i13":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = false; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/DataStore.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.sis.storage</a></div> |
| <h2 title="Class DataStore" class="title">Class DataStore</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>DataStore</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang" class="externalLink">AutoCloseable</a></code>, <code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code>, <code><a href="../util/Localized.html" title="interface in org.apache.sis.util">Localized</a></code></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="geotiff/GeoTiffStore.html" title="class in org.apache.sis.storage.geotiff">GeoTiffStore</a></code>, <code><a href="earthobservation/LandsatStore.html" title="class in org.apache.sis.storage.earthobservation">LandsatStore</a></code>, <code><a href="netcdf/NetcdfStore.html" title="class in org.apache.sis.storage.netcdf">NetcdfStore</a></code>, <code><a href="sql/SQLStore.html" title="class in org.apache.sis.storage.sql">SQLStore</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public abstract class <span class="typeNameLabel">DataStore</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> |
| implements <a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a>, <a href="../util/Localized.html" title="interface in org.apache.sis.util">Localized</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang" class="externalLink">AutoCloseable</a></pre> |
| <div class="block">Manages a series of features, coverages or sensor data. |
| Different <code>DataStore</code> subclasses exist for different formats (netCDF, GeoTIFF, <i>etc.</i>). |
| The supported format can be identified by the <a href="#getProvider()">provider</a>. |
| |
| <p>Each data store is itself a <a href="Resource.html" title="interface in org.apache.sis.storage"><code>Resource</code></a>. The data store subclasses should implement |
| a more specialized <code>Resource</code> interface depending on the format characteristics. |
| For example a <code>DataStore</code> for ShapeFiles will implement the <a href="FeatureSet.html" title="interface in org.apache.sis.storage"><code>FeatureSet</code></a> interface, |
| while a <code>DataStore</code> for netCDF files will implement the <a href="Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a> interface.</p> |
| |
| <div class="section">Thread safety policy</div> |
| Data stores should be thread-safe, but their synchronization lock is implementation-dependent. |
| This base class uses only the <code>synchronized</code> keyword, applied on the following methods: |
| |
| <ul> |
| <li><a href="#getLocale()"><code>getLocale()</code></a></li> |
| <li><a href="#setLocale(java.util.Locale)"><code>setLocale(Locale)</code></a></li> |
| </ul> |
| |
| Since above properties are used only for information purpose, concurrent modifications during a read or write |
| operation should be harmless. Consequently subclasses are free use their own synchronization mechanism instead |
| than <code>synchronized(this)</code> lock.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.3</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="DataStores.html#open(java.lang.Object)"><code>DataStores.open(Object)</code></a></dd> |
| |
| <p><font size="-1">Defined in the <code>sis-storage</code> module</font></p> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="event/StoreListeners.html" title="class in org.apache.sis.storage.event">StoreListeners</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#listeners">listeners</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The set of registered <a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event"><code>StoreListener</code></a>s for this data store.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="DataStoreProvider.html" title="class in org.apache.sis.storage">DataStoreProvider</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#provider">provider</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The factory that created this <code>DataStore</code> instance, or <code>null</code> if unspecified.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colSecond" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">DataStore</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new instance with no provider and initially no listener.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.storage.DataStoreProvider,org.apache.sis.storage.StorageConnector)">DataStore</a></span>​(<a href="DataStoreProvider.html" title="class in org.apache.sis.storage">DataStoreProvider</a> provider, |
| <a href="StorageConnector.html" title="class in org.apache.sis.storage">StorageConnector</a> connector)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new instance for the given storage (typically file or database).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.storage.DataStore,org.apache.sis.storage.StorageConnector)">DataStore</a></span>​(<a href="DataStore.html" title="class in org.apache.sis.storage">DataStore</a> parent, |
| <a href="StorageConnector.html" title="class in org.apache.sis.storage">StorageConnector</a> connector)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new instance as a child of another data store instance.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><T extends <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event">StoreEvent</a>><br>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">addListener</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> eventType, |
| <a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event">StoreListener</a><? super T> listener)</code></th> |
| <td class="colLast"> |
| <div class="block">Registers a listener to notify when the specified kind of event occurs in this data store or in a resource.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addWarningListener(org.apache.sis.util.logging.WarningListener)">addWarningListener</a></span>​(<a href="../util/logging/WarningListener.html" title="interface in org.apache.sis.util.logging">WarningListener</a><? super <a href="DataStore.html" title="class in org.apache.sis.storage">DataStore</a>> listener)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Replaced by <code>addListener(listener, WarningEvent.class)</code>.</div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close()">close</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Closes this data store and releases any underlying resources.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#findResource(java.lang.String)">findResource</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> identifier)</code></th> |
| <td class="colLast"> |
| <div class="block">Searches for a resource identified by the given identifier.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDisplayName()">getDisplayName</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a short name or label for this data store.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html?is-external=true" title="class or interface in java.util" class="externalLink">Optional</a><<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/GenericName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">GenericName</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIdentifier()">getIdentifier</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns an identifier for the root resource of this data store, or <code>null</code> if none.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLocale()">getLocale</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">The locale to use for formatting warnings and other messages.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/Metadata.html?is-external=true" title="class or interface in org.opengis.metadata" class="externalLink">Metadata</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMetadata()">getMetadata</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns information about the data store as a whole.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html?is-external=true" title="class or interface in java.util" class="externalLink">Optional</a><<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/parameter/ParameterValueGroup.html?is-external=true" title="class or interface in org.opengis.parameter" class="externalLink">ParameterValueGroup</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getOpenParameters()">getOpenParameters</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the parameters used to open this data store.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="DataStoreProvider.html" title="class in org.apache.sis.storage">DataStoreProvider</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProvider()">getProvider</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the factory that created this <code>DataStore</code> instance.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><T extends <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event">StoreEvent</a>><br>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">removeListener</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> eventType, |
| <a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event">StoreListener</a><? super T> listener)</code></th> |
| <td class="colLast"> |
| <div class="block">Unregisters a listener previously added to this data store for the given type of events.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeWarningListener(org.apache.sis.util.logging.WarningListener)">removeWarningListener</a></span>​(<a href="../util/logging/WarningListener.html" title="interface in org.apache.sis.util.logging">WarningListener</a><? super <a href="DataStore.html" title="class in org.apache.sis.storage">DataStore</a>> listener)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Replaced by <code>removeListener(listener, WarningEvent.class)</code>.</div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setLocale(java.util.Locale)">setLocale</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a> locale)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the locale to use for formatting warnings and other messages.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a string representation of this data store for debugging purpose.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="provider"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>provider</h4> |
| <pre>protected final <a href="DataStoreProvider.html" title="class in org.apache.sis.storage">DataStoreProvider</a> provider</pre> |
| <div class="block">The factory that created this <code>DataStore</code> instance, or <code>null</code> if unspecified. |
| This information can be useful for fetching information common to all <code>DataStore</code> |
| instances of the same class.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#getProvider()"><code>getProvider()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="listeners"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>listeners</h4> |
| <pre>protected final <a href="event/StoreListeners.html" title="class in org.apache.sis.storage.event">StoreListeners</a> listeners</pre> |
| <div class="block">The set of registered <a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event"><code>StoreListener</code></a>s for this data store.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DataStore</h4> |
| <pre>protected DataStore()</pre> |
| <div class="block">Creates a new instance with no provider and initially no listener.</div> |
| </li> |
| </ul> |
| <a id="<init>(org.apache.sis.storage.DataStoreProvider,org.apache.sis.storage.StorageConnector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DataStore</h4> |
| <pre>protected DataStore​(<a href="DataStoreProvider.html" title="class in org.apache.sis.storage">DataStoreProvider</a> provider, |
| <a href="StorageConnector.html" title="class in org.apache.sis.storage">StorageConnector</a> connector) |
| throws <a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></pre> |
| <div class="block">Creates a new instance for the given storage (typically file or database). |
| The <code>provider</code> argument is an optional but recommended information. |
| The <code>connector</code> argument is mandatory.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>provider</code> - the factory that created this <code>DataStore</code> instance, or <code>null</code> if unspecified.</dd> |
| <dd><code>connector</code> - information about the storage (URL, stream, reader instance, <i>etc</i>).</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></code> - if an error occurred while creating the data store for the given storage.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="<init>(org.apache.sis.storage.DataStore,org.apache.sis.storage.StorageConnector)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DataStore</h4> |
| <pre>protected DataStore​(<a href="DataStore.html" title="class in org.apache.sis.storage">DataStore</a> parent, |
| <a href="StorageConnector.html" title="class in org.apache.sis.storage">StorageConnector</a> connector) |
| throws <a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></pre> |
| <div class="block">Creates a new instance as a child of another data store instance. |
| The new instance inherits the parent <a href="#getProvider()">provider</a>. |
| Events created by this <code>DataStore</code> are forwarded to listeners registered |
| into the parent data store too.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>parent</code> - the parent data store, or <code>null</code> if none.</dd> |
| <dd><code>connector</code> - information about the storage (URL, stream, reader instance, <i>etc</i>).</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></code> - if an error occurred while creating the data store for the given storage.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="getProvider()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getProvider</h4> |
| <pre class="methodSignature">public <a href="DataStoreProvider.html" title="class in org.apache.sis.storage">DataStoreProvider</a> getProvider()</pre> |
| <div class="block">Returns the factory that created this <code>DataStore</code> instance. |
| The provider gives additional information on this <code>DataStore</code> such as a format description |
| and a list of parameters that can be used for opening data stores of the same class. |
| |
| <p>The return value should never be null if this <code>DataStore</code> has been created by |
| <a href="DataStores.html#open(java.lang.Object)"><code>DataStores.open(Object)</code></a> or by a <a href="DataStoreProvider.html" title="class in org.apache.sis.storage"><code>DataStoreProvider</code></a> <code>open(…)</code> method. |
| However it may be null if this object has been instantiated by a direct call to its constructor.</p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the factory that created this <code>DataStore</code> instance, or <code>null</code> if unspecified.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#provider"><code>provider</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getOpenParameters()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getOpenParameters</h4> |
| <pre class="methodSignature">public abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html?is-external=true" title="class or interface in java.util" class="externalLink">Optional</a><<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/parameter/ParameterValueGroup.html?is-external=true" title="class or interface in org.opengis.parameter" class="externalLink">ParameterValueGroup</a>> getOpenParameters()</pre> |
| <div class="block">Returns the parameters used to open this data store. |
| The collection of legal parameters is implementation-dependent |
| (<a href="../parameter/DefaultParameterValue.html#getDescriptor()">their description</a> |
| is given by <a href="DataStoreProvider.html#getOpenParameters()"><code>DataStoreProvider.getOpenParameters()</code></a>), |
| but should contain at least a parameter named <a href="DataStoreProvider.html#LOCATION">"location"</a> |
| with a <a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net" class="externalLink"><code>URI</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file" class="externalLink"><code>Path</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql" class="externalLink"><code>DataSource</code></a> value. |
| |
| <p>In the event a data store must be closed and reopened later, those parameters can be stored in a file or |
| database and used for <a href="DataStoreProvider.html#open(org.opengis.parameter.ParameterValueGroup)">creating a new store</a> later.</p> |
| |
| <p>In some cases, for stores reading in-memory data or other inputs that can not fit with |
| <code>ParameterDescriptorGroup</code> requirements (for example an <a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>InputStream</code></a> |
| connected to unknown or no <a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net" class="externalLink"><code>URL</code></a>), this method may return an empty value.</p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>parameters used for opening this <code>DataStore</code>.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="DataStoreProvider.html#getOpenParameters()"><code>DataStoreProvider.getOpenParameters()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setLocale(java.util.Locale)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLocale</h4> |
| <pre class="methodSignature">public void setLocale​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a> locale)</pre> |
| <div class="block">Sets the locale to use for formatting warnings and other messages. |
| In a client-server architecture, it should be the locale on the <em>client</em> side. |
| |
| <p>This locale is used on a <cite>best-effort</cite> basis; whether messages will honor this locale or not |
| depends on the code that logged warnings or threw exceptions. In Apache SIS implementation, this locale has |
| better chances to be honored by the <a href="DataStoreException.html#getLocalizedMessage()"><code>DataStoreException.getLocalizedMessage()</code></a> method rather than |
| <code>getMessage()</code>. See <code>getLocalizedMessage()</code> javadoc for more information.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>locale</code> - the new locale to use.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="DataStoreException.html#getLocalizedMessage()"><code>DataStoreException.getLocalizedMessage()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getLocale()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLocale</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a> getLocale()</pre> |
| <div class="block">The locale to use for formatting warnings and other messages. This locale if for user interfaces |
| only – it has no effect on the data to be read or written from/to the data store. |
| |
| <p>The default value is the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true#getDefault()" title="class or interface in java.util" class="externalLink">system default locale</a>.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../util/Localized.html#getLocale()">getLocale</a></code> in interface <code><a href="../util/Localized.html" title="interface in org.apache.sis.util">Localized</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the locale, or <code>null</code> if not explicitly defined.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="event/StoreEvent.html#getLocale()"><code>StoreEvent.getLocale()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getDisplayName()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDisplayName</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> getDisplayName()</pre> |
| <div class="block">Returns a short name or label for this data store. |
| The returned name can be used in user interfaces or in error messages. |
| It may be a title in natural language, but should be relatively short. |
| The name may be localized in the language specified by the value of <a href="#getLocale()"><code>getLocale()</code></a> |
| if this data store is capable to produce a name in various languages. |
| |
| <p>This name should not be used as an identifier since there is no guarantee that the name |
| is unique among data stores, and no guarantee that the name is the same in all locales. |
| The name may also contain any Unicode characters, including characters usually not allowed |
| in identifiers like white spaces.</p> |
| |
| <p>This method should never throw an exception since it may be invoked for producing error |
| messages, in which case throwing an exception here would mask the original exception.</p> |
| |
| <p>This method differs from <a href="#getIdentifier()"><code>getIdentifier()</code></a> in that it is typically a file name |
| known at construction time instead than a property read from metadata. |
| Default implementation returns the <a href="StorageConnector.html#getStorageName()"><code>StorageConnector.getStorageName()</code></a> value, |
| or <code>null</code> if this data store has been created by the no-argument constructor. |
| Subclasses should override this method if they can provide a better name.</p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a short name of label for this data store, or <code>null</code> if unknown.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#getIdentifier()"><code>getIdentifier()</code></a>, |
| <a href="#getLocale()"><code>getLocale()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getIdentifier()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getIdentifier</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html?is-external=true" title="class or interface in java.util" class="externalLink">Optional</a><<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/GenericName.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink">GenericName</a>> getIdentifier() |
| throws <a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></pre> |
| <div class="block">Returns an identifier for the root resource of this data store, or <code>null</code> if none. |
| If this data store contains many resources (as in an <a href="Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a>), |
| the returned identifier shall be different than the identifiers of those child resources. |
| In other words, the following equality shall hold without ambiguity: |
| |
| <blockquote><pre><b>findResource</b>(<b>getIdentifier</b>().<b>toString</b>()) == <font color="green">this</font></pre></blockquote> |
| |
| Note that this identifier is not guaranteed to be unique between different <code>DataStore</code> instances; |
| it only needs to be unique among the resources provided by this data store instance. |
| |
| <div class="section">Default implementation</div> |
| <p>The default implementation searches for an identifier in the metadata, |
| at the location shown below, provided that conditions are met:</p> |
| |
| <blockquote> |
| <p><b>Path:</b> <a href="Resource.html#getMetadata()"><code>metadata</code></a> / |
| <a href="../metadata/iso/DefaultMetadata.html#getIdentificationInfo()"><code>identificationInfo</code></a> / |
| <a href="../metadata/iso/identification/AbstractIdentification.html#getCitation()"><code>citation</code></a> / |
| <a href="../metadata/iso/citation/DefaultCitation.html#getIdentifiers()"><code>identifier</code></a></p> |
| |
| <p><b>Condition:</b> in default implementation, the identifier is presents only if exactly one |
| <code>citation</code> is found at above path. If two or more <code>citation</code> instances are found, |
| the identification is considered ambiguous and an empty value is returned.</p> |
| |
| <p><b>Selection:</b> the first identifier implementing the <code>GenericName</code> interface is returned. |
| If there is no such identifier, then a <a href="../referencing/NamedIdentifier.html" title="class in org.apache.sis.referencing"><code>NamedIdentifier</code></a> is created |
| from the first identifier. If there is no identifier at all, then an empty value is returned.</p> |
| </blockquote> |
| |
| Subclasses are encouraged to override this method with more efficient implementations.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="Resource.html#getIdentifier()">getIdentifier</a></code> in interface <code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an identifier for the root resource of this data store.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></code> - if an error occurred while fetching the identifier.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#getMetadata()"><code>getMetadata()</code></a>, |
| <a href="#getDisplayName()"><code>getDisplayName()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMetadata()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMetadata</h4> |
| <pre class="methodSignature">public abstract <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/Metadata.html?is-external=true" title="class or interface in org.opengis.metadata" class="externalLink">Metadata</a> getMetadata() |
| throws <a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></pre> |
| <div class="block">Returns information about the data store as a whole. The returned metadata object can contain |
| information such as the spatiotemporal extent of all contained <a href="Resource.html" title="interface in org.apache.sis.storage">resources</a>, |
| contact information about the creator or distributor, data quality, update frequency, usage constraints, |
| file format and more.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="Resource.html#getMetadata()">getMetadata</a></code> in interface <code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>information about resources in the data store. Should not be <code>null</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></code> - if an error occurred while reading the data.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#getIdentifier()"><code>getIdentifier()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="findResource(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findResource</h4> |
| <pre class="methodSignature">public <a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a> findResource​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> identifier) |
| throws <a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></pre> |
| <div class="block">Searches for a resource identified by the given identifier. The given identifier should be the string |
| representation of the return value of <a href="Resource.html#getIdentifier()"><code>Resource.getIdentifier()</code></a> on the desired resource. |
| Implementation may also accept aliases for convenience. For example if the full name of a resource |
| is <code>"foo:bar"</code>, then this method may accept <code>"bar"</code> as a synonymous of <code>"foo:bar"</code> |
| provided that it does not introduce ambiguity. |
| |
| <p>The default implementation verifies if above criterion matches to this <code>DataStore</code> |
| (which is itself a resource), then iterates recursively over <a href="Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a> components |
| if this data store is an aggregate. |
| If a match is found without ambiguity, the associated resource is returned. Otherwise an exception is thrown. |
| Subclasses are encouraged to override this method with a more efficient implementation.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>identifier</code> - identifier of the resource to fetch. Must be non-null.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>resource associated to the given identifier (never <code>null</code>).</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="IllegalNameException.html" title="class in org.apache.sis.storage">IllegalNameException</a></code> - if no resource is found for the given identifier, or if more than one resource is found.</dd> |
| <dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></code> - if another kind of error occurred while searching resources.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="Resource.html#getIdentifier()"><code>Resource.getIdentifier()</code></a>, |
| <a href="FeatureNaming.html" title="class in org.apache.sis.storage"><code>FeatureNaming</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addListener</h4> |
| <pre class="methodSignature">public <T extends <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event">StoreEvent</a>> void addListener​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> eventType, |
| <a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event">StoreListener</a><? super T> listener)</pre> |
| <div class="block">Registers a listener to notify when the specified kind of event occurs in this data store or in a resource. |
| The data store will call the <a href="event/StoreListener.html#eventOccured(T)"><code>StoreListener.eventOccured(StoreEvent)</code></a> method when new events matching |
| the <code>eventType</code> occur. An event may be a change in data store content or structure, or a warning that |
| occurred during a read or write operation. |
| |
| <p>Registering a listener for a given <code>eventType</code> also register the listener for all event sub-types. |
| The same listener can be registered many times, but its <a href="event/StoreListener.html#eventOccured(T)"><code>StoreListener.eventOccured(StoreEvent)</code></a> |
| method will be invoked only once per event. This filtering applies even if the listener is registered |
| on individual resources of this data store.</p> |
| |
| <p>If this data store may produce events of the given type, then the given listener is kept by strong reference; |
| it will not be garbage collected unless <a href="#removeListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">explicitly removed</a> |
| or unless this <code>DataStore</code> is itself garbage collected. However if the given type of events can never |
| happen with this data store, then this method is not required to keep a reference to the given listener.</p> |
| |
| <div class="section">Warning events</div> |
| If <code>eventType</code> is assignable from <code><a href="event/WarningEvent.html" title="class in org.apache.sis.storage.event">WarningEvent</a>.class</code>, |
| then registering that listener turns off logging of warning messages for this data store. |
| This side-effect is applied on the assumption that the registered listener will handle |
| warnings in its own way, for example by showing warnings in a widget.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="Resource.html#addListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">addListener</a></code> in interface <code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></dd> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - compile-time value of the <code>eventType</code> argument.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eventType</code> - type of <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event"><code>StoreEvent</code></a> to listen (can not be <code>null</code>).</dd> |
| <dd><code>listener</code> - listener to notify about events.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="removeListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeListener</h4> |
| <pre class="methodSignature">public <T extends <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event">StoreEvent</a>> void removeListener​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> eventType, |
| <a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event">StoreListener</a><? super T> listener)</pre> |
| <div class="block">Unregisters a listener previously added to this data store for the given type of events. |
| The <code>eventType</code> must be the exact same class than the one given to the <code>addListener(…)</code> method; |
| this method does not remove listeners registered for subclasses and does not remove listeners registered in |
| children resources. |
| |
| <p>If the same listener has been registered many times for the same even type, then this method removes only |
| the most recent registration. In other words if <code>addListener(type, ls)</code> has been invoked twice, then |
| <code>removeListener(type, ls)</code> needs to be invoked twice in order to remove all instances of that listener. |
| If the given listener is not found, then this method does nothing (no exception is thrown).</p> |
| |
| <div class="section">Warning events</div> |
| If <code>eventType</code> is <code><a href="event/WarningEvent.html" title="class in org.apache.sis.storage.event">WarningEvent</a>.class</code> |
| and if, after this method invocation, there is no remaining listener for warning events, |
| then this <code>DataStore</code> will send future warnings to the loggers.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="Resource.html#removeListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">removeListener</a></code> in interface <code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></dd> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - compile-time value of the <code>eventType</code> argument.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eventType</code> - type of <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event"><code>StoreEvent</code></a> which were listened (can not be <code>null</code>).</dd> |
| <dd><code>listener</code> - listener to stop notifying about events.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addWarningListener(org.apache.sis.util.logging.WarningListener)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addWarningListener</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang" class="externalLink">@Deprecated</a> |
| public void addWarningListener​(<a href="../util/logging/WarningListener.html" title="interface in org.apache.sis.util.logging">WarningListener</a><? super <a href="DataStore.html" title="class in org.apache.sis.storage">DataStore</a>> listener) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Replaced by <code>addListener(listener, WarningEvent.class)</code>.</div> |
| </div> |
| <div class="block">Adds a listener to be notified when a warning occurred while reading from or writing to the storage. |
| When a warning occurs, there is a choice: |
| |
| <ul> |
| <li>If this data store has no warning listener, then the warning is logged at |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html?is-external=true#WARNING" title="class or interface in java.util.logging" class="externalLink"><code>Level.WARNING</code></a>.</li> |
| <li>If this data store has at least one warning listener, then all listeners are notified |
| and the warning is <strong>not</strong> logged by this data store instance.</li> |
| </ul> |
| |
| Consider invoking this method in a <code>try</code> … <code>finally</code> block if the <code>DataStore</code> |
| lifetime is longer than the listener lifetime, as below: |
| |
| <blockquote><pre>datastore.<b>addWarningListener</b>(listener); |
| <font color="green">try</font> { |
| <i><font color="gray">// Do some work...</font></i> |
| } <font color="green">finally</font> { |
| datastore.<b>removeWarningListener</b>(listener); |
| }</pre></blockquote></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>listener</code> - the listener to add.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given listener is already registered in this data store.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="removeWarningListener(org.apache.sis.util.logging.WarningListener)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeWarningListener</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang" class="externalLink">@Deprecated</a> |
| public void removeWarningListener​(<a href="../util/logging/WarningListener.html" title="interface in org.apache.sis.util.logging">WarningListener</a><? super <a href="DataStore.html" title="class in org.apache.sis.storage">DataStore</a>> listener) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/util/NoSuchElementException.html?is-external=true" title="class or interface in java.util" class="externalLink">NoSuchElementException</a></pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Replaced by <code>removeListener(listener, WarningEvent.class)</code>.</div> |
| </div> |
| <div class="block">Removes a previously registered listener.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>listener</code> - the listener to remove.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/NoSuchElementException.html?is-external=true" title="class or interface in java.util" class="externalLink">NoSuchElementException</a></code> - if the given listener is not registered in this data store.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="close()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre class="methodSignature">public abstract void close() |
| throws <a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></pre> |
| <div class="block">Closes this data store and releases any underlying resources.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang" class="externalLink">close</a></code> in interface <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang" class="externalLink">AutoCloseable</a></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></code> - if an error occurred while closing this data store.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toString()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> toString()</pre> |
| <div class="block">Returns a string representation of this data store for debugging purpose. |
| The content of the string returned by this method may change in any future SIS version.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a string representation of this data store for debugging purpose.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/DataStore.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2010–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |