| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (19) --> |
| <title>OptionalInstallations (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.setup, class: OptionalInstallations"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.setup.OptionalInstallations class"> |
| <meta name="keywords" content="destinationDirectory"> |
| <meta name="keywords" content="askUserAgreement()"> |
| <meta name="keywords" content="getLocale()"> |
| <meta name="keywords" content="getAuthorities()"> |
| <meta name="keywords" content="getSpaceRequirement()"> |
| <meta name="keywords" content="getLicense()"> |
| <meta name="keywords" content="getResourceNames()"> |
| <meta name="keywords" content="getResource()"> |
| <meta name="keywords" content="openScript()"> |
| <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"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </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/OptionalInstallations.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: </li> |
| <li>Nested | </li> |
| <li><a href="#field-summary">Field</a> | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li><a href="#field-detail">Field</a> | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <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> <a href="package-summary.html">org.apache.sis.setup</a></div> |
| <h1 title="Class OptionalInstallations" class="title">Class OptionalInstallations</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"><a href="InstallationResources.html" title="class in org.apache.sis.setup">InstallationResources</a> |
| <div class="inheritance">OptionalInstallations</div> |
| </div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="../util/Localized.html" title="interface in org.apache.sis.util">Localized</a></code></dd> |
| </dl> |
| <dl class="notes"> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="../console/ResourcesDownloader.html" title="class in org.apache.sis.console">ResourcesDownloader</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">OptionalInstallations</span> |
| <span class="extends-implements">extends <a href="InstallationResources.html" title="class in org.apache.sis.setup">InstallationResources</a> |
| implements <a href="../util/Localized.html" title="interface in org.apache.sis.util">Localized</a></span></div> |
| <div class="block">A predefined set of data important to Apache SIS but not redistributed for space or licensing reasons. |
| This class is in charge of downloading the data if necessary and asking user's agreement before to install them. |
| Authorities managed by the current implementation are: |
| |
| <ul> |
| <li><code>"EPSG"</code> for the EPSG geodetic dataset.</li> |
| </ul> |
| |
| Data are downloaded from URLs hard-coded in this class. Those URLs depend on the Apache SIS versions in use, |
| typically because more recent SIS versions will reference more recent data. |
| The default URLs can be overridden using system properties documented in <code>getDownloadURL(String)</code>. |
| This is useful as a workaround if a URL is no longer accessible.</div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>1.1</dd> |
| |
| <p><font size="-1">Defined in the <code>sis-utility</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="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">Path</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#destinationDirectory" class="member-name-link">destinationDirectory</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">The target directory where to install the resources, or <code>null</code> if none.</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(java.lang.String)" class="member-name-link">OptionalInstallations</a><wbr>(<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> licenseMimeType)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new installation resources downloader.</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-tab3"><code>protected abstract boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#askUserAgreement(java.lang.String,java.lang.String)" class="member-name-link">askUserAgreement</a><wbr>(<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> authority, |
| <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> license)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Asks to the user if (s)he agree to download and install the resource for the given authority.</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/Set.html" title="class or interface in java.util" class="external-link">Set</a><<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-tab4"><code><a href="#getAuthorities()" class="member-name-link">getAuthorities</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 names of the authorities providing data that can be installed.</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/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLicense(java.lang.String,java.util.Locale,java.lang.String)" class="member-name-link">getLicense</a><wbr>(<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> authority, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a> locale, |
| <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> mimeType)</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 terms of use of the dataset provided by the given authority, or <code>null</code> if none.</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/Locale.html" title="class or interface in java.util" class="external-link">Locale</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLocale()" class="member-name-link">getLocale</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 locale to use for messages shown to the user.</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/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="#getResource(java.lang.String,int)" class="member-name-link">getResource</a><wbr>(<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> authority, |
| int index)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns an installation resource for the given authority.</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/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-tab4"><code><a href="#getResourceNames(java.lang.String)" class="member-name-link">getResourceNames</a><wbr>(<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> authority)</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 names of installation scripts provided by the given authority.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSpaceRequirement(java.lang.String)" class="member-name-link">getSpaceRequirement</a><wbr>(<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> authority)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns an estimation of the space required on the host computer after download and installation.</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/io/BufferedReader.html" title="class or interface in java.io" class="external-link">BufferedReader</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#openScript(java.lang.String,int)" class="member-name-link">openScript</a><wbr>(<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> authority, |
| int resource)</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 reader for the installation script at the given index.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-InstallationResources">Methods inherited from class <a href="InstallationResources.html" title="class in org.apache.sis.setup">InstallationResources</a></h3> |
| <code><a href="InstallationResources.html#getInstructionURL()">getInstructionURL</a></code></div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-Object">Methods inherited from class <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">getClass</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">hashCode</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">notifyAll</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">toString</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="destinationDirectory"> |
| <h3>destinationDirectory</h3> |
| <div class="member-signature"><span class="modifiers">protected final</span> <span class="return-type"><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">Path</a></span> <span class="element-name">destinationDirectory</span></div> |
| <div class="block">The target directory where to install the resources, or <code>null</code> if none. |
| This is the directory specified by the <code>SIS_DATA</code> environment variable.</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="<init>(java.lang.String)"> |
| <h3>OptionalInstallations</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="element-name">OptionalInstallations</span><wbr><span class="parameters">(<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> licenseMimeType)</span></div> |
| <div class="block">Creates a new installation resources downloader.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>licenseMimeType</code> - either <code>"text/plain"</code> or <code>"text/html"</code>.</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="askUserAgreement(java.lang.String,java.lang.String)"> |
| <h3>askUserAgreement</h3> |
| <div class="member-signature"><span class="modifiers">protected abstract</span> <span class="return-type">boolean</span> <span class="element-name">askUserAgreement</span><wbr><span class="parameters">(<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> authority, |
| <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> license)</span></div> |
| <div class="block">Asks to the user if (s)he agree to download and install the resource for the given authority. |
| This method may be invoked twice for the same <code>authority</code> argument: |
| |
| <ol> |
| <li>With a null <code>license</code> argument for asking if the user agrees to download the data.</li> |
| <li>With a non-null <code>license</code> argument for asking if the user agrees with the license terms.</li> |
| </ol> |
| |
| <div class="note"><b>Design note:</b> |
| the download action needs to be initiated before to ask for license agreement |
| because the license text is bundled in the resource to download.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>authority</code> - one of the authorities returned by <a href="#getAuthorities()"><code>getAuthorities()</code></a>.</dd> |
| <dd><code>license</code> - the license, or <code>null</code> for asking if the user wants to download the data.</dd> |
| <dt>Returns:</dt> |
| <dd>whether user accepted.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getLocale()"> |
| <h3>getLocale</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a></span> <span class="element-name">getLocale</span>()</div> |
| <div class="block">Returns the locale to use for messages shown to the user. |
| The default implementation returns the system default locale.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="../util/Localized.html#getLocale()">getLocale</a></code> in interface <code><a href="../util/Localized.html" title="interface in org.apache.sis.util">Localized</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>the locale of messages shown to the user.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getAuthorities()"> |
| <h3>getAuthorities</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a><<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> <span class="element-name">getAuthorities</span>()</div> |
| <div class="block">Returns the names of the authorities providing data that can be installed. |
| The default implementation returns the authorities listed in class javadoc, |
| or a subset of those authorities if some of them cannot be installed |
| (for example because the <code>SIS_DATA</code> environment variable is not set).</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="InstallationResources.html#getAuthorities()">getAuthorities</a></code> in class <code><a href="InstallationResources.html" title="class in org.apache.sis.setup">InstallationResources</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>authorities of data that can be installed (may be an empty set).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getSpaceRequirement(java.lang.String)"> |
| <h3>getSpaceRequirement</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getSpaceRequirement</span><wbr><span class="parameters">(<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> authority)</span></div> |
| <div class="block">Returns an estimation of the space required on the host computer after download and installation. |
| This information can be shown to the user before to ask for confirmation.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>authority</code> - one of the authorities returned by <a href="#getAuthorities()"><code>getAuthorities()</code></a>.</dd> |
| <dt>Returns:</dt> |
| <dd>an estimation of space requirement in megabytes.</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">IllegalArgumentException</a></code> - if the given <code>authority</code> argument is not one of the expected values.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getLicense(java.lang.String,java.util.Locale,java.lang.String)"> |
| <h3>getLicense</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <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> <span class="element-name">getLicense</span><wbr><span class="parameters">(<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> authority, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a> locale, |
| <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> mimeType)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Returns the terms of use of the dataset provided by the given authority, or <code>null</code> if none. |
| The terms of use can be returned in either plain text or HTML.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="InstallationResources.html#getLicense(java.lang.String,java.util.Locale,java.lang.String)">getLicense</a></code> in class <code><a href="InstallationResources.html" title="class in org.apache.sis.setup">InstallationResources</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>authority</code> - one of the values returned by <a href="#getAuthorities()"><code>getAuthorities()</code></a>.</dd> |
| <dd><code>locale</code> - the preferred locale for the terms of use.</dd> |
| <dd><code>mimeType</code> - either <code>"text/plain"</code> or <code>"text/html"</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the terms of use in plain text or HTML, or <code>null</code> if none.</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">IllegalArgumentException</a></code> - if the given <code>authority</code> argument is not one of the expected values.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if an error occurred while reading the license file.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getResourceNames(java.lang.String)"> |
| <h3>getResourceNames</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <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> <span class="element-name">getResourceNames</span><wbr><span class="parameters">(<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> authority)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Returns the names of installation scripts provided by the given authority. |
| This method is invoked by <a href="../referencing/factory/sql/EPSGFactory.html#install(java.sql.Connection)"><code>EPSGFactory.install(Connection)</code></a> |
| for listing the SQL scripts to execute during EPSG dataset installation. |
| |
| <p>If that question has not already been asked, this method asks to the user if (s)he accepts |
| EPSG terms of use. If (s)he refuses, then an <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/AccessDeniedException.html" title="class or interface in java.nio.file" class="external-link"><code>AccessDeniedException</code></a> will be thrown.</p></div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="InstallationResources.html#getResourceNames(java.lang.String)">getResourceNames</a></code> in class <code><a href="InstallationResources.html" title="class in org.apache.sis.setup">InstallationResources</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>authority</code> - one of the values returned by <a href="#getAuthorities()"><code>getAuthorities()</code></a>.</dd> |
| <dt>Returns:</dt> |
| <dd>the names of all SQL scripts to execute.</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">IllegalArgumentException</a></code> - if the given <code>authority</code> argument is not one of the expected values.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if an error occurred while fetching the script names.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getResource(java.lang.String,int)"> |
| <h3>getResource</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <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> <span class="element-name">getResource</span><wbr><span class="parameters">(<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> authority, |
| int index)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Returns an installation resource for the given authority. |
| If that question has not already been asked, this method asks to the user if (s)he accepts |
| EPSG terms of use. If (s)he refuses, then an <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/AccessDeniedException.html" title="class or interface in java.nio.file" class="external-link"><code>AccessDeniedException</code></a> will be thrown.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="InstallationResources.html#getResource(java.lang.String,int)">getResource</a></code> in class <code><a href="InstallationResources.html" title="class in org.apache.sis.setup">InstallationResources</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>authority</code> - one of the values returned by <a href="#getAuthorities()"><code>getAuthorities()</code></a>.</dd> |
| <dd><code>index</code> - index of the resource to get, from 0 inclusive to |
| <code><a href="#getResourceNames(java.lang.String)">getResourceNames</a>(authority).length</code> exclusive.</dd> |
| <dt>Returns:</dt> |
| <dd>the resource as an URL or any other type, at implementation choice.</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">IllegalArgumentException</a></code> - if the given <code>authority</code> argument is not one of the expected values.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></code> - if the given <code>resource</code> argument is out of bounds.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if an error occurred while fetching the resource.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/ClassLoader.html#getResource(java.lang.String)" title="class or interface in java.lang" class="external-link"><code>ClassLoader.getResource(String)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="openScript(java.lang.String,int)"> |
| <h3>openScript</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/BufferedReader.html" title="class or interface in java.io" class="external-link">BufferedReader</a></span> <span class="element-name">openScript</span><wbr><span class="parameters">(<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> authority, |
| int resource)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Returns a reader for the installation script at the given index. |
| This method is invoked by <a href="../referencing/factory/sql/EPSGFactory.html#install(java.sql.Connection)"><code>EPSGFactory.install(Connection)</code></a> |
| for getting the SQL scripts to execute during EPSG dataset installation. |
| |
| <p>If that question has not already been asked, this method asks to the user if (s)he accepts |
| EPSG terms of use. If (s)he refuses, then an <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/AccessDeniedException.html" title="class or interface in java.nio.file" class="external-link"><code>AccessDeniedException</code></a> will be thrown.</p></div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="InstallationResources.html#openScript(java.lang.String,int)">openScript</a></code> in class <code><a href="InstallationResources.html" title="class in org.apache.sis.setup">InstallationResources</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>authority</code> - one of the values returned by <a href="#getAuthorities()"><code>getAuthorities()</code></a>.</dd> |
| <dd><code>resource</code> - index of the script to open, from 0 inclusive to |
| <code><a href="#getResourceNames(java.lang.String)">getResourceNames</a>(authority).length</code> exclusive.</dd> |
| <dt>Returns:</dt> |
| <dd>a reader for the installation script content.</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">IllegalArgumentException</a></code> - if the given <code>authority</code> argument is not one of the expected values.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></code> - if the given <code>resource</code> argument is out of bounds.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/FileNotFoundException.html" title="class or interface in java.io" class="external-link">FileNotFoundException</a></code> - if the SQL script of the given name has not been found.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if an error occurred while creating the reader.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2010–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |