blob: a057b6a8a0c84f3c3e645c572f669ed858b00884 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 -->
<title>org.apache.sis.xml (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.xml">
<meta name="generator" content="javadoc/PackageWriterImpl">
<meta name="keywords" content="org.apache.sis.xml 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">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="../../../../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>Related Packages</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:&nbsp;</li>
<li><a href="#package-description">Description</a>&nbsp;|&nbsp;</li>
<li>Related Packages&nbsp;|&nbsp;</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>&nbsp;<a href="../../../../module-summary.html">org.apache.sis.metadata</a></div>
<h1 title="Package org.apache.sis.xml" class="title">Package org.apache.sis.xml</h1>
</div>
<hr>
<div class="package-signature">package <span class="element-name">org.apache.sis.xml</span></div>
<section class="package-description" id="package-description">
<div class="block">Provides methods for marshalling and unmarshalling SIS objects in XML.
The XML format is compliant with ISO 19115-3 specification for metadata,
and compliant with GML for referencing objects.
<p>The main class in this package is <a href="XML.html" title="class in org.apache.sis.xml"><code>XML</code></a>, which provides
property keys that can be used for configuring (un)marshallers and convenience static methods.
For example, the following code:</p>
<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">XML.marshal(Citations.OGC, System.out);
</code></pre>
</div>
will produce a string like below:
<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-xml">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;cit:CI_Citation xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gco="http://www.isotc211.org/2005/gco"&gt;
&lt;cit:title&gt;
&lt;gco:CharacterString&gt;Open Geospatial Consortium&lt;/gco:CharacterString&gt;
&lt;/cit:title&gt;
... much more XML below this point ...
&lt;/cit:CI_Citation&gt;
</code></pre>
</div>
<h2 id="customizing-the-xml-heading">Customizing the XML</h2>
In order to parse and format ISO 19115-3 compliant documents, SIS needs its own
<code>Marshaller</code> and <code>Unmarshaller</code> instances
(which are actually wrappers around standard instances). Those instances are created
and cached by <a href="MarshallerPool.html" title="class in org.apache.sis.xml"><code>Marshaller­Pool</code></a>, which is used internally by
the above-cited <code>XML</code> class. However, developers can instantiate their own
<code>Marshaller­Pool</code> in order to get more control on the marshalling and unmarshalling
processes, including the namespace URLs and the errors handling.
<p>The most common namespace URLs are defined in the <a href="Namespaces.html" title="class in org.apache.sis.xml"><code>Namespaces</code></a> class.
The parsing of some objects like <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link"><code>URL</code></a> and <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link"><code>UUID</code></a>,
together with the behavior in case of parsing error, can be specified by the
<a href="ValueConverter.html" title="class in org.apache.sis.xml"><code>Value­Converter</code></a> class.</p></div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.3</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<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-tab1" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab1', 2)" class="table-tab">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></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-tab1"><a href="IdentifiedObject.html" title="interface in org.apache.sis.xml">IdentifiedObject</a></div>
<div class="col-last even-row-color class-summary class-summary-tab1">
<div class="block">The interface for all SIS objects having identifiers.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab1"><a href="IdentifierMap.html" title="interface in org.apache.sis.xml">IdentifierMap</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab1">
<div class="block">A map view of some or all identifiers in an <a href="IdentifiedObject.html" title="interface in org.apache.sis.xml">identified object</a>.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab1"><a href="IdentifierSpace.html" title="interface in org.apache.sis.xml">IdentifierSpace</a>&lt;T&gt;</div>
<div class="col-last even-row-color class-summary class-summary-tab1">
<div class="block">Some identifier namespaces that are handled in a special way.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">Context of a marshalling or unmarshalling process.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="MarshallerPool.html" title="class in org.apache.sis.xml">MarshallerPool</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">Creates and configures <code>Marshaller</code> or <code>Unmarshaller</code> objects for use with SIS.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="Namespaces.html" title="class in org.apache.sis.xml">Namespaces</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">Lists some namespaces URLs used by JAXB when (un)marshalling.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab1"><a href="NilObject.html" title="interface in org.apache.sis.xml">NilObject</a></div>
<div class="col-last even-row-color class-summary class-summary-tab1">
<div class="block">A marker interface for nil XML elements providing an explanation about why the information is absent.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="NilReason.html" title="class in org.apache.sis.xml">NilReason</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">Explanation for a missing XML element.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="ReferenceResolver.html" title="class in org.apache.sis.xml">ReferenceResolver</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">Controls the (un)marshaller behavior regarding the <code>xlink</code> or <code>uuidref</code> attributes.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="ValueConverter.html" title="class in org.apache.sis.xml">ValueConverter</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">Performs conversions of XML element or attribute values encountered during XML (un)marshalling.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="XLink.html" title="class in org.apache.sis.xml">XLink</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">The XML attributes defined by OGC in the
<a href="http://schemas.opengis.net/xlink/1.0.0/xlinks.xsd">xlink</a> schema.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab3"><a href="XLink.Actuate.html" title="enum class in org.apache.sis.xml">XLink.Actuate</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab3">
<div class="block">Communicates the desired timing of traversal from the starting resource to the ending
resource.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab3"><a href="XLink.Show.html" title="enum class in org.apache.sis.xml">XLink.Show</a></div>
<div class="col-last even-row-color class-summary class-summary-tab3">
<div class="block">Communicates the desired presentation of the ending resource on traversal
from the starting resource.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab3"><a href="XLink.Type.html" title="enum class in org.apache.sis.xml">XLink.Type</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab3">
<div class="block">The type of a <code>xlink</code>.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="XML.html" title="class in org.apache.sis.xml">XML</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">Provides convenience methods for marshalling and unmarshalling SIS objects.</div>
</div>
</div>
</div>
</div>
</li>
</ul>
</section>
</main>
</div>
</div>
</body>
</html>