| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (19) --> |
| <title>Types (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.util.iso, class: Types"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.util.iso.Types class"> |
| <meta name="keywords" content="getStandardName()"> |
| <meta name="keywords" content="getListName()"> |
| <meta name="keywords" content="getCodeName()"> |
| <meta name="keywords" content="getCodeLabel()"> |
| <meta name="keywords" content="getCodeTitle()"> |
| <meta name="keywords" content="getDescription()"> |
| <meta name="keywords" content="getCodeValues()"> |
| <meta name="keywords" content="forStandardName()"> |
| <meta name="keywords" content="forEnumName()"> |
| <meta name="keywords" content="forCodeName()"> |
| <meta name="keywords" content="forCodeTitle()"> |
| <meta name="keywords" content="toInternationalString()"> |
| <meta name="keywords" content="toInternationalStrings()"> |
| <meta name="keywords" content="toString()"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../sis.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../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/Types.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Summary:</p> |
| <ul> |
| <li>Nested</li> |
| <li>Field</li> |
| <li>Constr</li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| </li> |
| <li> |
| <p>Detail:</p> |
| <ul> |
| <li>Field</li> |
| <li>Constr</li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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.util.iso</a></div> |
| <h1 title="Class Types" class="title">Class Types</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="../Static.html" title="class in org.apache.sis.util">Static</a> |
| <div class="inheritance">Types</div> |
| </div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">Types</span> |
| <span class="extends-implements">extends <a href="../Static.html" title="class in org.apache.sis.util">Static</a></span></div> |
| <div class="block">Static methods working on GeoAPI types and <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link"><code>CodeList</code></a> values. |
| This class provides: |
| |
| <ul> |
| <li>Methods for fetching the ISO name or description of a code list:<ul> |
| <li><a href="#getStandardName(java.lang.Class)"><code>getStandardName(Class)</code></a> for ISO name</li> |
| <li><a href="#getListName(org.opengis.util.CodeList)"><code>getListName(CodeList)</code></a> for ISO name</li> |
| <li><a href="#getDescription(java.lang.Class)"><code>getDescription(Class)</code></a> for a description</li> |
| </ul></li> |
| <li>Methods for fetching the ISO name or description of a code value:<ul> |
| <li><a href="#getCodeName(org.opengis.util.CodeList)"><code>getCodeName(CodeList)</code></a> for ISO name,</li> |
| <li><a href="#getCodeTitle(org.opengis.util.CodeList)"><code>getCodeTitle(CodeList)</code></a> for a label or title</li> |
| <li><a href="#getDescription(org.opengis.util.CodeList)"><code>getDescription(CodeList)</code></a> for a more verbose description</li> |
| </ul></li> |
| <li>Methods for fetching an instance from a name (converse of above <code>get</code> methods):<ul> |
| <li><a href="#forCodeName(java.lang.Class,java.lang.String,boolean)"><code>forCodeName(Class, String, boolean)</code></a></li> |
| <li><a href="#forEnumName(java.lang.Class,java.lang.String)"><code>forEnumName(Class, String)</code></a></li> |
| </ul></li> |
| </ul> |
| |
| <h2>Substituting a free text by a code list</h2> |
| The ISO standard allows to substitute some character strings in the <cite>"free text"</cite> domain |
| by a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link"><code>CodeList</code></a> value. |
| |
| <div class="note"><b>Example:</b> |
| in the following XML fragment, the <code><mac:type></code> value is normally a <code><gco:CharacterString></code> |
| but has been replaced by a <code>SensorType</code> code below: |
| |
| <blockquote><pre><mac:MI_Instrument> |
| <mac:type> |
| <gmi:MI_SensorTypeCode |
| codeList="http://standards.iso.org/…snip…/codelists.xml#CI_SensorTypeCode" |
| codeListValue="RADIOMETER">Radiometer</gmi:MI_SensorTypeCode> |
| </mac:type> |
| </mac:MI_Instrument></pre></blockquote> |
| </div> |
| |
| Such substitution can be done with: |
| |
| <ul> |
| <li><a href="#getCodeTitle(org.opengis.util.CodeList)"><code>getCodeTitle(CodeList)</code></a> for getting the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString</code></a> instance |
| to store in a metadata property.</li> |
| <li><a href="#forCodeTitle(java.lang.CharSequence)"><code>forCodeTitle(CharSequence)</code></a> for retrieving the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link"><code>CodeList</code></a> previously stored as an |
| <code>InternationalString</code>.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.3</dd> |
| |
| <p><font size="-1">Defined in the <code>sis-metadata</code> module</font></p> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static 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-tab1 method-summary-table-tab4"><code>static <T extends <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><T>><br>T</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#forCodeName(java.lang.Class,java.lang.String,boolean)" class="member-name-link">forCodeName</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> codeType, |
| <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> name, |
| boolean canCreate)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the code of the given type that matches the given name, or optionally returns a new one if none |
| match the name.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#forCodeTitle(java.lang.CharSequence)" class="member-name-link">forCodeTitle</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> title)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the code list or enumeration value for the given title, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <T extends <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Enum.html" title="class or interface in java.lang" class="external-link">Enum</a><T>><br>T</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#forEnumName(java.lang.Class,java.lang.String)" class="member-name-link">forEnumName</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> enumType, |
| <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> name)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the enumeration value of the given type that matches the given name, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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><?></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#forStandardName(java.lang.String)" class="member-name-link">forStandardName</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> identifier)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the Java type (usually a GeoAPI interface) for the given ISO name, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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-tab1 method-summary-table-tab4"><code><a href="#getCodeLabel(org.opengis.util.CodeList)" class="member-name-link">getCodeLabel</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?> code)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns a unlocalized title for the given enumeration or code list value.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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-tab1 method-summary-table-tab4"><code><a href="#getCodeName(org.opengis.util.CodeList)" class="member-name-link">getCodeName</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?> code)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the ISO name (if available) or the Java name (as a fallback) of the given enumeration or code list |
| value.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getCodeTitle(org.opengis.util.CodeList)" class="member-name-link">getCodeTitle</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?> code)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the title of the given enumeration or code list value.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <T extends <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?>><br>T[]</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getCodeValues(java.lang.Class)" class="member-name-link">getCodeValues</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> codeType)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns all known values for the given type of code list.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getDescription(java.lang.Class)" class="member-name-link">getDescription</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns a description for the given class, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getDescription(java.lang.Class,java.lang.String)" class="member-name-link">getDescription</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> 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> property)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns a description for the given property, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getDescription(org.opengis.util.CodeList)" class="member-name-link">getDescription</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?> code)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the description of the given enumeration or code list value, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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-tab1 method-summary-table-tab4"><code><a href="#getListName(org.opengis.util.CodeList)" class="member-name-link">getListName</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?> code)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the ISO classname (if available) or the Java classname (as a fallback) of the given |
| enumeration or code list value.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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-tab1 method-summary-table-tab4"><code><a href="#getStandardName(java.lang.Class)" class="member-name-link">getStandardName</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the ISO name for the given class, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toInternationalString(java.lang.CharSequence)" class="member-name-link">toInternationalString</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> string)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the given characters sequence as an international string.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toInternationalString(java.util.Map,java.lang.String)" class="member-name-link">toInternationalString</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</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>,<wbr>?> properties, |
| <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> prefix)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns an international string for the values in the given properties map, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a>[]</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toInternationalStrings(java.lang.CharSequence...)" class="member-name-link">toInternationalStrings</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a>... strings)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the given array of <code>CharSequence</code>s as an array of <code>InternationalString</code>s.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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-tab1 method-summary-table-tab4"><code><a href="#toString(org.opengis.util.InternationalString,java.util.Locale)" class="member-name-link">toString</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a> i18n, |
| <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)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the given international string in the given locale, or <code>null</code> if the given string is null.</div> |
| </div> |
| </div> |
| </div> |
| </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"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="getStandardName(java.lang.Class)"> |
| <h3>getStandardName</h3> |
| <div class="member-signature"><span class="annotations"><a href="../OptionalCandidate.html" title="annotation interface in org.apache.sis.util">@OptionalCandidate</a> |
| </span><span class="modifiers">public static</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">getStandardName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type)</span></div> |
| <div class="block">Returns the ISO name for the given class, or <code>null</code> if none. |
| This method can be used for GeoAPI interfaces or <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link"><code>CodeList</code></a>. |
| |
| <div class="note"><b>Examples:</b> |
| <ul> |
| <li><code>getStandardName(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/citation/Citation.html" title="class or interface in org.opengis.metadata.citation" class="external-link">Citation</a>.class)</code> |
| (an interface) returns <code>"CI_Citation"</code>.</li> |
| <li><code>getStandardName(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html" title="class or interface in org.opengis.referencing.cs" class="external-link">AxisDirection</a>.class)</code> |
| (a code list) returns <code>"CS_AxisDirection"</code>.</li> |
| </ul> |
| </div> |
| |
| This method looks for the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/annotation/UML.html" title="class or interface in org.opengis.annotation" class="external-link"><code>UML</code></a> annotation on the given type. It does not search for |
| parent classes or interfaces if the given type is not directly annotated (i.e. <code>@UML</code> |
| annotations are not inherited). If no annotation is found, then this method does not fallback |
| on the Java name since, as the name implies, this method is about standard names.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the GeoAPI interface or code list from which to get the ISO name, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the ISO name for the given type, or <code>null</code> if none or if the given type is <code>null</code>.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#forStandardName(java.lang.String)"><code>forStandardName(String)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getListName(org.opengis.util.CodeList)"> |
| <h3>getListName</h3> |
| <div class="member-signature"><span class="modifiers">public static</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">getListName</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?> code)</span></div> |
| <div class="block">Returns the ISO classname (if available) or the Java classname (as a fallback) of the given |
| enumeration or code list value. This method uses the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/annotation/UML.html" title="class or interface in org.opengis.annotation" class="external-link"><code>UML</code></a> annotation if it exists, or |
| fallback on the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html#getSimpleName()" title="class or interface in java.lang" class="external-link">simple class name</a> otherwise. |
| |
| <div class="note"><b>Examples:</b> |
| <ul> |
| <li><code>getListName(ParameterDirection.IN_OUT)</code> returns <code>"SV_ParameterDirection"</code>.</li> |
| <li><code>getListName(AxisDirection.NORTH)</code> returns <code>"CS_AxisDirection"</code>.</li> |
| <li><code>getListName(TopicCategory.INLAND_WATERS)</code> returns <code>"MD_TopicCategoryCode"</code>.</li> |
| <li><code>getListName(ImagingCondition.BLURRED_IMAGE)</code> returns <code>"MD_ImagingConditionCode"</code>.</li> |
| </ul> |
| </div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>code</code> - the code for which to get the class name, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the ISO (preferred) or Java (fallback) class name, or <code>null</code> if the given code is null.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCodeName(org.opengis.util.CodeList)"> |
| <h3>getCodeName</h3> |
| <div class="member-signature"><span class="modifiers">public static</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">getCodeName</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?> code)</span></div> |
| <div class="block">Returns the ISO name (if available) or the Java name (as a fallback) of the given enumeration or code list |
| value. If the value has no <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/annotation/UML.html" title="class or interface in org.opengis.annotation" class="external-link"><code>UML</code></a> identifier, then the programmatic name is used as a fallback. |
| |
| <div class="note"><b>Examples:</b> |
| <ul> |
| <li><code>getCodeName(ParameterDirection.IN_OUT)</code> returns <code>"in/out"</code>.</li> |
| <li><code>getCodeName(AxisDirection.NORTH)</code> returns <code>"north"</code>.</li> |
| <li><code>getCodeName(TopicCategory.INLAND_WATERS)</code> returns <code>"inlandWaters"</code>.</li> |
| <li><code>getCodeName(ImagingCondition.BLURRED_IMAGE)</code> returns <code>"blurredImage"</code>.</li> |
| </ul> |
| </div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>code</code> - the code for which to get the name, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the UML identifiers or programmatic name for the given code, or <code>null</code> if the given code is null.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="#getCodeLabel(org.opengis.util.CodeList)"><code>getCodeLabel(CodeList)</code></a></li> |
| <li><a href="#getCodeTitle(org.opengis.util.CodeList)"><code>getCodeTitle(CodeList)</code></a></li> |
| <li><a href="#getDescription(org.opengis.util.CodeList)"><code>getDescription(CodeList)</code></a></li> |
| <li><a href="#forCodeName(java.lang.Class,java.lang.String,boolean)"><code>forCodeName(Class, String, boolean)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCodeLabel(org.opengis.util.CodeList)"> |
| <h3>getCodeLabel</h3> |
| <div class="member-signature"><span class="modifiers">public static</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">getCodeLabel</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?> code)</span></div> |
| <div class="block">Returns a unlocalized title for the given enumeration or code list value. |
| This method builds a title using heuristics rules, which should give reasonable |
| results without the need of resource bundles. For better results, consider using |
| <a href="#getCodeTitle(org.opengis.util.CodeList)"><code>getCodeTitle(CodeList)</code></a> instead. |
| |
| <p>The current heuristic implementation iterates over <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html#names()" title="class or interface in org.opengis.util" class="external-link">all code names</a>, |
| selects the longest one excluding the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html#name()" title="class or interface in org.opengis.util" class="external-link">field name</a> if possible, then |
| <a href="../CharSequences.html#camelCaseToSentence(java.lang.CharSequence)">makes a sentence</a> from that name.</p> |
| |
| <div class="note"><b>Examples:</b> |
| <ul> |
| <li><code>getCodeLabel(AxisDirection.NORTH)</code> returns <code>"North"</code>.</li> |
| <li><code>getCodeLabel(TopicCategory.INLAND_WATERS)</code> returns <code>"Inland waters"</code>.</li> |
| <li><code>getCodeLabel(ImagingCondition.BLURRED_IMAGE)</code> returns <code>"Blurred image"</code>.</li> |
| </ul> |
| </div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>code</code> - the code from which to get a title, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>a unlocalized title for the given code, or <code>null</code> if the given code is null.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getCodeName(org.opengis.util.CodeList)"><code>getCodeName(CodeList)</code></a></li> |
| <li><a href="#getCodeTitle(org.opengis.util.CodeList)"><code>getCodeTitle(CodeList)</code></a></li> |
| <li><a href="#getDescription(org.opengis.util.CodeList)"><code>getDescription(CodeList)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCodeTitle(org.opengis.util.CodeList)"> |
| <h3>getCodeTitle</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></span> <span class="element-name">getCodeTitle</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?> code)</span></div> |
| <div class="block">Returns the title of the given enumeration or code list value. Title are usually much shorter than descriptions. |
| English titles are often the same than the <a href="#getCodeLabel(org.opengis.util.CodeList)">code labels</a>. |
| |
| <p>The code or enumeration value given in argument to this method can be retrieved from the returned title |
| with the <a href="#forCodeTitle(java.lang.CharSequence)"><code>forCodeTitle(CharSequence)</code></a> method. See <cite>Substituting a free text by a code list</cite> |
| in this class javadoc for more information.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>code</code> - the code for which to get the title, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the title, or <code>null</code> if the given code is null.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getDescription(org.opengis.util.CodeList)"><code>getDescription(CodeList)</code></a></li> |
| <li><a href="#forCodeTitle(java.lang.CharSequence)"><code>forCodeTitle(CharSequence)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDescription(org.opengis.util.CodeList)"> |
| <h3>getDescription</h3> |
| <div class="member-signature"><span class="annotations"><a href="../OptionalCandidate.html" title="annotation interface in org.apache.sis.util">@OptionalCandidate</a> |
| </span><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></span> <span class="element-name">getDescription</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?> code)</span></div> |
| <div class="block">Returns the description of the given enumeration or code list value, or <code>null</code> if none. |
| For a description of the code list as a whole instead of a particular code, |
| see <a href="#getDescription(java.lang.Class)"><code>getDescription(Class)</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>code</code> - the code for which to get the localized description, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the description, or <code>null</code> if none or if the given code is null.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getCodeTitle(org.opengis.util.CodeList)"><code>getCodeTitle(CodeList)</code></a></li> |
| <li><a href="#getDescription(java.lang.Class)"><code>getDescription(Class)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDescription(java.lang.Class)"> |
| <h3>getDescription</h3> |
| <div class="member-signature"><span class="annotations"><a href="../OptionalCandidate.html" title="annotation interface in org.apache.sis.util">@OptionalCandidate</a> |
| </span><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></span> <span class="element-name">getDescription</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type)</span></div> |
| <div class="block">Returns a description for the given class, or <code>null</code> if none. |
| This method can be used for GeoAPI interfaces or <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link"><code>CodeList</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the GeoAPI interface or code list from which to get the description, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the description, or <code>null</code> if none or if the given type is <code>null</code>.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getDescription(org.opengis.util.CodeList)"><code>getDescription(CodeList)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDescription(java.lang.Class,java.lang.String)"> |
| <h3>getDescription</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></span> <span class="element-name">getDescription</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> 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> property)</span></div> |
| <div class="block">Returns a description for the given property, or <code>null</code> if none. |
| The given type shall be a GeoAPI interface, and the given property shall |
| be a UML identifier. If any of the input argument is <code>null</code>, then |
| this method returns <code>null</code>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the GeoAPI interface from which to get the description of a property, or <code>null</code>.</dd> |
| <dd><code>property</code> - the ISO name of the property for which to get the description, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the description, or <code>null</code> if none or if the given type or property name is <code>null</code>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCodeValues(java.lang.Class)"> |
| <h3>getCodeValues</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="type-parameters"><T extends <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?>></span> <span class="return-type">T[]</span> <span class="element-name">getCodeValues</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> codeType)</span></div> |
| <div class="block">Returns all known values for the given type of code list. |
| Note that the size of the returned array may growth between different invocations of this method, |
| since users can add their own codes to an existing list.</div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time type given as the <code>codeType</code> parameter.</dd> |
| <dt>Parameters:</dt> |
| <dd><code>codeType</code> - the type of code list.</dd> |
| <dt>Returns:</dt> |
| <dd>the list of values for the given code list, or an empty array if none.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html#getEnumConstants()" title="class or interface in java.lang" class="external-link"><code>Class.getEnumConstants()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="forStandardName(java.lang.String)"> |
| <h3>forStandardName</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><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><?></span> <span class="element-name">forStandardName</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> identifier)</span></div> |
| <div class="block">Returns the Java type (usually a GeoAPI interface) for the given ISO name, or <code>null</code> if none. |
| The identifier argument shall be the value documented in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/annotation/UML.html#identifier()" title="class or interface in org.opengis.annotation" class="external-link"><code>UML.identifier()</code></a> annotation on |
| the Java type. |
| |
| <div class="note"><b>Examples:</b> |
| <ul> |
| <li><code>forStandardName("CI_Citation")</code> returns <code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/citation/Citation.html" title="class or interface in org.opengis.metadata.citation" class="external-link">Citation</a>.class</code></li> |
| <li><code>forStandardName("CS_AxisDirection")</code> returns <code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html" title="class or interface in org.opengis.referencing.cs" class="external-link">AxisDirection</a>.class</code></li> |
| </ul> |
| </div> |
| |
| The package prefix (e.g. <code>"CI_"</code> in <code>"CI_Citation"</code>) can be omitted. |
| The flexibility is provided for allowing transition to newer ISO standards, |
| which are dropping the package prefixes. |
| For example, <code>"CS_AxisDirection"</code> in ISO 19111:2007 |
| has been renamed <code>"AxisDirection"</code> in ISO 19111:2018. |
| |
| <p>Only identifiers for the stable part of GeoAPI or for some Apache SIS classes are recognized. |
| This method does not handle the identifiers for interfaces in the <code>geoapi-pending</code> module.</p> |
| |
| <div class="note"><b>Future evolution:</b> |
| when a new ISO type does not yet have a corresponding GeoAPI interface, |
| this method may temporarily return an Apache SIS class instead, until a future version can use the interface. |
| For example, <code>forStandardName("CI_Individual")</code> returns |
| <code><a href="../../metadata/iso/citation/DefaultIndividual.html" title="class in org.apache.sis.metadata.iso.citation">DefaultIndividual</a>.class</code> in Apache SIS versions |
| that depend on GeoAPI 3.0, but the return type may be changed to <code>Individual.class</code> when Apache SIS will |
| be upgraded to GeoAPI 3.1.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>identifier</code> - the ISO <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/annotation/UML.html" title="class or interface in org.opengis.annotation" class="external-link">UML</a> identifier, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the GeoAPI interface, or <code>null</code> if the given identifier is <code>null</code> or unknown.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="forEnumName(java.lang.Class,java.lang.String)"> |
| <h3>forEnumName</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="type-parameters"><T extends <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Enum.html" title="class or interface in java.lang" class="external-link">Enum</a><T>></span> <span class="return-type">T</span> <span class="element-name">forEnumName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> enumType, |
| <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> name)</span></div> |
| <div class="block">Returns the enumeration value of the given type that matches the given name, or <code>null</code> if none. |
| This method is similar to the standard <code>Enum.valueOf(…)</code> method, except that this method is more |
| tolerant on string comparisons: |
| |
| <ul> |
| <li>Name comparisons are case-insensitive.</li> |
| <li>Only <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Character.html#isLetterOrDigit(int)" title="class or interface in java.lang" class="external-link">letter and digit</a> characters are compared. |
| Spaces and punctuation characters like <code>'_'</code> and <code>'-'</code> are ignored.</li> |
| </ul> |
| |
| If there is no match, this method returns <code>null</code> — it does not thrown an exception, |
| unless the given class is not an enumeration.</div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time type given as the <code>enumType</code> parameter.</dd> |
| <dt>Parameters:</dt> |
| <dd><code>enumType</code> - the type of enumeration.</dd> |
| <dd><code>name</code> - the name of the enumeration value to obtain, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>a value matching the given name, or <code>null</code> if the name is null |
| or if no matching enumeration is found.</dd> |
| <dt>Since:</dt> |
| <dd>0.5</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/Enum.html#valueOf(java.lang.Class,java.lang.String)" title="class or interface in java.lang" class="external-link"><code>Enum.valueOf(Class, String)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="forCodeName(java.lang.Class,java.lang.String,boolean)"> |
| <h3>forCodeName</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="type-parameters"><T extends <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><T>></span> <span class="return-type">T</span> <span class="element-name">forCodeName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> codeType, |
| <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> name, |
| boolean canCreate)</span></div> |
| <div class="block">Returns the code of the given type that matches the given name, or optionally returns a new one if none |
| match the name. This method performs the same work than the GeoAPI <code>CodeList.valueOf(…)</code> method, |
| except that this method is more tolerant on string comparisons when looking for an existing code: |
| |
| <ul> |
| <li>Name comparisons are case-insensitive.</li> |
| <li>Only <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Character.html#isLetterOrDigit(int)" title="class or interface in java.lang" class="external-link">letter and digit</a> characters are compared. |
| Spaces and punctuation characters like <code>'_'</code> and <code>'-'</code> are ignored.</li> |
| </ul> |
| |
| If no match is found, then a new code is created only if the <code>canCreate</code> argument is <code>true</code>. |
| Otherwise this method returns <code>null</code>.</div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time type given as the <code>codeType</code> parameter.</dd> |
| <dt>Parameters:</dt> |
| <dd><code>codeType</code> - the type of code list.</dd> |
| <dd><code>name</code> - the name of the code to obtain, or <code>null</code>.</dd> |
| <dd><code>canCreate</code> - <code>true</code> if this method is allowed to create new code.</dd> |
| <dt>Returns:</dt> |
| <dd>a code matching the given name, or <code>null</code> if the name is null |
| or if no matching code is found and <code>canCreate</code> is <code>false</code>.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="#getCodeName(org.opengis.util.CodeList)"><code>getCodeName(CodeList)</code></a></li> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html#valueOf(java.lang.Class,java.lang.String)" title="class or interface in org.opengis.util" class="external-link"><code>CodeList.valueOf(Class, String)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="forCodeTitle(java.lang.CharSequence)"> |
| <h3>forCodeTitle</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link">CodeList</a><?></span> <span class="element-name">forCodeTitle</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> title)</span></div> |
| <div class="block">Returns the code list or enumeration value for the given title, or <code>null</code> if none. |
| The current implementation performs the following choice: |
| |
| <ul> |
| <li>If the given title is a value returned by a previous call to <a href="#getCodeTitle(org.opengis.util.CodeList)"><code>getCodeTitle(CodeList)</code></a>, |
| returns the code or enumeration value used for creating that title.</li> |
| <li>Otherwise returns <code>null</code>.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>title</code> - the title for which to get a code or enumeration value, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the code or enumeration value associated with the given title, or <code>null</code>.</dd> |
| <dt>Since:</dt> |
| <dd>0.7</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#getCodeTitle(org.opengis.util.CodeList)"><code>getCodeTitle(CodeList)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toInternationalString(java.util.Map,java.lang.String)"> |
| <h3>toInternationalString</h3> |
| <div class="member-signature"><span class="annotations"><a href="../OptionalCandidate.html" title="annotation interface in org.apache.sis.util">@OptionalCandidate</a> |
| </span><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></span> <span class="element-name">toInternationalString</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</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>,<wbr>?> properties, |
| <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> prefix)</span> |
| throws <span class="exceptions"><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></span></div> |
| <div class="block">Returns an international string for the values in the given properties map, or <code>null</code> if none. |
| This method is used when a property in a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map</code></a> may have many localized variants. |
| For example, the given map may contains a <code>"remarks"</code> property defined by values associated to |
| the <code>"remarks_en"</code> and <code>"remarks_fr"</code> keys, for English and French locales respectively. |
| |
| <p>If the given map is <code>null</code>, then this method returns <code>null</code>. |
| Otherwise this method iterates over the entries having a key that starts with the specified prefix, |
| followed by the <code>'_'</code> character. For each such key:</p> |
| |
| <ul> |
| <li>If the key is exactly equals to <code>prefix</code>, selects <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html#ROOT" title="class or interface in java.util" class="external-link"><code>Locale.ROOT</code></a>.</li> |
| <li>Otherwise the characters after <code>'_'</code> are parsed as an ISO language and country code |
| by the <a href="../Locales.html#parse(java.lang.String,int)"><code>Locales.parse(String, int)</code></a> method. Note that 3-letters codes are replaced |
| by their 2-letters counterparts on a <cite>best effort</cite> basis.</li> |
| <li>The value for the decoded locale is added in the international string to be returned.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>properties</code> - the map from which to get the string values for an international string, or <code>null</code>.</dd> |
| <dd><code>prefix</code> - the prefix of keys to use for creating the international string.</dd> |
| <dt>Returns:</dt> |
| <dd>the international string, or <code>null</code> if the given map is null or does not contain values |
| associated to keys starting with the given prefix.</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 a key starts by the given prefix and: |
| <ul> |
| <li>The key suffix is an illegal <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"><code>Locale</code></a> code,</li> |
| <li>or the value associated to that key is a not a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link"><code>CharSequence</code></a>.</li> |
| </ul></dd> |
| <dt>Since:</dt> |
| <dd>0.4</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="../Locales.html#parse(java.lang.String,int)"><code>Locales.parse(String, int)</code></a></li> |
| <li><a href="../DefaultInternationalString.html#%3Cinit%3E(java.util.Map)"><code>DefaultInternationalString(Map)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toInternationalString(java.lang.CharSequence)"> |
| <h3>toInternationalString</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></span> <span class="element-name">toInternationalString</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> string)</span></div> |
| <div class="block">Returns the given characters sequence as an international string. If the given sequence is |
| null or an instance of <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString</code></a>, then this method returns it unchanged. |
| Otherwise, this method copies the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html#toString()" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString.toString()</code></a> value in a new |
| <a href="../SimpleInternationalString.html" title="class in org.apache.sis.util"><code>SimpleInternationalString</code></a> instance and returns it.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>string</code> - the characters sequence to convert, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the given sequence as an international string, or <code>null</code> if the given sequence was null.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="DefaultNameFactory.html#createInternationalString(java.util.Map)"><code>DefaultNameFactory.createInternationalString(Map)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toInternationalStrings(java.lang.CharSequence...)"> |
| <h3>toInternationalStrings</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a>[]</span> <span class="element-name">toInternationalStrings</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a>... strings)</span></div> |
| <div class="block">Returns the given array of <code>CharSequence</code>s as an array of <code>InternationalString</code>s. |
| If the given array is null or an instance of <code>InternationalString[]</code>, then this method |
| returns it unchanged. Otherwise a new array of type <code>InternationalString[]</code> is created |
| and every elements from the given array is copied or |
| <a href="#toInternationalString(java.lang.CharSequence)">casted</a> in the new array. |
| |
| <p>If a defensive copy of the <code>strings</code> array is wanted, then the caller needs to check |
| if the returned array is the same instance than the one given in argument to this method.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>strings</code> - the characters sequences to convert, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the given array as an array of type <code>InternationalString[]</code>, |
| or <code>null</code> if the given array was null.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toString(org.opengis.util.InternationalString,java.util.Locale)"> |
| <h3>toString</h3> |
| <div class="member-signature"><span class="modifiers">public static</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">toString</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a> i18n, |
| <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)</span></div> |
| <div class="block">Returns the given international string in the given locale, or <code>null</code> if the given string is null. |
| If the given locale is <code>null</code>, then the <code>i18n</code> default locale is used.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>i18n</code> - the international string to get as a localized string, or <code>null</code> if none.</dd> |
| <dd><code>locale</code> - the desired locale, or <code>null</code> for the <code>i18n</code> default locale.</dd> |
| <dt>Returns:</dt> |
| <dd>the localized string, or <code>null</code> if <code>i18n</code> is <code>null</code>.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</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> |