blob: 7f1b226ebaa6354c6f778af0e0e2944afbc72863 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (19) -->
<title>AbstractResource (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, class: AbstractResource">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.storage.AbstractResource class">
<meta name="keywords" content="listeners">
<meta name="keywords" content="getIdentifier()">
<meta name="keywords" content="getEnvelope()">
<meta name="keywords" content="getMetadata()">
<meta name="keywords" content="createMetadata()">
<meta name="keywords" content="clearCache()">
<meta name="keywords" content="getSynchronizationLock()">
<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/AbstractResource.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><a href="#field-summary">Field</a></li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<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>
</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><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&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="Class AbstractResource" class="title">Class AbstractResource</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance">AbstractResource</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></dd>
</dl>
<dl class="notes">
<dt>Direct Known Subclasses:</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></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">AbstractResource</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
implements <a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></span></div>
<div class="block">Default implementations of several methods for classes that want to implement the <a href="Resource.html" title="interface in org.apache.sis.storage"><code>Resource</code></a> interface.
This class provides a <a href="#getMetadata()"><code>get­Metadata()</code></a> method which extracts information from other methods.
Subclasses should override the following methods:
<ul>
<li><a href="#getIdentifier()"><code>get­Identifier()</code></a> (strongly recommended)</li>
<li><a href="#getEnvelope()"><code>get­Envelope()</code></a> (recommended)</li>
<li><a href="#createMetadata()"><code>create­Metadata()</code></a> (optional)</li>
<li><a href="#getSynchronizationLock()"><code>get­Synchronization­Lock()</code></a> (optional)</li>
</ul>
<h2>Thread safety</h2>
Default methods of this abstract class are thread-safe.
Synchronization, when needed, uses <a href="#getSynchronizationLock()"><code>get­Synchronization­Lock()</code></a>.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>1.2</dd>
<p><font size="-1">Defined in the <code>sis-storage</code> module</font></p>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected final <a href="event/StoreListeners.html" title="class in org.apache.sis.storage.event">Store­Listeners</a></code></div>
<div class="col-second even-row-color"><code><a href="#listeners" class="member-name-link">listeners</a></code></div>
<div class="col-last even-row-color">
<div class="block">The set of registered <a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event"><code>Store­Listener</code></a>s for this resources.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier</div>
<div class="table-header col-second">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.apache.sis.storage.event.StoreListeners,boolean)" class="member-name-link">Abstract­Resource</a><wbr>(<a href="event/StoreListeners.html" title="class in org.apache.sis.storage.event">Store­Listeners</a>&nbsp;parent­Listeners,
boolean&nbsp;hidden)</code></div>
<div class="col-last even-row-color">
<div class="block">Creates a new resource which can send notifications to the given set of listeners.</div>
</div>
</div>
</section>
</li>
<!-- ========== 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-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete 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-tab4"><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-tab4"><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-tab4">
<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-tab4"><code>protected void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clearCache()" class="member-name-link">clear­Cache</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Clears any cache in this resource, forcing the data to be recomputed when needed again.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <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-tab4"><code><a href="#createMetadata()" class="member-name-link">create­Metadata</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Invoked in a synchronized block the first time that <a href="#getMetadata()"><code>get­Metadata()</code></a> is invoked.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getEnvelope()" class="member-name-link">get­Envelope</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the spatiotemporal envelope of this resource.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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 even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getIdentifier()" class="member-name-link">get­Identifier</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the resource persistent identifier if available.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>final <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 odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMetadata()" class="member-name-link">get­Metadata</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a description of this resource.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSynchronizationLock()" class="member-name-link">get­Synchronization­Lock</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the object on which to perform synchronizations for thread-safety.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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-tab4"><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-tab4">
<div class="block">Unregisters a listener previously added to this resource for the given type of events.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">get­Class</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hash­Code</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notify­All</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">to­String</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="listeners">
<h3>listeners</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type"><a href="event/StoreListeners.html" title="class in org.apache.sis.storage.event">StoreListeners</a></span>&nbsp;<span class="element-name">listeners</span></div>
<div class="block">The set of registered <a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event"><code>Store­Listener</code></a>s for this resources.
This <code>Store­Listeners</code> has <a href="DataStore.html#listeners"><code>Data­Store​.listeners</code></a> has a parent.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(org.apache.sis.storage.event.StoreListeners,boolean)">
<h3>AbstractResource</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">AbstractResource</span><wbr><span class="parameters">(<a href="event/StoreListeners.html" title="class in org.apache.sis.storage.event">StoreListeners</a>&nbsp;parentListeners,
boolean&nbsp;hidden)</span></div>
<div class="block">Creates a new resource which can send notifications to the given set of listeners.
If <code>hidden</code> is <code>false</code> (the recommended value), then this resource will have its own set of
listeners with this resource declared as the <a href="event/StoreListeners.html#getSource()">source of events</a>.
It will be possible to add and remove listeners independently from the set of parent listeners.
Conversely if <code>hidden</code> is <code>true</code>, then the given listeners will be used directly
and this resource will not appear as the source of any event.
<p>In any cases, the listeners of all parents (ultimately the data store that created this resource)
will always be notified, either directly if <code>hidden</code> is <code>true</code>
or indirectly if <code>hidden</code> is <code>false</code>.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>parent­Listeners</code> - listeners of the parent resource, or <code>null</code> if none.
This is usually the listeners of the <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a> that created this resource.</dd>
<dd><code>hidden</code> - <code>false</code> if this resource shall use its own <a href="event/StoreListeners.html" title="class in org.apache.sis.storage.event"><code>Store­Listeners</code></a>
with the specified parent, or <code>true</code> for using <code>parent­Listeners</code> directly.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ 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="modifiers">public</span>&nbsp;<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 if available.
The default implementation returns an empty value.
Subclasses are strongly encouraged to override if they can provide a value.
<div class="note"><b>Implementation note:</b>
the default implementation of <a href="#createMetadata()"><code>create­Metadata()</code></a> uses this identifier for initializing
the <code>metadata/identification­Info/citation/title</code> property.</div></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Resource.html#getIdentifier()">get­Identifier</a></code>&nbsp;in interface&nbsp;<code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></dd>
<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>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="getEnvelope()">
<h3>getEnvelope</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<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/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a>&gt;</span>&nbsp;<span class="element-name">getEnvelope</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 spatiotemporal envelope of this resource. This information is part of API only in some kinds
of resource such as <a href="FeatureSet.html" title="interface in org.apache.sis.storage"><code>Feature­Set</code></a>. But the method is provided in this base class for convenience.
The default implementation gives an empty value.
<div class="note"><b>Implementation note:</b>
the default implementation of <a href="#createMetadata()"><code>create­Metadata()</code></a> uses this identifier for initializing
the <code>metadata/identification­Info/extent/geographic­Element</code> property.</div></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the spatiotemporal resource extent.</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 or computing the envelope.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMetadata()">
<h3>getMetadata</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<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 a description of this resource. This method invokes <a href="#createMetadata()"><code>create­Metadata()</code></a>
in a synchronized block when first needed, then caches the result.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Resource.html#getMetadata()">get­Metadata</a></code>&nbsp;in interface&nbsp;<code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></dd>
<dt>Returns:</dt>
<dd>information about this resource (never <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 or computing 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="createMetadata()">
<h3>createMetadata</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<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">createMetadata</span>()
throws <span class="exceptions"><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></span></div>
<div class="block">Invoked in a synchronized block the first time that <a href="#getMetadata()"><code>get­Metadata()</code></a> is invoked.
The default implementation populates metadata based on information
provided by <a href="#getIdentifier()"><code>get­Identifier()</code></a> and <a href="#getEnvelope()"><code>get­Envelope()</code></a>.
Subclasses should override if they can provide more information.
The default value can be completed by casting to <a href="../metadata/iso/DefaultMetadata.html" title="class in org.apache.sis.metadata.iso"><code>Default­Metadata</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the newly created metadata, or <code>null</code> if unknown.</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 metadata from this resource.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clearCache()">
<h3>clearCache</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">clearCache</span>()</div>
<div class="block">Clears any cache in this resource, forcing the data to be recomputed when needed again.
The default implementation clears the cached metadata object, which will cause
<a href="#createMetadata()"><code>create­Metadata()</code></a> to be invoked again when first needed.</div>
</section>
</li>
<li>
<section class="detail" id="getSynchronizationLock()">
<h3>getSynchronizationLock</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span>&nbsp;<span class="element-name">getSynchronizationLock</span>()</div>
<div class="block">Returns the object on which to perform synchronizations for thread-safety.
The default implementation returns <code>this</code>.
Subclasses can override for example for synchronizing everything on an enclosing <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the synchronization lock.</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="modifiers">public</span>&nbsp;<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 default implementation forwards to <code><a href="#listeners">listeners</a>.add­Listener(event­Type, listener)</code>.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Resource.html#addListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">add­Listener</a></code>&nbsp;in interface&nbsp;<code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></dd>
<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="modifiers">public</span>&nbsp;<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 default implementation forwards to <code><a href="#listeners">listeners</a>.remove­Listener(event­Type, listener)</code></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Resource.html#removeListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">remove­Listener</a></code>&nbsp;in interface&nbsp;<code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></dd>
<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>