blob: 404826fa2d163a7081d987f6cdbad76f439d2ba0 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (19) -->
<title>Resource (Apache SIS 1.3 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.sis.storage, interface: Resource">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.storage.Resource interface">
<meta name="keywords" content="getIdentifier()">
<meta name="keywords" content="getMetadata()">
<meta name="keywords" content="addListener()">
<meta name="keywords" content="removeListener()">
<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="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/Resource.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#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li>Field</li>
<li>Constr</li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li>Constr</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.storage</a></div>
<h1 title="Interface Resource" class="title">Interface Resource</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="Aggregate.html" title="interface in org.apache.sis.storage">Aggregate</a></code>, <code><a href="DataSet.html" title="interface in org.apache.sis.storage">Data­Set</a></code>, <code><a href="FeatureSet.html" title="interface in org.apache.sis.storage">Feature­Set</a></code>, <code><a href="GridCoverageResource.html" title="interface in org.apache.sis.storage">Grid­Coverage­Resource</a></code>, <code><a href="tiling/TiledResource.html" title="interface in org.apache.sis.storage.tiling">Tiled­Resource</a></code>, <code><a href="WritableAggregate.html" title="interface in org.apache.sis.storage">Writable­Aggregate</a></code>, <code><a href="WritableFeatureSet.html" title="interface in org.apache.sis.storage">Writable­Feature­Set</a></code>, <code><a href="WritableGridCoverageResource.html" title="interface in org.apache.sis.storage">Writable­Grid­Coverage­Resource</a></code>, <code><a href="tiling/WritableTiledResource.html" title="interface in org.apache.sis.storage.tiling">Writable­Tiled­Resource</a></code></dd>
</dl>
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="AbstractFeatureSet.html" title="class in org.apache.sis.storage">Abstract­Feature­Set</a></code>, <code><a href="AbstractGridCoverageResource.html" title="class in org.apache.sis.storage">Abstract­Grid­Coverage­Resource</a></code>, <code><a href="AbstractResource.html" title="class in org.apache.sis.storage">Abstract­Resource</a></code>, <code><a href="aggregate/ConcatenatedFeatureSet.html" title="class in org.apache.sis.storage.aggregate">Concatenated­Feature­Set</a></code>, <code><a href="DataStore.html" title="class in org.apache.sis.storage">Data­Store</a></code>, <code><a href="geotiff/GeoTiffStore.html" title="class in org.apache.sis.storage.geotiff">Geo­Tiff­Store</a></code>, <code><a href="aggregate/JoinFeatureSet.html" title="class in org.apache.sis.storage.aggregate">Join­Feature­Set</a></code>, <code><a href="landsat/LandsatStore.html" title="class in org.apache.sis.storage.landsat">Landsat­Store</a></code>, <code><a href="netcdf/NetcdfStore.html" title="class in org.apache.sis.storage.netcdf">Netcdf­Store</a></code>, <code><a href="sql/SQLStore.html" title="class in org.apache.sis.storage.sql">SQLStore</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">Resource</span></div>
<div class="block">Provides access to geospatial data in a <code>Data­Store</code>. The ISO 19115 specification defines resource as
an <cite>“identifiable asset or means that fulfills a requirement”</cite>. For example, a resource can be a
coverage of Sea Surface Temperature, or a coverage of water salinity, or the set of all buoys in a harbor,
or an aggregation of all the above. A resource is not necessarily digital; it can be a paper document or an
organization, in which case only metadata are provided. If the resource is digital, then <code>Resource</code>s
should be instances of sub-types like <a href="Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a> or <a href="FeatureSet.html" title="interface in org.apache.sis.storage"><code>Feature­Set</code></a>.
<p><code>Data­Store</code>s are themselves closeable resources.
If the data store contains resources for many feature types or coverages, then the data store will be an
instance of <a href="Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a>. The <a href="Aggregate.html#components()">components</a> of an aggregate can be
themselves other aggregates, thus forming a tree.</p>
<div class="note"><b>Relationship with ISO 19115:</b>
this type is closely related to the <code>DS_Resource</code> type defined by ISO 19115.
The Apache SIS type differs from the ISO type by being more closely related to data extraction,
as can be seen from the checked <a href="DataStoreException.html" title="class in org.apache.sis.storage"><code>Data­Store­Exception</code></a> thrown by most methods.
Convenience methods for frequently requested information – for example <a href="DataSet.html#getEnvelope()"><code>Data­Set​.get­Envelope()</code></a> – were added.
The sub-types performing the actual data extraction – for example <a href="FeatureSet.html" title="interface in org.apache.sis.storage"><code>Feature­Set</code></a> – are specific to Apache SIS.
</div></div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="Aggregate.html#components()"><code>Aggregate​.components()</code></a></li>
</ul>
</dd>
<p><font size="-1">Defined in the <code>sis-storage</code> module</font></p>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T extends <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event">Store­Event</a>&gt;<br>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#addListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)" class="member-name-link">add­Listener</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;event­Type,
<a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event">Store­Listener</a>&lt;? super T&gt;&nbsp;listener)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Registers a listener to notify when the specified kind of event occurs in this resource or in children.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Optional.html" title="class or interface in java.util" class="external-link">Optional</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/GenericName.html" title="class or interface in org.opengis.util" class="external-link">Generic­Name</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getIdentifier()" class="member-name-link">get­Identifier</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the resource persistent identifier.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Metadata.html" title="class or interface in org.opengis.metadata" class="external-link">Metadata</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getMetadata()" class="member-name-link">get­Metadata</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns information about this resource.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T extends <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event">Store­Event</a>&gt;<br>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#removeListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)" class="member-name-link">remove­Listener</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;event­Type,
<a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event">Store­Listener</a>&lt;? super T&gt;&nbsp;listener)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Unregisters a listener previously added to this resource for the given type of events.</div>
</div>
</div>
</div>
</div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getIdentifier()">
<h3>getIdentifier</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Optional.html" title="class or interface in java.util" class="external-link">Optional</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/GenericName.html" title="class or interface in org.opengis.util" class="external-link">GenericName</a>&gt;</span>&nbsp;<span class="element-name">getIdentifier</span>()
throws <span class="exceptions"><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></span></div>
<div class="block">Returns the resource persistent identifier.
This identifier can be used to uniquely identify a resource in the containing <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a>.
For this identifier to be reliable the following conditions must hold:
<ul>
<li>It shall be unique in the <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a> which contains it, if there is one.</li>
<li>It's value shall not change after closing and reopening the <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a> on the same data.</li>
<li>It should be consistent with the <code><a href="#getMetadata()">get­Metadata()</a>/​identification­Info/​citation/​identifier</code> value.</li>
</ul>
If any of above conditions is not met, then this identifier should be absent.
This case may happen when a resource is an intermediate result of an ongoing process
or is a temporary resource generated on-the-fly, for example a sensor event.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>a persistent identifier unique within the data store, or absent if this resource has no such identifier.</dd>
<dt>Throws:</dt>
<dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if an error occurred while fetching the identifier.</dd>
<dt>Since:</dt>
<dd>1.0</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="DataStore.html#getIdentifier()"><code>Data­Store​.get­Identifier()</code></a></li>
<li><a href="DataStore.html#findResource(java.lang.String)"><code>Data­Store​.find­Resource(String)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMetadata()">
<h3>getMetadata</h3>
<div class="member-signature"><span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Metadata.html" title="class or interface in org.opengis.metadata" class="external-link">Metadata</a></span>&nbsp;<span class="element-name">getMetadata</span>()
throws <span class="exceptions"><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></span></div>
<div class="block">Returns information about this resource.
If this resource is an <a href="Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a>, then the metadata may enumerate characteristics
(spatiotemporal extents, feature types, range dimensions, <i>etc.</i>) of all
<a href="Aggregate.html#components()">components</a> in the aggregate, or summarize them (for example by omitting
<a href="../metadata/iso/extent/DefaultExtent.html" title="class in org.apache.sis.metadata.iso.extent">extents</a> that are fully included in larger extents).
If this resource is a <a href="DataSet.html" title="interface in org.apache.sis.storage"><code>Data­Set</code></a>, then the metadata shall contain only the information that apply to that
particular dataset, optionally with a reference to the parent metadata (see below).
<p>Some relationships between metadata and resources are:</p>
<ul class="verbose">
<li><code>metadata</code> /
<a href="../metadata/iso/DefaultMetadata.html#getParentMetadata()"><code>parent­Metadata</code></a> /
<a href="../metadata/iso/citation/DefaultCitation.html#getTitle()"><code>title</code></a>:<br>
a human-readable caption for <a href="DataStore.html#getMetadata()"><code>Data­Store​.get­Metadata()</code></a> (if not redundant with this metadata).</li>
<li><code>metadata</code> /
<a href="../metadata/iso/DefaultMetadata.html#getIdentificationInfo()"><code>identification­Info</code></a> /
<a href="../metadata/iso/identification/AbstractIdentification.html#getCitation()"><code>citation</code></a> /
<a href="../metadata/iso/citation/DefaultCitation.html#getTitle()"><code>title</code></a>:<br>
a human-readable designation for this resource.</li>
<li><code>metadata</code> /
<a href="../metadata/iso/DefaultMetadata.html#getIdentificationInfo()"><code>identification­Info</code></a> /
<a href="../metadata/iso/identification/AbstractIdentification.html#getAssociatedResources()"><code>associated­Resource</code></a> /
<a href="../metadata/iso/identification/DefaultAssociatedResource.html#getName()"><code>name</code></a> /
<a href="../metadata/iso/citation/DefaultCitation.html#getTitle()"><code>title</code></a>:<br>
a human-readable designation for parent, children or other related resources.
May be omitted if too expensive to compute.</li>
<li><code>metadata</code> /
<a href="../metadata/iso/DefaultMetadata.html#getMetadataScopes()"><code>metadata­Scope</code></a> /
<a href="../metadata/iso/DefaultMetadataScope.html#getResourceScope()"><code>resource­Scope</code></a>:<br>
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/maintenance/ScopeCode.html#DATASET" title="class or interface in org.opengis.metadata.maintenance" class="external-link"><code>Scope­Code​.DATASET</code></a> if the resource is a <a href="DataSet.html" title="interface in org.apache.sis.storage"><code>Data­Set</code></a>, or
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/maintenance/ScopeCode.html#SERVICE" title="class or interface in org.opengis.metadata.maintenance" class="external-link"><code>Scope­Code​.SERVICE</code></a> if the resource is a web service, or
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/maintenance/ScopeCode.html#SERIES" title="class or interface in org.opengis.metadata.maintenance" class="external-link"><code>Scope­Code​.SERIES</code></a> or
<code>Scope­Code​.INITIATIVE</code>
if the resource is an <a href="Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a> other than a transfer aggregate.</li>
<li><code>metadata</code> /
<a href="../metadata/iso/DefaultMetadata.html#getContentInfo()"><code>content­Info</code></a> /
<a href="../metadata/iso/content/DefaultFeatureCatalogueDescription.html#getFeatureTypeInfo()"><code>feature­Type</code></a> /
<a href="../metadata/iso/content/DefaultFeatureTypeInfo.html#getFeatureTypeName()"><code>feature­Type­Name</code></a>:<br>
names of feature types included in this resource. Example: “bridge”, “road”, “river”. <i>etc.</i></li>
<li><code>metadata</code> /
<a href="../metadata/iso/DefaultMetadata.html#getContentInfo()"><code>content­Info</code></a> /
<a href="../metadata/iso/content/DefaultCoverageDescription.html#getAttributeGroups()"><code>attribute­Group</code></a> /
<a href="../metadata/iso/content/DefaultAttributeGroup.html#getAttributes()"><code>attribute</code></a> /
<a href="../metadata/iso/content/DefaultRangeDimension.html#getSequenceIdentifier()"><code>sequence­Identifier</code></a>:<br>
sample dimension names (or band numbers in simpler cases) of coverages or rasters included in this resource.</li>
</ul>
<h4>Metadata edition</h4>
This method often returns an <a href="../metadata/ModifiableMetadata.State.html#FINAL">unmodifiable</a>
metadata, for making possible to return efficiently a cached instance.
If the caller wants to modify some metadata elements, it may be necessary to perform a
<a href="../metadata/iso/DefaultMetadata.html#deepCopy(org.opengis.metadata.Metadata)">deep copy</a> first.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>information about this resource. Should not be <code>null</code>.</dd>
<dt>Throws:</dt>
<dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if an error occurred while reading the metadata.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="DataStore.html#getMetadata()"><code>Data­Store​.get­Metadata()</code></a></li>
<li><a href="../metadata/iso/DefaultMetadata.html#deepCopy(org.opengis.metadata.Metadata)"><code>Default­Metadata​.deep­Copy(Metadata)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">
<h3>addListener</h3>
<div class="member-signature"><span class="type-parameters">&lt;T extends <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event">StoreEvent</a>&gt;</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addListener</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;eventType,
<a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event">StoreListener</a>&lt;? super T&gt;&nbsp;listener)</span></div>
<div class="block">Registers a listener to notify when the specified kind of event occurs in this resource or in children.
The resource will call the <a href="event/StoreListener.html#eventOccured(E)"><code>Store­Listener​.event­Occured(Store­Event)</code></a> method when new events matching
the <code>event­Type</code> occur. An event may be a change in resource content or structure, or a warning that
occurred during a read or write operation.
<p>Registering a listener for a given <code>event­Type</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(E)"><code>Store­Listener​.event­Occured(Store­Event)</code></a>
method will be invoked only once per event. This filtering applies even if the listener is registered
on different resources in the same tree, for example a parent and its children.</p>
<p>If this resource 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>Resource</code> is itself garbage collected. However if the given type of events can never
happen with this resource, then this method is not required to keep a reference to the given listener.</p>
<h4>Warning events</h4>
If <code>event­Type</code> is assignable from <code><a href="event/WarningEvent.html" title="class in org.apache.sis.storage.event">Warning­Event</a>.class</code>,
then registering that listener turns off logging of warning messages for this resource.
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 class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - compile-time value of the <code>event­Type</code> argument.</dd>
<dt>Parameters:</dt>
<dd><code>event­Type</code> - type of <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event"><code>Store­Event</code></a>s to listen (cannot be <code>null</code>).</dd>
<dd><code>listener</code> - listener to notify about events.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="removeListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">
<h3>removeListener</h3>
<div class="member-signature"><span class="type-parameters">&lt;T extends <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event">StoreEvent</a>&gt;</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">removeListener</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;eventType,
<a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event">StoreListener</a>&lt;? super T&gt;&nbsp;listener)</span></div>
<div class="block">Unregisters a listener previously added to this resource for the given type of events.
The <code>event­Type</code> must be the exact same class than the one given to the <code>add­Listener(…)</code> method;
this method does not remove listeners registered for subclasses and does not remove listeners registered in
parent 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>add­Listener(type, ls)</code> has been invoked twice, then
<code>remove­Listener(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>
<h4>Warning events</h4>
If <code>event­Type</code> is <code><a href="event/WarningEvent.html" title="class in org.apache.sis.storage.event">Warning­Event</a>.class</code>
and if, after this method invocation, there are no remaining listeners for warning events,
then this <code>Resource</code> will send future warnings to the loggers.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - compile-time value of the <code>event­Type</code> argument.</dd>
<dt>Parameters:</dt>
<dd><code>event­Type</code> - type of <a href="event/StoreEvent.html" title="class in org.apache.sis.storage.event"><code>Store­Event</code></a>s which were listened (cannot be <code>null</code>).</dd>
<dd><code>listener</code> - listener to stop notifying about events.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2010&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>