| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>org.apache.sis.metadata (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"> |
| <meta name="generator" content="javadoc/PackageWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.metadata package"> |
| <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="package-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 class="nav-bar-cell1-rev">Package</li> |
| <li>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#package">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Package:</p> |
| <ul> |
| <li><a href="#package-description">Description</a></li> |
| <li><a href="#related-package-summary">Related Packages</a></li> |
| <li><a href="#class-summary">Classes and Interfaces</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Package: </li> |
| <li><a href="#package-description">Description</a> | </li> |
| <li><a href="#related-package-summary">Related Packages</a> | </li> |
| <li><a href="#class-summary">Classes and Interfaces</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"> |
| <div class="header"> |
| <div class="sub-title"><span class="module-label-in-package">Module</span> <a href="../../../../module-summary.html">org.apache.sis.metadata</a></div> |
| <h1 title="Package org.apache.sis.metadata" class="title">Package org.apache.sis.metadata</h1> |
| </div> |
| <hr> |
| <div class="package-signature">package <span class="element-name">org.apache.sis.metadata</span></div> |
| <section class="package-description" id="package-description"> |
| <div class="block">Root package for various metadata implementations. |
| |
| <h2 id="foreword-heading">Foreword</h2> |
| Many metadata standards exist, including <cite>Dublin core</cite>, <cite>ISO 19115</cite> and the Image I/O |
| metadata defined in <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/package-summary.html" class="external-link"><code>javax.imageio.metadata</code></a>. The SIS implementation focuses on ISO 19115 (including |
| its ISO 19115-2 extension), but the classes are designed in a way that allow the usage of different standards. |
| This genericity goal should be keep in mind in the discussion below. |
| |
| <h2 id="how-metadata-are-defined-heading">How Metadata are defined</h2> |
| A metadata standard is defined by a set of Java interfaces belonging to a specific package and its sub-packages. |
| For example, the ISO 19115 standard is defined by the <a href="http://www.geoapi.org">GeoAPI</a> interfaces |
| defined 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. That standard is identified in SIS by the |
| <a href="MetadataStandard.html#ISO_19115"><code>MetadataStandard.ISO_19115</code></a> constant. Other standards are defined as well, |
| for example the <a href="MetadataStandard.html#ISO_19123"><code>MetadataStandard.ISO_19123</code></a> constant stands for the standards |
| defined by the interfaces in the <code>org.opengis.coverage</code> package and sub-packages. |
| |
| <p>For each interface, the collection of declared getter methods defines its <cite>properties</cite> |
| (or <cite>attributes</cite>). If a <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 is attached to the getter method, |
| the identifier declared in that annotation is taken as the property name. This is typically the name defined by the |
| International Standard from which the interface is derived. Otherwise (if there is no <code>UML</code> annotation) |
| the property name is inferred from the method name like what the <cite>Java Beans</cite> framework does.</p> |
| |
| <p>The implementation classes, if they exist, are defined in different packages than the interfaces. |
| For example, the ISO 19115 interfaces, declared in <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>, are implemented by |
| SIS in <a href="iso/package-summary.html"><code>org.apache.sis.metadata.iso</code></a>. The sub-packages hierarchy is the same, and the names |
| of implementation classes are the name of the implemented interfaces prefixed with <code>Abstract</code> |
| or <code>Default</code>.</p> |
| |
| <h3 id="notes-heading">Notes</h3> |
| <ul class="verbose"> |
| <li>The <code>Abstract</code> prefix means that the class is abstract in the sense of the implemented standard. |
| It it not necessarily abstract in the sense of Java. Because incomplete metadata are common in practice, |
| sometimes we wish to instantiate an "abstract" class despite the lack of knowledge about the exact sub-type.</li> |
| <li>The properties are determined by the getter methods declared in the interfaces. |
| Getter methods declared in the implementation classes are ignored.</li> |
| <li>Setter methods, if any, can be declared in the implementation classes without the need for declarations |
| in the interfaces. In other words, interfaces are assumed read-only unless a specific implementation provide |
| setter methods.</li> |
| <li>The implementation is not required to exist as source code. They can be generated on the fly with |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/Proxy.html" title="class or interface in java.lang.reflect" class="external-link"><code>Proxy</code></a>. This is the approach taken by the <a href="sql/package-summary.html"><code>org.apache.sis.metadata.sql</code></a> |
| package for generating metadata implementations backed by the content of a database.</li> |
| </ul> |
| |
| <h2 id="how-metadata-are-handled-heading">How Metadata are handled</h2> |
| Metadata objects in SIS are mostly containers: they provide getter and setter methods for manipulating the values |
| associated to properties (for example the <code>title</code> property of a <code>Citation</code> object), but provide few logic. |
| The package <a href="iso/package-summary.html"><code>org.apache.sis.metadata.iso</code></a> and its sub-packages are the main examples of such containers. |
| |
| <p>In addition, the metadata modules provide support methods for handling the metadata objects through Java Reflection. |
| This is an approach similar to <cite>Java Beans</cite>, in that users are encouraged to use directly the API of |
| <cite>Plain Old Java</cite> objects (actually interfaces) every time their type is known at compile time, |
| and fallback on the reflection technic when the type is known only at runtime.</p> |
| |
| <p>Using Java reflection, a metadata can be viewed in many different ways:</p> |
| <ul class="verbose"> |
| <li><b>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></b><br> |
| The <a href="MetadataStandard.html" title="class in org.apache.sis.metadata"><code>MetadataStandard</code></a> class provides various methods returning a view |
| of an arbitrary metadata implementation as a <code>Map</code>, where the key are the property names and the |
| values are the return values, types or descriptions of getter methods. The map is writable if the |
| underlying metadata implementation has setter methods, otherwise attempts to set a value throw an |
| <code>UnmodifiableMetadataException</code>.</li> |
| |
| <li><b>As a <a href="../../../../../org.apache.sis.util/org/apache/sis/util/collection/TreeTable.html" title="interface in org.apache.sis.util.collection"><code>TreeTable</code></a></b><br> |
| The metadata are organized as a tree. For example, the <code>Citation</code> metadata contains one or many |
| <code>ResponsibleParty</code> elements, each of them containing a <code>Contact</code> element, which contains |
| a <code>Telephone</code> element, <i>etc</i>. For each node, there is many information that can be displayed |
| in columns: |
| <ul> |
| <li>A description of the element.</li> |
| <li>The type of values (<code>String</code>, <code>double</code>, <i>etc</i>).</li> |
| <li>The range of valid values (if the type is numeric), |
| or an enumeration of valid values (if the type is a code list).</li> |
| <li>The value stored in the element, or the default value.</li> |
| </ul></li> |
| |
| <li><b>As a table record in a database (using <a href="sql/package-summary.html"><code>org.apache.sis.metadata.sql</code></a>)</b><br> |
| It is possible to establish the following mapping between metadata and a SQL database: |
| <ul> |
| <li>Each metadata interface maps to a table of the same name in the database.</li> |
| <li>Each property in the above interface maps to a column of the same name in the above table.</li> |
| <li>Each instance of the above interface is a record in the above table.</li> |
| </ul> |
| Using Java reflection, it is possible to generate implementations of the metadata interfaces |
| where each call to a getter method is translated into a SQL query for the above database.</li> |
| </ul> |
| |
| <h2 id="how-metadata-are-marshalled-heading">How Metadata are marshalled</h2> |
| The ISO 19115-3 standard defines how ISO 19115-1 metadata shall be represented in XML. |
| The SIS library supports XML marshalling and unmarshalling with JAXB annotations. |
| |
| <p>Only the implementation classes defined in the <a href="iso/package-summary.html"><code>org.apache.sis.metadata.iso</code></a> packages and sub-packages |
| are annotated for JAXB marshalling. If a metadata is implemented by another package (for example |
| <a href="sql/package-summary.html"><code>org.apache.sis.metadata.sql</code></a>), then it shall be converted to an annotated class before to be marshalled. |
| All SIS annotated classes provide a copy constructor for this purpose. A shallow copy is sufficient; |
| JAXB adapters will convert the elements on-the-fly when needed.</p> |
| |
| <p>The annotated classes can be given to a JAXB <code>Marshaller</code>. For best results, it shall be a marshaller |
| obtained from the <a href="../xml/MarshallerPool.html" title="class in org.apache.sis.xml"><code>MarshallerPool</code></a>, otherwise some XML outputs may be incomplete |
| (missing namespaces for instance). The <a href="../xml/XML.html" title="class in org.apache.sis.xml"><code>XML</code></a> class provides convenience methods |
| for this purpose.</p></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.3</dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <li> |
| <div id="related-package-summary"> |
| <div class="caption"><span>Related Packages</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Package</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><a href="iso/package-summary.html">org.apache.sis.metadata.iso</a></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Root package for ISO 19115 metadata about resources (data or services).</div> |
| </div> |
| <div class="col-first odd-row-color"><a href="sql/package-summary.html">org.apache.sis.metadata.sql</a></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">An implementation of <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Metadata.html" title="class or interface in org.opengis.metadata" class="external-link">Metadata</a> interfaces |
| fetching the data from an SQL database.</div> |
| </div> |
| </div> |
| </div> |
| </li> |
| <li> |
| <div id="class-summary"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="class-summary-tab0" role="tab" aria-selected="true" aria-controls="class-summary.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary', 2)" class="active-table-tab">All Classes and Interfaces</button><button id="class-summary-tab2" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab2', 2)" class="table-tab">Classes</button><button id="class-summary-tab3" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab3', 2)" class="table-tab">Enum Classes</button><button id="class-summary-tab5" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab5', 2)" class="table-tab">Exception Classes</button><button id="class-summary-tab6" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab6', 2)" class="table-tab">Annotation Interfaces</button></div> |
| <div id="class-summary.tabpanel" role="tabpanel"> |
| <div class="summary-table two-column-summary" aria-labelledby="class-summary-tab0"> |
| <div class="table-header col-first">Class</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color class-summary class-summary-tab2"><a href="AbstractMetadata.html" title="class in org.apache.sis.metadata">AbstractMetadata</a></div> |
| <div class="col-last even-row-color class-summary class-summary-tab2"> |
| <div class="block">Provides basic operations using Java reflection for metadata implementations.</div> |
| </div> |
| <div class="col-first odd-row-color class-summary class-summary-tab5"><a href="InvalidMetadataException.html" title="class in org.apache.sis.metadata">InvalidMetadataException</a></div> |
| <div class="col-last odd-row-color class-summary class-summary-tab5"> |
| <div class="block">Thrown when a metadata is in a invalid state or has illegal property values.</div> |
| </div> |
| <div class="col-first even-row-color class-summary class-summary-tab3"><a href="KeyNamePolicy.html" title="enum class in org.apache.sis.metadata">KeyNamePolicy</a></div> |
| <div class="col-last even-row-color class-summary class-summary-tab3"> |
| <div class="block">The name of the keys included in 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> of metadata.</div> |
| </div> |
| <div class="col-first odd-row-color class-summary class-summary-tab2"><a href="MetadataCopier.html" title="class in org.apache.sis.metadata">MetadataCopier</a></div> |
| <div class="col-last odd-row-color class-summary class-summary-tab2"> |
| <div class="block">Performs deep copies of given metadata instances.</div> |
| </div> |
| <div class="col-first even-row-color class-summary class-summary-tab2"><a href="MetadataStandard.html" title="class in org.apache.sis.metadata">MetadataStandard</a></div> |
| <div class="col-last even-row-color class-summary class-summary-tab2"> |
| <div class="block">Enumeration of some metadata standards.</div> |
| </div> |
| <div class="col-first odd-row-color class-summary class-summary-tab2"><a href="ModifiableMetadata.html" title="class in org.apache.sis.metadata">ModifiableMetadata</a></div> |
| <div class="col-last odd-row-color class-summary class-summary-tab2"> |
| <div class="block">Base class of metadata having an editable content.</div> |
| </div> |
| <div class="col-first even-row-color class-summary class-summary-tab3"><a href="ModifiableMetadata.State.html" title="enum class in org.apache.sis.metadata">ModifiableMetadata.State</a></div> |
| <div class="col-last even-row-color class-summary class-summary-tab3"> |
| <div class="block">Whether the metadata is still editable or has been made final.</div> |
| </div> |
| <div class="col-first odd-row-color class-summary class-summary-tab6"><a href="TitleProperty.html" title="annotation interface in org.apache.sis.metadata">TitleProperty</a></div> |
| <div class="col-last odd-row-color class-summary class-summary-tab6"> |
| <div class="block">Identifies the name of a property to use for summarizing in one line the content of a metadata object.</div> |
| </div> |
| <div class="col-first even-row-color class-summary class-summary-tab3"><a href="TypeValuePolicy.html" title="enum class in org.apache.sis.metadata">TypeValuePolicy</a></div> |
| <div class="col-last even-row-color class-summary class-summary-tab3"> |
| <div class="block">The kind of values in the <a href="MetadataStandard.html#asTypeMap(java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.TypeValuePolicy)"><code>MetadataStandard.asTypeMap(…)</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color class-summary class-summary-tab5"><a href="UnmodifiableMetadataException.html" title="class in org.apache.sis.metadata">UnmodifiableMetadataException</a></div> |
| <div class="col-last odd-row-color class-summary class-summary-tab5"> |
| <div class="block">Thrown on attempt to set a read-only value in a metadata object.</div> |
| </div> |
| <div class="col-first even-row-color class-summary class-summary-tab3"><a href="ValueExistencePolicy.html" title="enum class in org.apache.sis.metadata">ValueExistencePolicy</a></div> |
| <div class="col-last even-row-color class-summary class-summary-tab3"> |
| <div class="block">Whatever <a href="MetadataStandard.html#asValueMap(java.lang.Object,java.lang.Class,org.apache.sis.metadata.KeyNamePolicy,org.apache.sis.metadata.ValueExistencePolicy)"><code>MetadataStandard.asValueMap(…)</code></a> shall contain entries for null, |
| <a href="../xml/NilObject.html" title="interface in org.apache.sis.xml">nil</a> or empty values.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </li> |
| </ul> |
| </section> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |