| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>MetadataStandard (Apache SIS 1.4 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="dc.created" content="2023-10-05"> |
| <meta name="description" content="declaration: module: org.apache.sis.metadata, package: org.apache.sis.metadata, class: MetadataStandard"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.metadata.MetadataStandard class"> |
| <meta name="keywords" content="ISO_19115"> |
| <meta name="keywords" content="ISO_19157"> |
| <meta name="keywords" content="ISO_19111"> |
| <meta name="keywords" content="ISO_19123"> |
| <meta name="keywords" content="forClass()"> |
| <meta name="keywords" content="getCitation()"> |
| <meta name="keywords" content="isMetadata()"> |
| <meta name="keywords" content="getInterface()"> |
| <meta name="keywords" content="getImplementation()"> |
| <meta name="keywords" content="asNameMap()"> |
| <meta name="keywords" content="asTypeMap()"> |
| <meta name="keywords" content="asInformationMap()"> |
| <meta name="keywords" content="asIndexMap()"> |
| <meta name="keywords" content="asValueMap()"> |
| <meta name="keywords" content="asTreeTable()"> |
| <meta name="keywords" content="equals()"> |
| <meta name="keywords" content="hashCode()"> |
| <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"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.6.1.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="../../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</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="module-label-in-type">Module</span> <a href="../../../../module-summary.html">org.apache.sis.metadata</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.metadata</a></div> |
| <h1 title="Class MetadataStandard" class="title">Class MetadataStandard</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| <div class="inheritance">MetadataStandard</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">MetadataStandard</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></span></div> |
| <div class="block">Enumeration of some metadata standards. A standard is defined by a set of Java interfaces |
| in a specific package or sub-packages. For example, the <a href="#ISO_19115">ISO 19115</a> |
| standard is defined by <a href="http://www.geoapi.org">GeoAPI</a> interfaces in the |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/package-summary.html" class="external-link"><code>org.opengis.metadata</code></a> package and sub-packages. |
| |
| <p>This class provides some methods operating on metadata instances through |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/package-summary.html" class="external-link">Java reflection</a>. The following rules are assumed:</p> |
| |
| <ul> |
| <li>Metadata properties are defined by the collection of following getter methods found |
| <strong>in the interface</strong>, ignoring implementation methods: |
| <ul> |
| <li><code>get*()</code> methods with arbitrary return type;</li> |
| <li>or <code>is*()</code> methods with boolean return type.</li> |
| </ul></li> |
| <li>All properties are <cite>readable</cite>.</li> |
| <li>A property is also <cite>writable</cite> if a <code>set*(…)</code> method is defined |
| <strong>in the implementation class</strong> for the corresponding getter method. |
| The setter method does not need to be defined in the interface.</li> |
| </ul> |
| |
| An instance of <code>MetadataStandard</code> is associated to every <a href="AbstractMetadata.html" title="class in org.apache.sis.metadata"><code>AbstractMetadata</code></a> objects. |
| The <code>AbstractMetadata</code> base class usually form the basis of ISO 19115 implementations but |
| can also be used for other standards. |
| |
| <h2 id="defining-new-metadatastandard-instances-heading">Defining new <code>MetadataStandard</code> instances</h2> |
| Users should use the predefined constants when applicable. |
| However if new instances need to be defined, then there is a choice: |
| |
| <ul> |
| <li>For <em>read-only</em> metadata, <code>MetadataStandard</code> can be instantiated directly. |
| Only getter methods will be used and all operations that modify the metadata properties |
| will throw an <a href="UnmodifiableMetadataException.html" title="class in org.apache.sis.metadata"><code>UnmodifiableMetadataException</code></a>.</li> |
| <li>For <em>read/write</em> metadata, the <a href="#getImplementation(java.lang.Class)"><code>getImplementation(Class)</code></a> |
| method must be overridden in a <code>MetadataStandard</code> subclass.</li> |
| </ul> |
| |
| <h2 id="thread-safety-heading">Thread safety</h2> |
| The same <code>MetadataStandard</code> instance can be safely used by many threads without synchronization |
| on the part of the caller. Subclasses shall make sure that any overridden methods remain safe to call |
| from multiple threads, because the same <code>MetadataStandard</code> instances are typically referenced |
| by a large amount of <a href="ModifiableMetadata.html" title="class in org.apache.sis.metadata"><code>ModifiableMetadata</code></a>.</div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.3</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="AbstractMetadata.html" title="class in org.apache.sis.metadata"><code>AbstractMetadata</code></a></li> |
| <li><a href="../../../../../serialized-form.html#org.apache.sis.metadata.MetadataStandard">Serialized Form</a></li> |
| </ul> |
| </dd> |
| </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>static final <a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#ISO_19111" class="member-name-link">ISO_19111</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">An instance working on ISO 19111 standard as defined by GeoAPI interfaces |
| in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/package-summary.html" class="external-link"><code>org.opengis.referencing</code></a> package and sub-packages.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>static final <a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#ISO_19115" class="member-name-link">ISO_19115</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">An instance working on ISO 19115 standard as defined by GeoAPI interfaces |
| in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/package-summary.html" class="external-link"><code>org.opengis.metadata</code></a> package and sub-packages, except <code>quality</code>.</div> |
| </div> |
| <div class="col-first even-row-color"><code>static final <a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#ISO_19123" class="member-name-link">ISO_19123</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">An instance working on ISO 19123 standard as defined by GeoAPI interfaces |
| in the <code>org.opengis.coverage</code> package and sub-packages.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>static final <a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#ISO_19157" class="member-name-link">ISO_19157</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">An instance working on ISO 19157 standard as defined by GeoAPI interfaces |
| in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/quality/package-summary.html" class="external-link"><code>org.opengis.metadata.quality</code></a> package.</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 two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.opengis.metadata.citation.Citation,java.lang.Package,org.apache.sis.metadata.MetadataStandard...)" class="member-name-link">MetadataStandard</a><wbr>(<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> citation, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Package.html" title="class or interface in java.lang" class="external-link">Package</a> interfacePackage, |
| <a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a>... dependencies)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new instance working on implementation of interfaces defined in the specified package.</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-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-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><wbr><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#asIndexMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy)" class="member-name-link">asIndexMap</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> keyPolicy)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns indices for all properties defined in the given metadata type.</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/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><wbr><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/ExtendedElementInformation.html" title="class or interface in org.opengis.metadata" class="external-link">ExtendedElementInformation</a>></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#asInformationMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy)" class="member-name-link">asInformationMap</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> keyPolicy)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns information about all properties defined in the given metadata type.</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/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><wbr><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/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="#asNameMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.KeyNamePolicy)" class="member-name-link">asNameMap</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> keyPolicy, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> valuePolicy)</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 names of all properties defined in the given metadata type.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/TreeTable.html" title="interface in org.apache.sis.util.collection">TreeTable</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#asTreeTable(java.lang.Object,java.lang.Class,org.apache.sis.metadata.ValueExistencePolicy)" class="member-name-link">asTreeTable</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> metadata, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> baseType, |
| <a href="ValueExistencePolicy.html" title="enum class in org.apache.sis.metadata">ValueExistencePolicy</a> valuePolicy)</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 specified metadata object as a tree table.</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/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><wbr><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/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 even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#asTypeMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.TypeValuePolicy)" class="member-name-link">asTypeMap</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> keyPolicy, |
| <a href="TypeValuePolicy.html" title="enum class in org.apache.sis.metadata">TypeValuePolicy</a> valuePolicy)</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 type of all properties, or their declaring type, defined in the given metadata type.</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/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><wbr><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/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 odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#asValueMap(java.lang.Object,java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.ValueExistencePolicy)" class="member-name-link">asValueMap</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> metadata, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> baseType, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> keyPolicy, |
| <a href="ValueExistencePolicy.html" title="enum class in org.apache.sis.metadata">ValueExistencePolicy</a> valuePolicy)</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 view of the specified metadata object as a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map</code></a>.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equals(java.lang.Object,java.lang.Object,org.apache.sis.util.ComparisonMode)" class="member-name-link">equals</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> metadata1, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> metadata2, |
| <a href="../../../../../org.apache.sis.util/org/apache/sis/util/ComparisonMode.html" title="enum class in org.apache.sis.util">ComparisonMode</a> mode)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Compares the two specified metadata objects.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#forClass(java.lang.Class)" class="member-name-link">forClass</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/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 odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the metadata standard for the given class.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/citation/Citation.html" title="class or interface in org.opengis.metadata.citation" class="external-link">Citation</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCitation()" class="member-name-link">getCitation</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a bibliographical reference to the international standard.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><T> <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr><? extends T></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getImplementation(java.lang.Class)" class="member-name-link">getImplementation</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type)</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 implementation class for the given interface, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><T> <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr><? super T></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getInterface(java.lang.Class)" class="member-name-link">getInterface</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type)</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 metadata interface implemented by the specified implementation class.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hashCode(java.lang.Object)" class="member-name-link">hashCode</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> metadata)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Computes a hash code for the specified metadata.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isMetadata(java.lang.Class)" class="member-name-link">isMetadata</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/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-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if the given type is assignable to a type from this standard or one of its dependencies.</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/11/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="#toString()" class="member-name-link">toString</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a string representation of this metadata standard.</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/11/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/11/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/11/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/11/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/11/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/11/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/11/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/11/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/11/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/11/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/11/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="ISO_19115"> |
| <h3>ISO_19115</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></span> <span class="element-name">ISO_19115</span></div> |
| <div class="block">An instance working on ISO 19115 standard as defined by GeoAPI interfaces |
| in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/package-summary.html" class="external-link"><code>org.opengis.metadata</code></a> package and sub-packages, except <code>quality</code>.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="ISO_19157"> |
| <h3>ISO_19157</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></span> <span class="element-name">ISO_19157</span></div> |
| <div class="block">An instance working on ISO 19157 standard as defined by GeoAPI interfaces |
| in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/quality/package-summary.html" class="external-link"><code>org.opengis.metadata.quality</code></a> package.</div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>1.3</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="ISO_19111"> |
| <h3>ISO_19111</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></span> <span class="element-name">ISO_19111</span></div> |
| <div class="block">An instance working on ISO 19111 standard as defined by GeoAPI interfaces |
| in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/package-summary.html" class="external-link"><code>org.opengis.referencing</code></a> package and sub-packages.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="ISO_19123"> |
| <h3>ISO_19123</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></span> <span class="element-name">ISO_19123</span></div> |
| <div class="block">An instance working on ISO 19123 standard as defined by GeoAPI interfaces |
| in the <code>org.opengis.coverage</code> package and sub-packages.</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>(org.opengis.metadata.citation.Citation,java.lang.Package,org.apache.sis.metadata.MetadataStandard...)"> |
| <h3>MetadataStandard</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">MetadataStandard</span><wbr><span class="parameters">(<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> citation, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Package.html" title="class or interface in java.lang" class="external-link">Package</a> interfacePackage, |
| <a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a>... dependencies)</span></div> |
| <div class="block">Creates a new instance working on implementation of interfaces defined in the specified package. |
| If this <code>MetadataStandard</code> does not support a given class, then the dependencies will be |
| tested in the order declared to this constructor. Consequently, if <a href="#isMetadata(java.lang.Class)"><code>isMetadata(Class)</code></a> may |
| return <code>true</code> for two or more dependencies, then the dependency which should have precedence |
| should be declared first. |
| |
| <h4 id="example-heading">Example</h4> |
| For the ISO 19157 standard reflected by GeoAPI interfaces, |
| <code>interfacePackage</code> shall be the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/quality/package-summary.html" class="external-link"><code>org.opengis.metadata.quality</code></a> package. |
| Its dependency is <a href="#ISO_19115"><code>ISO_19115</code></a> in the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/package-summary.html" class="external-link"><code>org.opengis.metadata</code></a> package.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>citation</code> - bibliographical reference to the international standard.</dd> |
| <dd><code>interfacePackage</code> - the root package for metadata interfaces.</dd> |
| <dd><code>dependencies</code> - the dependencies to other metadata standards.</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="forClass(java.lang.Class)"> |
| <h3>forClass</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></span> <span class="element-name">forClass</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/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 metadata standard for the given class. The argument given to this method can be |
| either an interface defined by the standard, or a class implementing such interface. If the |
| class implements more than one interface, then the first interface recognized by this method, |
| in declaration order, will be retained. |
| |
| <p>The current implementation recognizes only the standards defined by the public static |
| constants defined in this class. A future SIS version may recognize user-defined constants.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the metadata standard interface, or an implementation class.</dd> |
| <dt>Returns:</dt> |
| <dd>the metadata standard for the given type, or <code>null</code> if not found.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCitation()"> |
| <h3>getCitation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><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></span> <span class="element-name">getCitation</span>()</div> |
| <div class="block">Returns a bibliographical reference to the international standard. |
| The default implementation return the citation given at construction time.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>bibliographical reference to the international standard.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isMetadata(java.lang.Class)"> |
| <h3>isMetadata</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isMetadata</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/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 <code>true</code> if the given type is assignable to a type from this standard or one of its dependencies. |
| If this method returns <code>true</code>, then invoking <a href="#getInterface(java.lang.Class)"><code>getInterface(Class)</code></a> is guaranteed to succeed |
| without throwing an exception.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the implementation class (can be <code>null</code>).</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if the given class is an interface of this standard, |
| or implements an interface of this standard.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getInterface(java.lang.Class)"> |
| <h3>getInterface</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><T></span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><? super T></span> <span class="element-name">getInterface</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div> |
| <div class="block">Returns the metadata interface implemented by the specified implementation class. |
| If the given type is already an interface from this standard, then it is returned |
| unchanged. |
| |
| <div class="note"><b>Note:</b> |
| The word "interface" may be taken in a looser sense than the usual Java sense because |
| if the given type is defined in this standard package, then it is returned unchanged. |
| The standard package is usually made of interfaces and code lists only, but this is |
| not verified by this method.</div></div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time <code>type</code>.</dd> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the implementation class.</dd> |
| <dt>Returns:</dt> |
| <dd>the interface implemented by the given implementation class.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the specified implementation class does not implement an interface of this standard.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="AbstractMetadata.html#getInterface()"><code>AbstractMetadata.getInterface()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getImplementation(java.lang.Class)"> |
| <h3>getImplementation</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><T></span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><? extends T></span> <span class="element-name">getImplementation</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type)</span></div> |
| <div class="block">Returns the implementation class for the given interface, or <code>null</code> if none. |
| If non-null, the returned class must have a public no-argument constructor and the |
| metadata instance created by that constructor must be initially empty (no default value). |
| That no-argument constructor should never throw any checked exception. |
| |
| <p>The default implementation returns <code>null</code> in every cases. Subclasses shall |
| override this method in order to map GeoAPI interfaces to their implementation.</p></div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time <code>type</code>.</dd> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the interface, typically from the <code>org.opengis.metadata</code> package.</dd> |
| <dt>Returns:</dt> |
| <dd>the implementation class, or <code>null</code> if none.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="asNameMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.KeyNamePolicy)"> |
| <h3>asNameMap</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/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/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/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">asNameMap</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> keyPolicy, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> valuePolicy)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div> |
| <div class="block">Returns the names of all properties defined in the given metadata type. |
| The property names appears both as keys and as values, but may be written differently. |
| The names may be <a href="KeyNamePolicy.html#UML_IDENTIFIER">standard identifiers</a> (e.g. |
| as defined by ISO 19115), <a href="KeyNamePolicy.html#JAVABEANS_PROPERTY">JavaBeans names</a>, |
| <a href="KeyNamePolicy.html#METHOD_NAME">method names</a> or <a href="KeyNamePolicy.html#SENTENCE">sentences</a> (usually in English). |
| |
| <h4 id="example-heading1">Example</h4> |
| The following code prints <code>"alternateTitle<u>s</u>"</code> (note the plural): |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">MetadataStandard standard = MetadataStandard.ISO_19115; |
| Map<String, String> names = standard.asNameMap(Citation.class, UML_IDENTIFIER, JAVABEANS_PROPERTY); |
| String value = names.get("alternateTitle"); |
| System.out.println(value); // alternateTitles |
| </code></pre> |
| </div> |
| |
| |
| The <code>keyPolicy</code> argument specify only the string representation of keys returned by the iterators. |
| No matter the key name policy, the <code>key</code> argument given to any <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map</code></a> method can be any of the |
| above-cited forms of property names.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the interface or implementation class of a metadata.</dd> |
| <dd><code>keyPolicy</code> - determines the string representation of map keys.</dd> |
| <dd><code>valuePolicy</code> - determines the string representation of map values.</dd> |
| <dt>Returns:</dt> |
| <dd>the names of all properties defined by the given metadata type.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the specified interface or implementation class does |
| not extend or implement a metadata interface of the expected package.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="asTypeMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.TypeValuePolicy)"> |
| <h3>asTypeMap</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/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/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/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">asTypeMap</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> keyPolicy, |
| <a href="TypeValuePolicy.html" title="enum class in org.apache.sis.metadata">TypeValuePolicy</a> valuePolicy)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div> |
| <div class="block">Returns the type of all properties, or their declaring type, defined in the given metadata type. |
| The keys in the returned map are the same than the keys in the above <a href="#asNameMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.KeyNamePolicy)">name map</a>. |
| The values are determined by the <code>valuePolicy</code> argument, which can be |
| <a href="TypeValuePolicy.html#ELEMENT_TYPE">element type</a> or the |
| <a href="TypeValuePolicy.html#DECLARING_INTERFACE">declaring interface</a> among others. |
| |
| <h4 id="example-heading2">Example</h4> |
| the following code prints 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> class name: |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">MetadataStandard standard = MetadataStandard.ISO_19115; |
| Map<String,Class<?>> types = standard.asTypeMap(Citation.class, UML_IDENTIFIER, ELEMENT_TYPE); |
| Class<?> value = types.get("alternateTitle"); |
| System.out.println(value); // class org.opengis.util.InternationalString |
| </code></pre> |
| </div> |
| </div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the interface or implementation class of a metadata.</dd> |
| <dd><code>keyPolicy</code> - determines the string representation of map keys.</dd> |
| <dd><code>valuePolicy</code> - whether the values shall be property types, the element types |
| (same as property types except for collections) or the declaring interface or class.</dd> |
| <dt>Returns:</dt> |
| <dd>the types or declaring type of all properties defined in the given metadata type.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the specified interface or implementation class does |
| not extend or implement a metadata interface of the expected package.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="asInformationMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy)"> |
| <h3>asInformationMap</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/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/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/ExtendedElementInformation.html" title="class or interface in org.opengis.metadata" class="external-link">ExtendedElementInformation</a>></span> <span class="element-name">asInformationMap</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> keyPolicy)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div> |
| <div class="block">Returns information about all properties defined in the given metadata type. |
| The keys in the returned map are the same than the keys in the above |
| <a href="#asNameMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.KeyNamePolicy)">name map</a>. The values contain information inferred from |
| the ISO names, the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/annotation/Obligation.html" title="class or interface in org.opengis.annotation" class="external-link"><code>Obligation</code></a> enumeration and the |
| <a href="../../../../../org.apache.sis.util/org/apache/sis/measure/ValueRange.html" title="annotation interface in org.apache.sis.measure"><code>ValueRange</code></a> annotations. |
| |
| <p>In the particular case of Apache SIS implementation, all values in the information map |
| additionally implement the following interfaces:</p> |
| <ul> |
| <li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/ReferenceIdentifier.html" title="class or interface in org.opengis.referencing" class="external-link"><code>ReferenceIdentifier</code></a> with the following properties: |
| <ul> |
| <li>The <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Identifier.html#getAuthority()" title="class or interface in org.opengis.metadata" class="external-link">authority</a> is this metadata standard <a href="#getCitation()">citation</a>.</li> |
| <li>The <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/ReferenceIdentifier.html#getCodeSpace()" title="class or interface in org.opengis.referencing" class="external-link">codespace</a> is the standard name of the interface that contain the property.</li> |
| <li>The <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Identifier.html#getCode()" title="class or interface in org.opengis.metadata" class="external-link">code</a> is the standard name of the property.</li> |
| </ul> |
| </li> |
| <li><a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/CheckedContainer.html" title="interface in org.apache.sis.util.collection"><code>CheckedContainer</code></a> with the following properties: |
| <ul> |
| <li>The <a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/CheckedContainer.html#getElementType()">element type</a> is the type of property values |
| as defined by <a href="TypeValuePolicy.html#ELEMENT_TYPE"><code>TypeValuePolicy.ELEMENT_TYPE</code></a>.</li> |
| </ul> |
| </li> |
| </ul> |
| |
| <div class="note"><b>Note:</b> |
| the rational for implementing <code>CheckedContainer</code> is to consider each <code>ExtendedElementInformation</code> |
| instance as the set of all possible values for the property. If the information had a <code>contains(E)</code> method, |
| it would return <code>true</code> if the given value is valid for that property.</div> |
| |
| In addition, for each map entry the value returned by <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/ExtendedElementInformation.html#getDomainValue()" title="class or interface in org.opengis.metadata" class="external-link"><code>ExtendedElementInformation.getDomainValue()</code></a> |
| may optionally be an instance of any of the following classes: |
| |
| <ul> |
| <li><a href="../../../../../org.apache.sis.util/org/apache/sis/measure/NumberRange.html" title="class in org.apache.sis.measure"><code>NumberRange</code></a> if the valid values are constrained to some specific range.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the metadata interface or implementation class.</dd> |
| <dd><code>keyPolicy</code> - determines the string representation of map keys.</dd> |
| <dt>Returns:</dt> |
| <dd>information about all properties defined in the given metadata type.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the given type does not implement a metadata interface of the expected package.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="iso/DefaultExtendedElementInformation.html" title="class in org.apache.sis.metadata.iso"><code>DefaultExtendedElementInformation</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="asIndexMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy)"> |
| <h3>asIndexMap</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/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/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>></span> <span class="element-name">asIndexMap</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> type, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> keyPolicy)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div> |
| <div class="block">Returns indices for all properties defined in the given metadata type. |
| The keys in the returned map are the same than the keys in the above <a href="#asNameMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.KeyNamePolicy)">name map</a>. |
| The values are arbitrary indices numbered from 0 inclusive to <var>n</var> exclusive, where <var>n</var> |
| is the number of properties declared in the given metadata type. |
| |
| <p>Property indices may be used as an alternative to property names by some applications doing their own storage. |
| Such index usages are fine for temporary storage during the Java Virtual Machine lifetime, but indices should not |
| be used in permanent storage. The indices are stable as long as the metadata implementation does not change, |
| but may change when the implementation is upgraded to a newer version.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the interface or implementation class of a metadata.</dd> |
| <dd><code>keyPolicy</code> - determines the string representation of map keys.</dd> |
| <dt>Returns:</dt> |
| <dd>indices of all properties defined by the given metadata type.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the specified interface or implementation class does |
| not extend or implement a metadata interface of the expected package.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="asValueMap(java.lang.Object,java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.ValueExistencePolicy)"> |
| <h3>asValueMap</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/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/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/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">asValueMap</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> metadata, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> baseType, |
| <a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a> keyPolicy, |
| <a href="ValueExistencePolicy.html" title="enum class in org.apache.sis.metadata">ValueExistencePolicy</a> valuePolicy)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div> |
| <div class="block">Returns a view of the specified metadata object as a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map</code></a>. |
| The map is backed by the metadata object using Java reflection, so changes in the |
| underlying metadata object are immediately reflected in the map and conversely. |
| |
| <p>The map content is determined by the arguments: <code>metadata</code> determines the set of |
| keys, <code>keyPolicy</code> determines their <code>String</code> representations of those keys and |
| <code>valuePolicy</code> determines whether entries having a null value or an empty collection |
| shall be included in the map.</p> |
| |
| <h4 id="supported-operations-heading">Supported operations</h4> |
| The map supports the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html#put(K,V)" title="class or interface in java.util" class="external-link"><code>put(…)</code></a> and <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html#remove(java.lang.Object)" title="class or interface in java.util" class="external-link"><code>remove(…)</code></a> operations if the underlying metadata object contains setter methods. |
| The <code>remove(…)</code> method is implemented by a call to <code>put(…, null)</code>. |
| Note that whether the entry appears as effectively removed from the map or just cleared |
| (i.e. associated to a null value) depends on the <code>valuePolicy</code> argument. |
| |
| <h4 id="keys-and-values-heading">Keys and values</h4> |
| The keys are case-insensitive and can be either the JavaBeans property name, the getter method name |
| or 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">UML identifier</a>. The value given to a call |
| to the <code>put(…)</code> method shall be an instance of the type expected by the corresponding setter method, |
| or an instance of a type <a href="../../../../../org.apache.sis.util/org/apache/sis/util/ObjectConverters.html#find(java.lang.Class,java.lang.Class)">convertible</a> |
| to the expected type. |
| |
| <h4 id="multi-values-entries-heading">Multi-values entries</h4> |
| Calls to <code>put(…)</code> replace the previous value, with one noticeable exception: if the metadata |
| property associated to the given key is a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link"><code>Collection</code></a> but the given value is a single |
| element (not a collection), then the given value is <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#add(E)" title="class or interface in java.util" class="external-link">added</a> |
| to the existing collection. In other words, the returned map behaves as a <cite>multi-values map</cite> |
| for the properties that allow multiple values. If the intent is to unconditionally discard all previous |
| values, then make sure that the given value is a collection when the associated metadata property expects |
| such collection. |
| |
| <h4 id="disambiguating-instances-that-implement-more-than-one-metadata-interface-heading">Disambiguating instances that implement more than one metadata interface</h4> |
| It is some time convenient to implement more than one interface by the same class. |
| For example, an implementation interested only in extents defined by geographic bounding boxes could implement |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/Extent.html" title="class or interface in org.opengis.metadata.extent" class="external-link"><code>Extent</code></a> and <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/extent/GeographicBoundingBox.html" title="class or interface in org.opengis.metadata.extent" class="external-link"><code>GeographicBoundingBox</code></a> |
| by the same class. In such case, it is necessary to tell to this method which one of those two interfaces |
| shall be reflected in the returned map. This information can be provided by the <code>baseType</code> argument. |
| That argument needs to be non-null only in situations where an ambiguity can arise; <code>baseType</code> can be null |
| if the given metadata implements only one interface recognized by this <code>MetadataStandard</code> instance.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>metadata</code> - the metadata object to view as a map.</dd> |
| <dd><code>baseType</code> - base type of the metadata of interest, or <code>null</code> if unspecified.</dd> |
| <dd><code>keyPolicy</code> - determines the string representation of map keys.</dd> |
| <dd><code>valuePolicy</code> - whether the entries having null value or empty collection shall be included in the map.</dd> |
| <dt>Returns:</dt> |
| <dd>a map view over the metadata object.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the metadata object does not implement a metadata interface of the expected package.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="AbstractMetadata.html#asMap()"><code>AbstractMetadata.asMap()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="asTreeTable(java.lang.Object,java.lang.Class,org.apache.sis.metadata.ValueExistencePolicy)"> |
| <h3>asTreeTable</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/TreeTable.html" title="interface in org.apache.sis.util.collection">TreeTable</a></span> <span class="element-name">asTreeTable</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> metadata, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><?> baseType, |
| <a href="ValueExistencePolicy.html" title="enum class in org.apache.sis.metadata">ValueExistencePolicy</a> valuePolicy)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div> |
| <div class="block">Returns the specified metadata object as a tree table. |
| The tree table is backed by the metadata object using Java reflection, so changes in the |
| underlying metadata object are immediately reflected in the tree table and conversely. |
| |
| <p>The returned <code>TreeTable</code> instance contains the following columns:</p> |
| <ul class="verbose"> |
| <li><a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/TableColumn.html#IDENTIFIER"><code>TableColumn.IDENTIFIER</code></a><br> |
| 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">UML identifier</a> if any, |
| or the Java Beans property name otherwise, of a metadata property. For example |
| in a tree table view of <a href="iso/citation/DefaultCitation.html" title="class in org.apache.sis.metadata.iso.citation"><code>DefaultCitation</code></a>, |
| there is a node having the <code>"title"</code> identifier.</li> |
| |
| <li><a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/TableColumn.html#INDEX"><code>TableColumn.INDEX</code></a><br> |
| If the metadata property is a collection, then the zero-based index of the element in that collection. |
| Otherwise <code>null</code>. For example, in a tree table view of <code>DefaultCitation</code>, if the |
| <code>"alternateTitle"</code> collection contains two elements, then there is a node with index 0 |
| for the first element and another node with index 1 for the second element. |
| |
| <div class="note"><b>Note:</b> |
| The <code>(IDENTIFIER, INDEX)</code> pair can be used as a primary key for uniquely identifying a node |
| in a list of children. That uniqueness is guaranteed only for the children of a given node; |
| the same keys may appear in the children of any other nodes.</div></li> |
| |
| <li><a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/TableColumn.html#NAME"><code>TableColumn.NAME</code></a><br> |
| A human-readable name for the node, derived from the identifier and the index. |
| This is the column shown in the default <a href="#toString()"><code>toString()</code></a> implementation and |
| may be localizable.</li> |
| |
| <li><a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/TableColumn.html#TYPE"><code>TableColumn.TYPE</code></a><br> |
| The base type of the value (usually an interface).</li> |
| |
| <li><a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/TableColumn.html#VALUE"><code>TableColumn.VALUE</code></a><br> |
| The metadata value for the node. Values in this column are writable if the underlying |
| metadata class have a setter method for the property represented by the node.</li> |
| |
| <li><a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/TableColumn.html#REMARKS"><code>TableColumn.REMARKS</code></a><br> |
| Remarks or warning on the property value. This is rarely present. |
| It is provided when the value may look surprising, for example the longitude values |
| in a geographic bounding box crossing the anti-meridian.</li> |
| </ul> |
| |
| <h4 id="write-operations-heading">Write operations</h4> |
| Only the <code>VALUE</code> column may be writable, with one exception: newly created children need |
| to have their <code>IDENTIFIER</code> set before any other operation. For example, the following code |
| adds a title to a citation: |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">TreeTable.Node node = ...; // The node for a DefaultCitation. |
| TreeTable.Node child = node.newChild(); |
| child.setValue(TableColumn.IDENTIFIER, "title"); |
| child.setValue(TableColumn.VALUE, "Le petit prince"); |
| // Nothing else to do - the child node has been added. |
| </code></pre> |
| </div> |
| |
| |
| Nodes can be removed by invoking the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Iterator.html#remove()" title="class or interface in java.util" class="external-link"><code>Iterator.remove()</code></a> method on the |
| <a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/TreeTable.Node.html#getChildren()">children</a> iterator. |
| Note that whether the child appears as effectively removed from the node or just cleared |
| (i.e. associated to a null value) depends on the <code>valuePolicy</code> argument. |
| |
| <h4 id="disambiguating-instances-that-implement-more-than-one-metadata-interface-heading1">Disambiguating instances that implement more than one metadata interface</h4> |
| If the given <code>metadata</code> instance implements more than one interface recognized by this |
| <code>MetadataStandard</code>, then the <code>baseType</code> argument need to be non-null in order to |
| specify which interface to reflect in the tree.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>metadata</code> - the metadata object to view as a tree table.</dd> |
| <dd><code>baseType</code> - base type of the metadata of interest, or <code>null</code> if unspecified.</dd> |
| <dd><code>valuePolicy</code> - whether the property having null value or empty collection shall be included in the tree.</dd> |
| <dt>Returns:</dt> |
| <dd>a tree table representation of the specified metadata.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the metadata object does not implement a metadata interface of the expected package.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="AbstractMetadata.html#asTreeTable()"><code>AbstractMetadata.asTreeTable()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="equals(java.lang.Object,java.lang.Object,org.apache.sis.util.ComparisonMode)"> |
| <h3>equals</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">equals</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> metadata1, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> metadata2, |
| <a href="../../../../../org.apache.sis.util/org/apache/sis/util/ComparisonMode.html" title="enum class in org.apache.sis.util">ComparisonMode</a> mode)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div> |
| <div class="block">Compares the two specified metadata objects. |
| The two metadata arguments shall be implementations of a metadata interface defined by |
| this <code>MetadataStandard</code>, otherwise an exception will be thrown. However, the two |
| arguments do not need to be the same implementation class. |
| |
| <h4 id="shallow-or-deep-comparisons-heading">Shallow or deep comparisons</h4> |
| This method implements a <em>shallow</em> comparison in that properties are compared by |
| invoking their <code>properties.equals(…)</code> method without <em>explicit</em> recursive call |
| to this <code>standard.equals(…)</code> method for children metadata. However, the comparison will |
| do <em>implicit</em> recursive calls if the <code>properties.equals(…)</code> implementations |
| delegate their work to this <code>standard.equals(…)</code> method, as <a href="AbstractMetadata.html" title="class in org.apache.sis.metadata"><code>AbstractMetadata</code></a> does. |
| In the latter case, the final result is a deep comparison.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>metadata1</code> - the first metadata object to compare.</dd> |
| <dd><code>metadata2</code> - the second metadata object to compare.</dd> |
| <dd><code>mode</code> - the strictness level of the comparison.</dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if the given metadata objects are equals.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if at least one metadata object does not |
| implement a metadata interface of the expected package.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="AbstractMetadata.html#equals(java.lang.Object,org.apache.sis.util.ComparisonMode)"><code>AbstractMetadata.equals(Object, ComparisonMode)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="hashCode(java.lang.Object)"> |
| <h3>hashCode</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">hashCode</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> metadata)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div> |
| <div class="block">Computes a hash code for the specified metadata. The hash code is defined as the sum |
| of hash code values of all non-empty properties, plus the hash code of the interface. |
| This is a similar contract than <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#hashCode()" title="class or interface in java.util" class="external-link"><code>Set.hashCode()</code></a> (except for the interface) |
| and ensures that the hash code value is insensitive to the ordering of properties.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>metadata</code> - the metadata object to compute hash code.</dd> |
| <dt>Returns:</dt> |
| <dd>a hash code value for the specified metadata, or 0 if the given metadata is null.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the metadata object does not implement a metadata interface of the expected package.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="AbstractMetadata.html#hashCode()"><code>AbstractMetadata.hashCode()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toString()"> |
| <h3>toString</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/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>()</div> |
| <div class="block">Returns a string representation of this metadata standard. |
| This is for debugging purpose only and may change in any future version.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a></code> in class <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |