blob: 73c36ebefdba445cb7416bf2948779d10640229e [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (19) -->
<title>DataStoreProvider (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: DataStoreProvider">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.storage.DataStoreProvider class">
<meta name="keywords" content="LOCATION">
<meta name="keywords" content="CREATE">
<meta name="keywords" content="getShortName()">
<meta name="keywords" content="getFormat()">
<meta name="keywords" content="getSupportedVersions()">
<meta name="keywords" content="getOpenParameters()">
<meta name="keywords" content="probeContent()">
<meta name="keywords" content="open()">
<meta name="keywords" content="getLogger()">
<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/DataStoreProvider.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><a href="#nested-class-summary">Nested</a></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><a href="#nested-class-summary">Nested</a>&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 DataStoreProvider" class="title">Class DataStoreProvider</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">DataStoreProvider</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="geotiff/GeoTiffStoreProvider.html" title="class in org.apache.sis.storage.geotiff">Geo­Tiff­Store­Provider</a></code>, <code><a href="landsat/LandsatStoreProvider.html" title="class in org.apache.sis.storage.landsat">Landsat­Store­Provider</a></code>, <code><a href="netcdf/NetcdfStoreProvider.html" title="class in org.apache.sis.storage.netcdf">Netcdf­Store­Provider</a></code>, <code><a href="sql/SQLStoreProvider.html" title="class in org.apache.sis.storage.sql">SQLStore­Provider</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">DataStoreProvider</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></span></div>
<div class="block">Provides information about a specific <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a> implementation.
There is typically one <code>Data­Store­Provider</code> instance for each format supported by a library.
Each <code>Data­Store­Provider</code> instances provides the following services:
<ul>
<li>Provide generic information about the storage (name, <i>etc.</i>).</li>
<li>Create instances of the <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a> implementation described by this provider.</li>
<li>Test if a <code>Data­Store</code> instance created by this provider would have reasonable chances
to open a given <a href="StorageConnector.html" title="class in org.apache.sis.storage"><code>Storage­Connector</code></a>.</li>
</ul>
<h2>Packaging data stores</h2>
JAR files that provide implementations of this class shall contain an entry with exactly the following path:
<blockquote><pre>META-INF/services/org.apache.sis.storage.DataStoreProvider</pre></blockquote>
The above entry shall contain one line for each <code>Data­Store­Provider</code> implementation provided in the JAR file,
where each line is the fully qualified name of the implementation class.
See <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/ServiceLoader.html" title="class or interface in java.util" class="external-link"><code>Service­Loader</code></a> for more general discussion about this lookup mechanism.
<h2>Thread safety</h2>
All <code>Data­Store­Provider</code> implementations shall be thread-safe.
However, the <code>Data­Store</code> instances created by the providers do not need to be thread-safe.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.3</dd>
<p><font size="-1">Defined in the <code>sis-storage</code> module</font></p>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="caption"><span>Nested Classes</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">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected static interface&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="DataStoreProvider.Prober.html" class="type-name-link" title="interface in org.apache.sis.storage">Data­Store­Provider​.Prober</a>&lt;<a href="DataStoreProvider.Prober.html" title="type parameter in DataStoreProvider.Prober">S</a>&gt;</code></div>
<div class="col-last even-row-color">
<div class="block">An action to execute for testing if a <a href="StorageConnector.html" title="class in org.apache.sis.storage"><code>Storage­Connector</code></a> input can be read.</div>
</div>
</div>
</section>
</li>
<!-- =========== 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>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color"><code><a href="#CREATE" class="member-name-link">CREATE</a></code></div>
<div class="col-last even-row-color">
<div class="block">Name of the parameter that specifies whether to allow creation of a new <code>Data­Store</code> if none exist
at the given location.</div>
</div>
<div class="col-first odd-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color"><code><a href="#LOCATION" class="member-name-link">LOCATION</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Name of the parameter that specifies the data store location.</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()" class="member-name-link">Data­Store­Provider</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Creates a new provider.</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-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><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><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/distribution/Format.html" title="class or interface in org.opengis.metadata.distribution" class="external-link">Format</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getFormat()" class="member-name-link">get­Format</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 a description of the data format.</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.logging/java/util/logging/Logger.html" title="class or interface in java.util.logging" class="external-link">Logger</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLogger()" class="member-name-link">get­Logger</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 logger where to report warnings or loading operations.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/parameter/ParameterDescriptorGroup.html" title="class or interface in org.opengis.parameter" class="external-link">Parameter­Descriptor­Group</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getOpenParameters()" class="member-name-link">get­Open­Parameters</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 a description of all parameters accepted by this provider for opening a data store.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getShortName()" class="member-name-link">get­Short­Name</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 a short name or abbreviation for the data format.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="../util/Version.html" title="class in org.apache.sis.util">Version</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="#getSupportedVersions()" class="member-name-link">get­Supported­Versions</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 range of versions supported by the data store, or <code>null</code> if unspecified.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <a href="DataStore.html" title="class in org.apache.sis.storage">Data­Store</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#open(org.apache.sis.storage.StorageConnector)" class="member-name-link">open</a><wbr>(<a href="StorageConnector.html" title="class in org.apache.sis.storage">Storage­Connector</a>&nbsp;connector)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns a data store implementation associated with this provider.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DataStore.html" title="class in org.apache.sis.storage">Data­Store</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#open(org.opengis.parameter.ParameterValueGroup)" class="member-name-link">open</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/parameter/ParameterValueGroup.html" title="class or interface in org.opengis.parameter" class="external-link">Parameter­Value­Group</a>&nbsp;parameters)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a data store implementation associated with this provider for the given parameters.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <a href="ProbeResult.html" title="class in org.apache.sis.storage">Probe­Result</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#probeContent(org.apache.sis.storage.StorageConnector)" class="member-name-link">probe­Content</a><wbr>(<a href="StorageConnector.html" title="class in org.apache.sis.storage">Storage­Connector</a>&nbsp;connector)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Indicates if the given storage appears to be supported by the <code>Data­Store</code>s created by this provider.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected &lt;S&gt;&nbsp;<a href="ProbeResult.html" title="class in org.apache.sis.storage">Probe­Result</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#probeContent(org.apache.sis.storage.StorageConnector,java.lang.Class,org.apache.sis.storage.DataStoreProvider.Prober)" class="member-name-link">probe­Content</a><wbr>(<a href="StorageConnector.html" title="class in org.apache.sis.storage">Storage­Connector</a>&nbsp;connector,
<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;S&gt;&nbsp;type,
<a href="DataStoreProvider.Prober.html" title="interface in org.apache.sis.storage">Data­Store­Provider​.Prober</a>&lt;? super S&gt;&nbsp;prober)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Applies the specified test on the storage content without modifying buffer or input stream position.</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="LOCATION">
<h3>LOCATION</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">LOCATION</span></div>
<div class="block">Name of the parameter that specifies the data store location.
A parameter named "location" should be included in the group of parameters returned by <a href="#getOpenParameters()"><code>get­Open­Parameters()</code></a>.
The parameter value is often a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URI.html" title="class or interface in java.net" class="external-link"><code>URI</code></a> or a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link"><code>Path</code></a>, but other types are allowed.
<p>Implementers are encouraged to define a parameter with this name
to ensure a common and consistent definition among providers.
The parameter should be defined as mandatory and typed with a well-known Java class such as
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URI.html" title="class or interface in java.net" class="external-link"><code>URI</code></a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link"><code>Path</code></a>, JDBC <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.sql/javax/sql/DataSource.html" title="class or interface in javax.sql" class="external-link">DataSource</a>, <i>etc</i>.
The type should have a compact textual representation, for serialization in XML or configuration files.
Consequently, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link"><code>Input­Stream</code></a> and <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/channels/Channel.html" title="class or interface in java.nio.channels" class="external-link"><code>Channel</code></a> should be avoided.</p></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#CREATE"><code>CREATE</code></a></li>
<li><a href="#getOpenParameters()"><code>get­Open­Parameters()</code></a></li>
<li><a href="../../../../constant-values.html#org.apache.sis.storage.DataStoreProvider.LOCATION">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="CREATE">
<h3>CREATE</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">CREATE</span></div>
<div class="block">Name of the parameter that specifies whether to allow creation of a new <code>Data­Store</code> if none exist
at the given location. A parameter named "create" may be included in the group of parameters returned by
<a href="#getOpenParameters()"><code>get­Open­Parameters()</code></a> if the data store supports write operations. The parameter value is often a
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Boolean.html" title="class or interface in java.lang" class="external-link"><code>Boolean</code></a> and the default value should be <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Boolean.html#FALSE" title="class or interface in java.lang" class="external-link"><code>Boolean​.FALSE</code></a> or equivalent.
<p>Implementers are encouraged to define an <em>optional</em> parameter with this name in complement to the
<a href="#LOCATION">"location"</a> parameter <em>only if</em> write operations are supported. If this parameter value is not
set or is set to <code>false</code>, then the <a href="#open(org.opengis.parameter.ParameterValueGroup)"><code>open(Parameter­Value­Group)</code></a> method should fail if no file or
database exists at the URL or path given by the <a href="#LOCATION">"location"</a> parameter. Otherwise if this parameter is
set to <code>true</code>, then the <code>open(…)</code> method may create files, a directory or a database at the given
location.</p>
<div class="note"><b>Relationship with standard file open options</b>
<p>For data stores on file systems, a <code>"create" = true</code> parameter value is equivalent to opening a file
with <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/StandardOpenOption.html#CREATE" title="class or interface in java.nio.file" class="external-link"><code>Standard­Open­Option​.CREATE</code></a> and <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/StandardOpenOption.html#APPEND" title="class or interface in java.nio.file" class="external-link"><code>APPEND</code></a>.
The other file standard options like <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/StandardOpenOption.html#CREATE_NEW" title="class or interface in java.nio.file" class="external-link"><code>CREATE_NEW</code></a> and
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/StandardOpenOption.html#TRUNCATE_EXISTING" title="class or interface in java.nio.file" class="external-link"><code>TRUNCATE_EXISTING</code></a> should not be accessible through
this "create" parameter. The reason is that <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/parameter/ParameterValueGroup.html" title="class or interface in org.opengis.parameter" class="external-link"><code>Parameter­Value­Group</code></a> may be used for storing parameters
permanently (for example in a configuration file or in a database) for reopening the same <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a>
many times. File options designed for being used only once like <code>CREATE_NEW</code> and <code>TRUNCATE_EXISTING</code>
are incompatible with this usage.</p></div></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#LOCATION"><code>LOCATION</code></a></li>
<li><a href="#getOpenParameters()"><code>get­Open­Parameters()</code></a></li>
<li><a href="../../../../constant-values.html#org.apache.sis.storage.DataStoreProvider.CREATE">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</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;()">
<h3>DataStoreProvider</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">DataStoreProvider</span>()</div>
<div class="block">Creates a new provider.</div>
</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="getShortName()">
<h3>getShortName</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getShortName</span>()</div>
<div class="block">Returns a short name or abbreviation for the data format.
This name is used in some warnings or exception messages.
It may contain any characters, including white spaces
(i.e. this short name is <strong>not</strong> a format identifier).
<div class="note"><b>Examples:</b>
<code>"CSV"</code>, <code>"Geo­TIFF"</code>, <code>"GML"</code>, <code>"GPX"</code>, <code>"JPEG"</code>, <code>"JPEG 2000"</code>,
<code>"Net­CDF"</code>, <code>"PNG"</code>, <code>"Shapefile"</code>.
</div>
For a more comprehensive format name, see <a href="#getFormat()"><code>get­Format()</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>a short name or abbreviation for the data format.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#getFormat()"><code>get­Format()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getFormat()">
<h3>getFormat</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/distribution/Format.html" title="class or interface in org.opengis.metadata.distribution" class="external-link">Format</a></span>&nbsp;<span class="element-name">getFormat</span>()</div>
<div class="block">Returns a description of the data format. The description should contain (if available):
<ul>
<li>A reference to the <a href="../metadata/iso/distribution/DefaultFormat.html#getFormatSpecificationCitation()">format specification citation</a>, including:
<ul>
<li>a format specification <a href="../metadata/iso/citation/DefaultCitation.html#getTitle()">title</a>
(example: <cite>“PNG (Portable Network Graphics) Specification”</cite>),</li>
<li>the format <a href="#getShortName()">short name</a> as a citation
<a href="../metadata/iso/citation/DefaultCitation.html#getAlternateTitles()">alternate title</a>
(example: <cite>“PNG”</cite>),</li>
<li>the format version as the citation <a href="../metadata/iso/citation/DefaultCitation.html#getEdition()">edition</a>,</li>
<li>link to an <a href="../metadata/iso/citation/DefaultCitation.html#getOnlineResources()">online</a> version of the specification.</li>
</ul>
</li>
<li>The title of the <a href="../metadata/iso/distribution/DefaultFormat.html#getFileDecompressionTechnique()">file decompression technique</a>
used for reading the data.</li>
</ul>
The default implementation returns a format containing only the value returned by <a href="#getShortName()"><code>get­Short­Name()</code></a>.
Subclasses are encouraged to override this method for providing a more complete description, if available.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>a description of the data format.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#getShortName()"><code>get­Short­Name()</code></a></li>
<li><a href="../metadata/iso/distribution/DefaultFormat.html" title="class in org.apache.sis.metadata.iso.distribution"><code>Default­Format</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSupportedVersions()">
<h3>getSupportedVersions</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="../util/Version.html" title="class in org.apache.sis.util">Version</a>&gt;</span>&nbsp;<span class="element-name">getSupportedVersions</span>()</div>
<div class="block">Returns the range of versions supported by the data store, or <code>null</code> if unspecified.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the range of supported versions, or <code>null</code> if unspecified.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getOpenParameters()">
<h3>getOpenParameters</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/parameter/ParameterDescriptorGroup.html" title="class or interface in org.opengis.parameter" class="external-link">ParameterDescriptorGroup</a></span>&nbsp;<span class="element-name">getOpenParameters</span>()</div>
<div class="block">Returns a description of all parameters accepted by this provider for opening a data store.
Those parameters provide an alternative to <a href="StorageConnector.html" title="class in org.apache.sis.storage"><code>Storage­Connector</code></a> for opening a <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a>
from a path or URL, together with additional information like character encoding.
<p>Implementers are responsible for declaring all parameters and whether they are mandatory or optional.
It is recommended to define at least a parameter named <a href="#LOCATION">"location"</a>, completed by <a href="#CREATE">"create"</a>
if the data store supports write operations.
Those parameters will be recognized by the default <code>Data­Store­Provider</code> methods and used whenever a
<a href="StorageConnector.html" title="class in org.apache.sis.storage"><code>Storage­Connector</code></a> is required.</p>
<div class="note"><b>Alternative:</b>
the main differences between the use of <code>Storage­Connector</code> and parameters are:
<ul class="verbose">
<li><code>Storage­Connector</code> is designed for use with file or stream of unknown format;
the format is automatically detected. By contrast, the use of parameters require to
determine the format first (i.e. select a <code>Data­Store­Provider</code>).</li>
<li>Parameters can be used to dynamically generate user configuration interfaces
and provide fine grain control over the store general behavior such as caching,
time-outs, encoding, <i>etc</i>.</li>
<li>Parameters can more easily be serialized in XML or configuration files.</li>
</ul></div></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>description of the parameters required or accepted for opening a <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a>.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#LOCATION"><code>LOCATION</code></a></li>
<li><a href="#CREATE"><code>CREATE</code></a></li>
<li><a href="#open(org.opengis.parameter.ParameterValueGroup)"><code>open(Parameter­Value­Group)</code></a></li>
<li><a href="DataStore.html#getOpenParameters()"><code>Data­Store​.get­Open­Parameters()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="probeContent(org.apache.sis.storage.StorageConnector)">
<h3>probeContent</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type"><a href="ProbeResult.html" title="class in org.apache.sis.storage">ProbeResult</a></span>&nbsp;<span class="element-name">probeContent</span><wbr><span class="parameters">(<a href="StorageConnector.html" title="class in org.apache.sis.storage">StorageConnector</a>&nbsp;connector)</span>
throws <span class="exceptions"><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></span></div>
<div class="block">Indicates if the given storage appears to be supported by the <code>Data­Store</code>s created by this provider.
Implementations will typically check the first bytes of the input stream for a "magic number" associated
with the format. The most typical return values are:
<ul>
<li><a href="ProbeResult.html#SUPPORTED"><code>Probe­Result​.SUPPORTED</code></a> or another instance with <a href="ProbeResult.html#isSupported()">supported</a>
status if the <code>Data­Store</code>s created by this provider can open the given storage.</li>
<li><a href="ProbeResult.html#UNSUPPORTED_STORAGE"><code>Probe­Result​.UNSUPPORTED_STORAGE</code></a> if the given storage does not appear to be in a format
supported by this <code>Data­Store­Provider</code>.</li>
</ul>
Note that the <code>SUPPORTED</code> value does not guarantee that reading or writing will succeed,
only that there appears to be a reasonable chance of success based on a brief inspection of the
<a href="StorageConnector.html#getStorage()">storage object</a> or contents.
<div class="note"><b>Note for implementers</b>:
Implementations are responsible for restoring the storage object to its original position
on return of this method. Implementers can use the mark/reset mechanism for this purpose.
Marks are available as <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/ByteBuffer.html#mark()" title="class or interface in java.nio" class="external-link"><code>Byte­Buffer​.mark()</code></a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/InputStream.html#mark(int)" title="class or interface in java.io" class="external-link"><code>Input­Stream​.mark(int)</code></a>
and <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/javax/imageio/stream/ImageInputStream.html#mark()" title="class or interface in javax.imageio.stream" class="external-link"><code>Image­Input­Stream​.mark()</code></a>.
Alternatively, the <a href="#probeContent(org.apache.sis.storage.StorageConnector,java.lang.Class,org.apache.sis.storage.DataStoreProvider.Prober)"><code>probe­Content(Storage­Connector, Class, Prober)</code></a>
helper method manages automatically the marks for a set of known types.
</div></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>connector</code> - information about the storage (URL, stream, JDBC connection, <i>etc</i>).</dd>
<dt>Returns:</dt>
<dd>a <a href="ProbeResult.html#isSupported()">supported</a> status if the given storage
seems to be readable by the <code>Data­Store</code> instances created by this provider.</dd>
<dt>Throws:</dt>
<dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if an I/O or SQL error occurred. The error shall be unrelated to the logical
structure of the storage.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="probeContent(org.apache.sis.storage.StorageConnector,java.lang.Class,org.apache.sis.storage.DataStoreProvider.Prober)">
<h3>probeContent</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="type-parameters">&lt;S&gt;</span>&nbsp;<span class="return-type"><a href="ProbeResult.html" title="class in org.apache.sis.storage">ProbeResult</a></span>&nbsp;<span class="element-name">probeContent</span><wbr><span class="parameters">(<a href="StorageConnector.html" title="class in org.apache.sis.storage">StorageConnector</a>&nbsp;connector,
<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;S&gt;&nbsp;type,
<a href="DataStoreProvider.Prober.html" title="interface in org.apache.sis.storage">DataStoreProvider.Prober</a>&lt;? super S&gt;&nbsp;prober)</span>
throws <span class="exceptions"><a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></span></div>
<div class="block">Applies the specified test on the storage content without modifying buffer or input stream position.
This is a helper method for <a href="#probeContent(org.apache.sis.storage.StorageConnector)"><code>probe­Content(Storage­Connector)</code></a> implementations,
providing an alternative safer than <a href="StorageConnector.html#getStorageAs(java.lang.Class)"><code>Storage­Connector​.get­Storage­As(Class)</code></a>
for performing an arbitrary number of independent tests on the same <code>Storage­Connector</code>.
Current implementation accepts the following types (this list may be expanded in future versions):
<blockquote>
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link"><code>Byte­Buffer</code></a> (default byte order fixed to <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/ByteOrder.html#BIG_ENDIAN" title="class or interface in java.nio" class="external-link"><code>BIG_ENDIAN</code></a>),
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link"><code>Input­Stream</code></a>,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/DataInput.html" title="class or interface in java.io" class="external-link"><code>Data­Input</code></a>,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/javax/imageio/stream/ImageInputStream.html" title="class or interface in javax.imageio.stream" class="external-link"><code>Image­Input­Stream</code></a> and
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/Reader.html" title="class or interface in java.io" class="external-link"><code>Reader</code></a>.
</blockquote>
The following types are also accepted for completeness but provide no additional safety
compared to direct use of <a href="StorageConnector.html#getStorageAs(java.lang.Class)"><code>Storage­Connector​.get­Storage­As(Class)</code></a>:
<blockquote>
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URI.html" title="class or interface in java.net" class="external-link"><code>URI</code></a>,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link"><code>URL</code></a>,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link"><code>File</code></a>,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link"><code>Path</code></a> and
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a> (interpreted as a file path).
</blockquote>
This method <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/InputStream.html#mark(int)" title="class or interface in java.io" class="external-link">marks</a> and <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/InputStream.html#reset()" title="class or interface in java.io" class="external-link">resets</a>
streams automatically with an arbitrary read-ahead limit (typically okay for the first 8 kilobytes).
<h4>Usage example</h4>
<a href="#probeContent(org.apache.sis.storage.StorageConnector)"><code>probe­Content(Storage­Connector)</code></a> implementations often check the first bytes of the
input stream for a "magic number" associated with the format, as in the following example:
<blockquote><pre>@Override
<font color="green">public</font> ProbeResult <b>probeContent</b>(StorageConnector connector) <font color="green">throws</font> DataStoreException {
<font color="green">return</font> <b>probeContent</b>(connector, ByteBuffer.<font color="green">class</font>, (buffer) -&gt; {
<font color="green">if</font> (buffer.<b>remaining</b>() &gt;= Integer.BYTES) {
<font color="green">if</font> (buffer.<b>getInt</b>() == MAGIC_NUMBER) {
<font color="green">return</font> ProbeResult.SUPPORTED;
}
<font color="green">return</font> ProbeResult.UNSUPPORTED_STORAGE;
}
<i><font color="gray">// If the buffer does not contain enough bytes for the integer type, this is not</font></i>
<i><font color="gray">// necessarily because the file is truncated. It may be because the data were not</font></i>
<i><font color="gray">// yet available at the time this method has been invoked.</font></i>
<font color="green">return</font> ProbeResult.INSUFFICIENT_BYTES;
});
}</pre></blockquote></div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>S</code> - the compile-time type of the <code>type</code> argument (the source or storage type).</dd>
<dt>Parameters:</dt>
<dd><code>connector</code> - information about the storage (URL, stream, JDBC connection, <i>etc</i>).</dd>
<dd><code>type</code> - the desired type as one of <code>Byte­Buffer</code>, <code>Data­Input</code>, <code>Connection</code>
class or other <a href="StorageConnector.html#getStorageAs(java.lang.Class)">documented types</a>.</dd>
<dd><code>prober</code> - the test to apply on the source of the given type.</dd>
<dt>Returns:</dt>
<dd>the result of executing the probe action with a source of the given type,
or <a href="ProbeResult.html#UNSUPPORTED_STORAGE"><code>Probe­Result​.UNSUPPORTED_STORAGE</code></a> if the given type is supported
but no view can be created for the source given at construction time.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if the given <code>type</code> argument is not one of the supported types.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if this <code>Storage­Connector</code> has been <a href="StorageConnector.html#closeAllExcept(java.lang.Object)">closed</a>.</dd>
<dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if an error occurred while opening a stream or database connection,
or during the execution of the probe action.</dd>
<dt>Since:</dt>
<dd>1.2</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#probeContent(org.apache.sis.storage.StorageConnector)"><code>probe­Content(Storage­Connector)</code></a></li>
<li><a href="StorageConnector.html#getStorageAs(java.lang.Class)"><code>Storage­Connector​.get­Storage­As(Class)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="open(org.apache.sis.storage.StorageConnector)">
<h3>open</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type"><a href="DataStore.html" title="class in org.apache.sis.storage">DataStore</a></span>&nbsp;<span class="element-name">open</span><wbr><span class="parameters">(<a href="StorageConnector.html" title="class in org.apache.sis.storage">StorageConnector</a>&nbsp;connector)</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 data store implementation associated with this provider.
This method is typically invoked when the format is not known in advance
(the <a href="#probeContent(org.apache.sis.storage.StorageConnector)"><code>probe­Content(Storage­Connector)</code></a> method can be tested on many providers)
or when the input is not a type accepted by <a href="#open(org.opengis.parameter.ParameterValueGroup)"><code>open(Parameter­Value­Group)</code></a>
(for example an <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link"><code>Input­Stream</code></a>).
<h4>Implementation note</h4>
Implementers shall invoke <a href="StorageConnector.html#closeAllExcept(java.lang.Object)"><code>Storage­Connector​.close­All­Except(Object)</code></a> after <code>Data­Store</code>
creation, keeping open only the needed resource.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>connector</code> - information about the storage (URL, stream, JDBC connection, <i>etc</i>).</dd>
<dt>Returns:</dt>
<dd>a data store implementation associated with this provider for the given storage.</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 creating the data store instance.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="DataStores.html#open(java.lang.Object)"><code>Data­Stores​.open(Object)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="open(org.opengis.parameter.ParameterValueGroup)">
<h3>open</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="DataStore.html" title="class in org.apache.sis.storage">DataStore</a></span>&nbsp;<span class="element-name">open</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/parameter/ParameterValueGroup.html" title="class or interface in org.opengis.parameter" class="external-link">ParameterValueGroup</a>&nbsp;parameters)</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 data store implementation associated with this provider for the given parameters.
The <code>Data­Store­Provider</code> instance needs to be known before parameters are initialized,
since the parameters are implementation-dependent. Example:
<blockquote><pre>DataStoreProvider provider = ...;
ParameterValueGroup pg = provider.<b>getOpenParameters</b>().<b>createValue</b>();
pg.<b>parameter</b>(DataStoreProvider.LOCATION, myURL);
<i><font color="gray">// Set any other parameters if desired.</font></i>
<font color="green">try</font> (DataStore ds = provider.<b>open</b>(pg)) {
<i><font color="gray">// Use the data store.</font></i>
}</pre></blockquote>
<h4>Implementation note</h4>
The default implementation gets the value of a parameter named <a href="#LOCATION">"location"</a>.
That value (typically a path or URL) is given to <a href="StorageConnector.html" title="class in org.apache.sis.storage"><code>Storage­Connector</code></a> constructor,
which is then passed to <a href="#open(org.apache.sis.storage.StorageConnector)"><code>open(Storage­Connector)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>parameters</code> - opening parameters as defined by <a href="#getOpenParameters()"><code>get­Open­Parameters()</code></a>.</dd>
<dt>Returns:</dt>
<dd>a data store implementation associated with this provider for the given parameters.</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 creating the data store instance.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#LOCATION"><code>LOCATION</code></a></li>
<li><a href="#CREATE"><code>CREATE</code></a></li>
<li><a href="#getOpenParameters()"><code>get­Open­Parameters()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLogger()">
<h3>getLogger</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.logging/java/util/logging/Logger.html" title="class or interface in java.util.logging" class="external-link">Logger</a></span>&nbsp;<span class="element-name">getLogger</span>()</div>
<div class="block">Returns the logger where to report warnings or loading operations.
This logger is used only if no <a href="event/StoreListener.html" title="interface in org.apache.sis.storage.event"><code>Store­Listener</code></a>
has been registered for <a href="event/WarningEvent.html" title="class in org.apache.sis.storage.event"><code>Warning­Event</code></a>.
<p>The default implementation returns a logger with the same name as the package name
of the subclass of this <code>Data­Store­Provider</code> instance. Subclasses should override
this method if they can provide a more specific logger.</p></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the logger to use as a fallback (when there are no listeners) for warning messages.</dd>
<dt>Since:</dt>
<dd>1.0</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="event/StoreListeners.html#getLogger()"><code>Store­Listeners​.get­Logger()</code></a></li>
</ul>
</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>