| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (19) --> |
| <title>XML (Apache SIS 1.3 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.sis.xml, class: XML"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.xml.XML class"> |
| <meta name="keywords" content="LOCALE"> |
| <meta name="keywords" content="TIMEZONE"> |
| <meta name="keywords" content="SCHEMAS"> |
| <meta name="keywords" content="GML_VERSION"> |
| <meta name="keywords" content="METADATA_VERSION"> |
| <meta name="keywords" content="LENIENT_UNMARSHAL"> |
| <meta name="keywords" content="RESOLVER"> |
| <meta name="keywords" content="CONVERTER"> |
| <meta name="keywords" content="STRING_SUBSTITUTES"> |
| <meta name="keywords" content="WARNING_FILTER"> |
| <meta name="keywords" content="marshal()"> |
| <meta name="keywords" content="unmarshal()"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../sis.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-3.6.0.min.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var pathtoroot = "../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span></button> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/XML.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Summary:</p> |
| <ul> |
| <li>Nested</li> |
| <li><a href="#field-summary">Field</a></li> |
| <li>Constr</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>Constr</li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field-summary">Field</a> | </li> |
| <li>Constr | </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>Constr | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><a href="../../../../search.html">SEARCH</a> |
| <input type="text" id="search-input" disabled placeholder="Search"> |
| <input type="reset" id="reset-button" disabled value="reset"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.xml</a></div> |
| <h1 title="Class XML" class="title">Class XML</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| <div class="inheritance"><a href="../util/Static.html" title="class in org.apache.sis.util">Static</a> |
| <div class="inheritance">XML</div> |
| </div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">XML</span> |
| <span class="extends-implements">extends <a href="../util/Static.html" title="class in org.apache.sis.util">Static</a></span></div> |
| <div class="block">Provides convenience methods for marshalling and unmarshalling SIS objects. |
| Marshalling operations use the standard versions listed below |
| (for marshalling a document in a different version, see <a href="MarshallerPool.html" title="class in org.apache.sis.xml"><code>MarshallerPool</code></a>). |
| Unmarshalling detects the version automatically. |
| |
| <table class="sis"> |
| <caption>Versions of standards applied at marshalling time</caption> |
| <tr><th>Topic</th> <th>SIS 0.3 to 0.8</th> <th>SIS 1.0</th> <th>Remarks</th></tr> |
| <tr><td>Metadata</td> <td>ISO 19139:2007</td> <td>ISO 19115-3:2016</td> <td></td></tr> |
| <tr><td>Referencing</td> <td>ISO 19136:2007</td> <td>ISO 19136:2007</td> <td>Same as GML 3.2</td></tr> |
| </table> |
| |
| This class defines also some property keys that can be given to the <code>Marshaller</code> |
| and <code>Unmarshaller</code> instances created by <a href="MarshallerPool.html" title="class in org.apache.sis.xml"><code>MarshallerPool</code></a>: |
| |
| <table class="sis"> |
| <caption>Supported (un)marshaller properties</caption> |
| <tr><th>Key</th> <th>Value type</th> <th>Purpose</th></tr> |
| <tr><td><a href="#LOCALE"><code>LOCALE</code></a></td> <td><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link"><code>Locale</code></a></td> <td>for specifying the locale to use for international strings and code lists.</td></tr> |
| <tr><td><a href="#TIMEZONE"><code>TIMEZONE</code></a></td> <td><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/TimeZone.html" title="class or interface in java.util" class="external-link"><code>TimeZone</code></a></td> <td>for specifying the timezone to use for dates and times.</td></tr> |
| <tr><td><a href="#SCHEMAS"><code>SCHEMAS</code></a></td> <td><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map</code></a></td> <td>for specifying the root URL of metadata schemas to use.</td></tr> |
| <tr><td><a href="#GML_VERSION"><code>GML_VERSION</code></a></td> <td><a href="../util/Version.html" title="class in org.apache.sis.util"><code>Version</code></a></td> <td>for specifying the GML version of the document to be (un)marshalled.</td></tr> |
| <tr><td><a href="#METADATA_VERSION"><code>METADATA_VERSION</code></a></td> <td><a href="../util/Version.html" title="class in org.apache.sis.util"><code>Version</code></a></td> <td>for specifying the metadata version of the document to be (un)marshalled.</td></tr> |
| <tr><td><a href="#RESOLVER"><code>RESOLVER</code></a></td> <td><a href="ReferenceResolver.html" title="class in org.apache.sis.xml"><code>ReferenceResolver</code></a></td> <td>for replacing <code>xlink</code> or <code>uuidref</code> attributes by the actual object to use.</td></tr> |
| <tr><td><a href="#CONVERTER"><code>CONVERTER</code></a></td> <td><a href="ValueConverter.html" title="class in org.apache.sis.xml"><code>ValueConverter</code></a></td> <td>for controlling the conversion of URL, UUID, Units or similar objects.</td></tr> |
| <tr><td><a href="#STRING_SUBSTITUTES"><code>STRING_SUBSTITUTES</code></a></td> <td><code>String[]</code></td> <td>for specifying which code lists to replace by simpler <code><gco:CharacterString></code> elements.</td></tr> |
| <tr><td><a href="#WARNING_FILTER"><code>WARNING_FILTER</code></a></td> <td><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.logging/java/util/logging/Filter.html" title="class or interface in java.util.logging" class="external-link"><code>Filter</code></a></td> <td>for being notified about non-fatal warnings.</td></tr> |
| </table></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.3</dd> |
| |
| <p><font size="-1">Defined in the <code>sis-metadata</code> module</font></p> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- =========== 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="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#CONVERTER" class="member-name-link">CONVERTER</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Controls the behaviors of the (un)marshalling process when an element cannot be processed, |
| or alter the element values.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#GML_VERSION" class="member-name-link">GML_VERSION</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Specifies the GML version of the document to be marshalled or unmarshalled.</div> |
| </div> |
| <div class="col-first even-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#LENIENT_UNMARSHAL" class="member-name-link">LENIENT_UNMARSHAL</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Specifies whether the unmarshalling process should accept any metadata or GML supported version |
| if the user did not specified an explicit version.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#LOCALE" class="member-name-link">LOCALE</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Specifies the locale to use for marshalling |
| <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> and <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link"><code>CodeList</code></a> |
| instances.</div> |
| </div> |
| <div class="col-first even-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#METADATA_VERSION" class="member-name-link">METADATA_VERSION</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Specifies the metadata version of the document to be marshalled or unmarshalled.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#RESOLVER" class="member-name-link">RESOLVER</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Allows client code to replace <code>xlink</code> or <code>uuidref</code> attributes by the actual objects to use.</div> |
| </div> |
| <div class="col-first even-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#SCHEMAS" class="member-name-link">SCHEMAS</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Specifies the root URLs of some schemas.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#STRING_SUBSTITUTES" class="member-name-link">STRING_SUBSTITUTES</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Allows marshallers to substitute some code lists by the simpler <code><gco:CharacterString></code> element.</div> |
| </div> |
| <div class="col-first even-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#TIMEZONE" class="member-name-link">TIMEZONE</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Specifies the timezone to use for marshalling dates and times.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#WARNING_FILTER" class="member-name-link">WARNING_FILTER</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Specifies a listener to be notified when a non-fatal error occurred during the (un)marshalling.</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-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#marshal(java.lang.Object)" class="member-name-link">marshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> object)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Marshal the given object into a string.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#marshal(java.lang.Object,java.io.File)" class="member-name-link">marshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> object, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link">File</a> output)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Marshal the given object into a file.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#marshal(java.lang.Object,java.io.OutputStream)" class="member-name-link">marshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> object, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a> output)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Marshal the given object into a stream.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#marshal(java.lang.Object,java.nio.file.Path)" class="member-name-link">marshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> object, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link">Path</a> output)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Marshal the given object into a path.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#marshal(java.lang.Object,javax.xml.transform.Result,java.util.Map)" class="member-name-link">marshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> object, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.xml/javax/xml/transform/Result.html" title="class or interface in javax.xml.transform" class="external-link">Result</a> output, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> properties)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Marshal the given object to a stream, DOM or other destinations.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/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-tab1 method-summary-table-tab4"><code><a href="#unmarshal(java.io.File)" class="member-name-link">unmarshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link">File</a> input)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Unmarshal an object from the given file.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#unmarshal(java.io.InputStream)" class="member-name-link">unmarshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a> input)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Unmarshal an object from the given stream.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/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-tab1 method-summary-table-tab4"><code><a href="#unmarshal(java.lang.String)" class="member-name-link">unmarshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> xml)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Unmarshal an object from the given string.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#unmarshal(java.net.URL)" class="member-name-link">unmarshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link">URL</a> input)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Unmarshal an object from the given URL.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/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-tab1 method-summary-table-tab4"><code><a href="#unmarshal(java.nio.file.Path)" class="member-name-link">unmarshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link">Path</a> input)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Unmarshal an object from the given path.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <T> JAXBElement<T></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#unmarshal(javax.xml.transform.Source,java.lang.Class,java.util.Map)" class="member-name-link">unmarshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.xml/javax/xml/transform/Source.html" title="class or interface in javax.xml.transform" class="external-link">Source</a> input, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> declaredType, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> properties)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Unmarshal an object from the given stream, DOM or other sources.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/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-tab1 method-summary-table-tab4"><code><a href="#unmarshal(javax.xml.transform.Source,java.util.Map)" class="member-name-link">unmarshal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.xml/javax/xml/transform/Source.html" title="class or interface in javax.xml.transform" class="external-link">Source</a> input, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> properties)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Unmarshal an object from the given stream, DOM or other sources.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-Object">Methods inherited from class <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <li> |
| <section class="field-details" id="field-detail"> |
| <h2>Field Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="LOCALE"> |
| <h3>LOCALE</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">LOCALE</span></div> |
| <div class="block">Specifies the locale to use for marshalling |
| <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> and <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link"><code>CodeList</code></a> |
| instances. The value for this property shall be an instance of <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link"><code>Locale</code></a> or a |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link"><code>CharSequence</code></a> recognized by <a href="../util/Locales.html#parse(java.lang.String)"><code>Locales.parse(String)</code></a>. |
| |
| <p>This property is mostly for marshallers. However, this property can also be used at |
| unmarshalling time, for example if a <code><lan:PT_FreeText></code> element containing |
| many localized strings need to be represented in a Java <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a> object. In |
| such case, the unmarshaller will try to pickup a string in the language specified |
| by this property.</p> |
| |
| <h4>Default behavior</h4> |
| If this property is never set, then (un)marshalling will try to use "unlocalized" strings - |
| typically some programmatic strings like <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 identifiers</a>. While such identifiers often look like English words, they are not |
| considered as the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html#ENGLISH" title="class or interface in java.util" class="external-link">English</a> localization. |
| The algorithm attempting to find a "unlocalized" string is defined in the |
| <a href="../util/DefaultInternationalString.html#toString(java.util.Locale)"><code>DefaultInternationalString.toString(Locale)</code></a> javadoc. |
| |
| <h4>Special case</h4> |
| If the object to be marshalled is an instance of |
| <a href="../metadata/iso/DefaultMetadata.html" title="class in org.apache.sis.metadata.iso"><code>DefaultMetadata</code></a>, then the value given to its |
| <a href="../metadata/iso/DefaultMetadata.html#setLanguage(java.util.Locale)"><code>setLanguage(Locale)</code></a> |
| method will have precedence over this property. This behavior is compliant with INSPIRE rules.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="../setup/OptionKey.html#LOCALE"><code>OptionKey.LOCALE</code></a></li> |
| <li><code>Marshaller.setProperty(String, Object)</code></li> |
| <li><a href="../metadata/iso/DefaultMetadata.html#setLanguage(java.util.Locale)"><code>DefaultMetadata.setLanguage(Locale)</code></a></li> |
| <li><a href="../../../../constant-values.html#org.apache.sis.xml.XML.LOCALE">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="TIMEZONE"> |
| <h3>TIMEZONE</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">TIMEZONE</span></div> |
| <div class="block">Specifies the timezone to use for marshalling dates and times. |
| The value for this property shall be an instance of <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/TimeZone.html" title="class or interface in java.util" class="external-link"><code>TimeZone</code></a> |
| or a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link"><code>CharSequence</code></a> recognized by <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/TimeZone.html#getTimeZone(java.lang.String)" title="class or interface in java.util" class="external-link"><code>TimeZone.getTimeZone(String)</code></a>. |
| |
| <h4>Default behavior</h4> |
| If this property is never set, then (un)marshalling will use the |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/TimeZone.html#getDefault()" title="class or interface in java.util" class="external-link">default timezone</a>.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../setup/OptionKey.html#TIMEZONE"><code>OptionKey.TIMEZONE</code></a></li> |
| <li><a href="../../../../constant-values.html#org.apache.sis.xml.XML.TIMEZONE">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="SCHEMAS"> |
| <h3>SCHEMAS</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">SCHEMAS</span></div> |
| <div class="block">Specifies the root URLs of some schemas. |
| This property modifies only the URL strings; it does not change the structure of |
| marshalled XML documents (for content structure, see <a href="#METADATA_VERSION"><code>METADATA_VERSION</code></a>). |
| The value for this property shall be an instance of <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map<String,String></code></a>. |
| This property controls the URLs to be used when marshalling the following elements: |
| |
| <ul> |
| <li>The value of the <code>codeList</code> attribute when marshalling subclasses of |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/CodeList.html" title="class or interface in org.opengis.util" class="external-link"><code>CodeList</code></a>.</li> |
| <li>The value of the <code>uom</code> attribute when marshalling measures |
| (for example <code><gco:Distance></code>).</li> |
| </ul> |
| |
| <div class="note"><b>Examples:</b> |
| URLs in code lists and is units of measurement may appear as below. |
| The underlined fragment is the part that can be replaced by <code>SCHEMAS</code> values: |
| <ul> |
| <li><code><u>http://standards.iso.org/iso/19115/</u>resources/Codelist/cat/codelists.xml#LanguageCode</code></li> |
| <li><code><u>http://www.isotc211.org/2005/</u>resources/Codelist/gmxCodelists.xml#LanguageCode</code></li> |
| <li><code><u>http://www.isotc211.org/2005/</u>resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])</code></li> |
| </ul></div> |
| |
| The currently recognized keys are listed below. |
| The entries to be used depend on the <a href="#METADATA_VERSION">metadata version</a> to be marshalled. |
| For example, the <code>"cat"</code> entry is used when marshalling ISO 19115-3:2016 document, while the |
| <code>"gmd"</code> and <code>"gmi"</code> entries are used when marshalling ISO 19139:2007 documents. |
| The following table gives some typical URLs, with the default URL in bold characters: |
| |
| <table class="sis"> |
| <caption>Supported root URLs</caption> |
| <tr> |
| <th>Map key</th> |
| <th>Typical values (choose only one)</th> |
| </tr><tr> |
| <td><b>cat</b></td> |
| <td><b>http://standards.iso.org/iso/19115/</b></td> |
| </tr><tr> |
| <td class="hsep"><b>gmd</b></td> |
| <td class="hsep"> |
| <b>http://www.isotc211.org/2005/</b><br> |
| http://schemas.opengis.net/iso/19139/20070417/<br> |
| http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/</td> |
| </tr> |
| </table> |
| |
| Additional keys, if any, are ignored. Future SIS versions may recognize more keys.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../constant-values.html#org.apache.sis.xml.XML.SCHEMAS">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="GML_VERSION"> |
| <h3>GML_VERSION</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">GML_VERSION</span></div> |
| <div class="block">Specifies the GML version of the document to be marshalled or unmarshalled. |
| The GML version may affect the set of XML elements to be marshalled and their namespaces. |
| Note that GML 3.2 is identical to ISO 19136:2007. |
| |
| <div class="note"><b>Compatibility note:</b> |
| Newer versions typically have more elements, but not always. For example, in <code><gml:VerticalDatum></code>, |
| the <code><gml:verticalDatumType></code> property presents in GML 3.0 and 3.1 has been removed in GML 3.2.</div> |
| |
| The value can be <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a> or <a href="../util/Version.html" title="class in org.apache.sis.util"><code>Version</code></a> object. |
| If no version is specified, then the most recent supported GML version is assumed. |
| |
| <h4>Supported GML versions</h4> |
| Apache SIS currently supports GML 3.2.1 by default. SIS can read and write GML 3.2 |
| if this property is set to "3.2". It is also possible to set this property to "3.1", |
| but the marshalled XML is not GML 3.1.1 conformant because of the differences between the two schemas. |
| See <a href="http://issues.apache.org/jira/browse/SIS-160">SIS-160: Need XSLT between GML 3.1 and 3.2</a> |
| for information about the status of GML 3.1.1 support.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../constant-values.html#org.apache.sis.xml.XML.GML_VERSION">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="METADATA_VERSION"> |
| <h3>METADATA_VERSION</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">METADATA_VERSION</span></div> |
| <div class="block">Specifies the metadata version of the document to be marshalled or unmarshalled. |
| The metadata version may affect the set of XML elements to be marshalled and their namespaces. |
| The value can be <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a> or <a href="../util/Version.html" title="class in org.apache.sis.util"><code>Version</code></a> object. |
| If no version is specified, then the most recent supported metadata version is assumed. |
| |
| <p>The metadata version may be ignored when the metadata to marshal is inside a GML element. |
| For example, the <code><gml:domainOfValidity></code> element inside a coordinate reference system |
| is always marshalled using ISO 19139:2007 if the enclosing element uses GML 3.2 schema.</p> |
| |
| <h4>Supported metadata versions</h4> |
| Apache SIS currently supports ISO 19115-3:2016 by default. This version can be explicitly |
| set with value "2014" or above (because the abstract model was defined in ISO 19115-1:2014). |
| SIS can write legacy ISO 19139:2007 documents if this property is set to a value less than "2014". |
| Both versions can be read without the need to specify this property.</div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../constant-values.html#org.apache.sis.xml.XML.METADATA_VERSION">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="LENIENT_UNMARSHAL"> |
| <h3>LENIENT_UNMARSHAL</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">LENIENT_UNMARSHAL</span></div> |
| <div class="block">Specifies whether the unmarshalling process should accept any metadata or GML supported version |
| if the user did not specified an explicit version. The value can be a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Boolean.html" title="class or interface in java.lang" class="external-link"><code>Boolean</code></a> instance, |
| or <code>"true"</code> or <code>"false"</code> as a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a>. If this value is not specified, then |
| the default is <code>true</code> for all <code>XML.unmarshal</code> methods and <code>false</code> otherwise. |
| |
| <p>Metadata and Geographic Markup Language have slightly different XML encoding depending on the |
| OGC/ISO version in use. Often the namespaces are different, but not only. Internally, Apache SIS |
| supports only the schema versions documented in this <a href="XML.html" title="class in org.apache.sis.xml">class javadoc</a>, for example |
| the ISO 19115-3:2016 version of metadata schema. For unmarshalling a document encoded according |
| an older metadata schema (e.g. ISO 19139:2007), a transformation is applied on-the-fly. However |
| this transformation may sometimes produce undesirable results or make debugging more difficult. |
| For this reason <a href="MarshallerPool.html" title="class in org.apache.sis.xml"><code>MarshallerPool</code></a> applies the transformation only if explicitly requested, |
| either by setting a <a href="#METADATA_VERSION"><code>METADATA_VERSION</code></a> or <a href="#GML_VERSION"><code>GML_VERSION</code></a> explicitly, or by setting |
| this <code>LENIENT_UNMARSHAL</code> property to <code>true</code> if the version to unmarshal is not known |
| in advance.</p></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../constant-values.html#org.apache.sis.xml.XML.LENIENT_UNMARSHAL">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="RESOLVER"> |
| <h3>RESOLVER</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">RESOLVER</span></div> |
| <div class="block">Allows client code to replace <code>xlink</code> or <code>uuidref</code> attributes by the actual objects to use. |
| The value for this property shall be an instance of <a href="ReferenceResolver.html" title="class in org.apache.sis.xml"><code>ReferenceResolver</code></a>. |
| |
| <p>If a property in a XML document is defined only by <code>xlink</code> or <code>uuidref</code> attributes, |
| without any concrete definition, then the default behavior is as below:</p> |
| |
| <ul> |
| <li>If the reference is of the form <code>xlink:href="#foo"</code> and an object with the <code>gml:id="foo"</code> |
| attribute was previously found in the same XML document, then that object will be used.</li> |
| <li>Otherwise an empty element containing only the values of the above-cited attributes is created.</li> |
| </ul> |
| |
| Applications can sometimes do better by using some domain-specific knowledge, for example by searching in a |
| database. Users can define their search algorithm by subclassing <a href="ReferenceResolver.html" title="class in org.apache.sis.xml"><code>ReferenceResolver</code></a> and configuring |
| a unmarshaller as below: |
| |
| <blockquote><pre>ReferenceResolver myResolver = ...; |
| Map<String,Object> properties = <font color="green">new</font> HashMap<>(); |
| properties.<b>put</b>(XML.RESOLVER, myResolver); |
| Object obj = XML.<b>unmarshal</b>(source, properties);</pre></blockquote></div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><code>Unmarshaller.setProperty(String, Object)</code></li> |
| <li><a href="ReferenceResolver.html" title="class in org.apache.sis.xml"><code>ReferenceResolver</code></a></li> |
| <li><a href="../../../../constant-values.html#org.apache.sis.xml.XML.RESOLVER">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="CONVERTER"> |
| <h3>CONVERTER</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">CONVERTER</span></div> |
| <div class="block">Controls the behaviors of the (un)marshalling process when an element cannot be processed, |
| or alter the element values. The value for this property shall be an instance of <a href="ValueConverter.html" title="class in org.apache.sis.xml"><code>ValueConverter</code></a>. |
| |
| <p>If an element in a XML document cannot be parsed (for example if a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link">URL</a> |
| string is not valid), the default behavior is to throw an exception which cause the |
| (un)marshalling of the entire document to fail. This default behavior can be customized by |
| invoking <code>Marshaller.setProperty(String, Object)</code> with this <code>CONVERTER</code> property |
| key and a custom <a href="ValueConverter.html" title="class in org.apache.sis.xml"><code>ValueConverter</code></a> instance. <code>ValueConverter</code> can also be used |
| for replacing an erroneous URL by a fixed URL. See the <a href="ValueConverter.html" title="class in org.apache.sis.xml"><code>ValueConverter</code></a> javadoc for |
| more details.</p> |
| |
| <div class="note"><b>Example:</b> |
| the following example collects the failures in a list without stopping the (un)marshalling process. |
| |
| <blockquote><pre><font color="green">class</font> WarningCollector <font color="green">extends</font> ValueConverter { |
| <i><font color="gray">// The warnings collected during (un)marshalling.</font></i> |
| List<String> messages = <font color="green">new</font> ArrayList<String>(); |
| |
| <i><font color="gray">// Override the default implementation in order to</font></i> |
| <i><font color="gray">// collect the warnings and allow the process to continue.</font></i> |
| @Override |
| <font color="green">protected</font> <T> <font color="green">boolean</font> <b>exceptionOccured</b>(MarshalContext context, |
| T value, Class<T> sourceType, Class<T> targetType, Exception e) |
| { |
| mesages.<b>add</b>(e.<b>getLocalizedMessage</b>()); |
| <font color="green">return</font> <font color="green">true</font>; |
| } |
| } |
| |
| <i><font color="gray">// Unmarshal a XML string, trapping some kind of errors.</font></i> |
| <i><font color="gray">// Not all errors are trapped - see the ValueConverter</font></i> |
| <i><font color="gray">// javadoc for more details.</font></i> |
| WarningCollector myWarningList = <font color="green">new</font> <b>WarningCollector</b>(); |
| Map<String,Object> properties = <font color="green">new</font> HashMap<>(); |
| properties.<b>put</b>(XML.CONVERTER, myWarningList); |
| Object obj = XML.<b>unmarshal</b>(source, properties); |
| <font color="green">if</font> (!myWarningList.<b>isEmpty</b>()) { |
| <i><font color="gray">// Report here the warnings to the user.</font></i> |
| }</pre></blockquote> |
| </div></div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><code>Unmarshaller.setProperty(String, Object)</code></li> |
| <li><a href="ValueConverter.html" title="class in org.apache.sis.xml"><code>ValueConverter</code></a></li> |
| <li><a href="../../../../constant-values.html#org.apache.sis.xml.XML.CONVERTER">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="STRING_SUBSTITUTES"> |
| <h3>STRING_SUBSTITUTES</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">STRING_SUBSTITUTES</span></div> |
| <div class="block">Allows marshallers to substitute some code lists by the simpler <code><gco:CharacterString></code> element. |
| The value for this property shall be a <code>String[]</code> array of any of the following values: |
| |
| <ul> |
| <li>"<code>language</code>" for substituting <code><lan:LanguageCode></code> elements</li> |
| <li>"<code>country</code>" for substituting <code><lan:Country></code> elements</li> |
| <li>"<code>filename</code>" for substituting <code><gcx:FileName></code> elements</li> |
| <li>"<code>mimetype</code>" for substituting <code><gcx:MimeFileType></code> elements</li> |
| </ul> |
| |
| <div class="note"><b>Example:</b> |
| INSPIRE compliant language code shall be formatted like below (details may vary): |
| |
| <blockquote><pre><gmd:language> |
| <gmd:LanguageCode |
| codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#LanguageCode" |
| codeListValue="fra">French</gmd:LanguageCode> |
| </gmd:language></pre></blockquote> |
| |
| However if this property contains the "<code>language</code>" value, then the marshaller will format |
| the language code like below (which is legal according OGC schemas, but is not INSPIRE compliant): |
| |
| <blockquote><pre><lan:language> |
| <gco:CharacterString>fra</gco:CharacterString> |
| </lan:language></pre></blockquote> |
| </div></div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../constant-values.html#org.apache.sis.xml.XML.STRING_SUBSTITUTES">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="WARNING_FILTER"> |
| <h3>WARNING_FILTER</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">WARNING_FILTER</span></div> |
| <div class="block">Specifies a listener to be notified when a non-fatal error occurred during the (un)marshalling. |
| The value for this property shall be an instance of <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.logging/java/util/logging/Filter.html" title="class or interface in java.util.logging" class="external-link"><code>Filter</code></a>. |
| |
| <p>By default, warnings that occur during the (un)marshalling process are logged. However if a |
| property is set for this key, then the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.logging/java/util/logging/Filter.html#isLoggable(java.util.logging.LogRecord)" title="class or interface in java.util.logging" class="external-link"><code>Filter.isLoggable(LogRecord)</code></a> method will be invoked. |
| If that method returns <code>false</code>, then the warning will not be logged by the (un)marshaller.</p></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../constant-values.html#org.apache.sis.xml.XML.WARNING_FILTER">Constant Field Values</a></li> |
| </ul> |
| </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="marshal(java.lang.Object)"> |
| <h3>marshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">marshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> object)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Marshal the given object into a string.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>object</code> - the root of content tree to be marshalled.</dd> |
| <dt>Returns:</dt> |
| <dd>the XML representation of the given object.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred during the marshalling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="marshal(java.lang.Object,java.io.OutputStream)"> |
| <h3>marshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">marshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> object, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a> output)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Marshal the given object into a stream.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>object</code> - the root of content tree to be marshalled.</dd> |
| <dd><code>output</code> - the stream where to write.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred during the marshalling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="marshal(java.lang.Object,java.io.File)"> |
| <h3>marshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">marshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> object, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link">File</a> output)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Marshal the given object into a file.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>object</code> - the root of content tree to be marshalled.</dd> |
| <dd><code>output</code> - the file to be written.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred during the marshalling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="marshal(java.lang.Object,java.nio.file.Path)"> |
| <h3>marshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">marshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> object, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link">Path</a> output)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Marshal the given object into a path.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>object</code> - the root of content tree to be marshalled.</dd> |
| <dd><code>output</code> - the file to be written.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred during the marshalling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="marshal(java.lang.Object,javax.xml.transform.Result,java.util.Map)"> |
| <h3>marshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">marshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> object, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.xml/javax/xml/transform/Result.html" title="class or interface in javax.xml.transform" class="external-link">Result</a> output, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> properties)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Marshal the given object to a stream, DOM or other destinations. |
| This is the most flexible marshalling method provided in this <code>XML</code> class. |
| The destination is specified by the <code>output</code> argument implementation, for example |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.xml/javax/xml/transform/stream/StreamResult.html" title="class or interface in javax.xml.transform.stream" class="external-link"><code>StreamResult</code></a> for writing to a file or output stream. |
| The optional <code>properties</code> map can contain any key documented in this <code>XML</code> class, |
| together with the keys documented in the <cite>supported properties</cite> section of the the |
| <code>Marshaller</code> class.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>object</code> - the root of content tree to be marshalled.</dd> |
| <dd><code>output</code> - the file to be written.</dd> |
| <dd><code>properties</code> - an optional map of properties to give to the marshaller, or <code>null</code> if none.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if a property has an illegal value, or if an error occurred during the marshalling.</dd> |
| <dt>Since:</dt> |
| <dd>0.4</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="unmarshal(java.lang.String)"> |
| <h3>unmarshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">unmarshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> xml)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Unmarshal an object from the given string. |
| Note that the given argument is the XML document itself, |
| <strong>not</strong> a URL to a XML document.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>xml</code> - the XML representation of an object.</dd> |
| <dt>Returns:</dt> |
| <dd>the object unmarshalled from the given input.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred during the unmarshalling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="unmarshal(java.io.InputStream)"> |
| <h3>unmarshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">unmarshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a> input)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Unmarshal an object from the given stream.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>input</code> - the stream from which to read a XML representation.</dd> |
| <dt>Returns:</dt> |
| <dd>the object unmarshalled from the given input.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred during the unmarshalling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="unmarshal(java.net.URL)"> |
| <h3>unmarshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">unmarshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" class="external-link">URL</a> input)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Unmarshal an object from the given URL.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>input</code> - the URL from which to read a XML representation.</dd> |
| <dt>Returns:</dt> |
| <dd>the object unmarshalled from the given input.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred during the unmarshalling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="unmarshal(java.io.File)"> |
| <h3>unmarshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">unmarshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link">File</a> input)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Unmarshal an object from the given file.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>input</code> - the file from which to read a XML representation.</dd> |
| <dt>Returns:</dt> |
| <dd>the object unmarshalled from the given input.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred during the unmarshalling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="unmarshal(java.nio.file.Path)"> |
| <h3>unmarshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">unmarshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link">Path</a> input)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Unmarshal an object from the given path.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>input</code> - the path from which to read a XML representation.</dd> |
| <dt>Returns:</dt> |
| <dd>the object unmarshalled from the given input.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred during the unmarshalling.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="unmarshal(javax.xml.transform.Source,java.util.Map)"> |
| <h3>unmarshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">unmarshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.xml/javax/xml/transform/Source.html" title="class or interface in javax.xml.transform" class="external-link">Source</a> input, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> properties)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Unmarshal an object from the given stream, DOM or other sources. |
| Together with the <a href="#unmarshal(javax.xml.transform.Source,java.lang.Class,java.util.Map)">Unmarshal by Declared Type</a> variant, |
| this is the most flexible unmarshalling method provided in this <code>XML</code> class. |
| The source is specified by the <code>input</code> argument implementation, for example |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.xml/javax/xml/transform/stream/StreamSource.html" title="class or interface in javax.xml.transform.stream" class="external-link"><code>StreamSource</code></a> for reading from a file or input stream. |
| The optional <code>properties</code> map can contain any key documented in this <code>XML</code> class, |
| together with the keys documented in the <cite>supported properties</cite> section of the the |
| <code>Unmarshaller</code> class.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>input</code> - the file from which to read a XML representation.</dd> |
| <dd><code>properties</code> - an optional map of properties to give to the unmarshaller, or <code>null</code> if none.</dd> |
| <dt>Returns:</dt> |
| <dd>the object unmarshalled from the given input.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if a property has an illegal value, or if an error occurred during the unmarshalling.</dd> |
| <dt>Since:</dt> |
| <dd>0.4</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="unmarshal(javax.xml.transform.Source,java.lang.Class,java.util.Map)"> |
| <h3>unmarshal</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="type-parameters"><T></span> <span class="return-type">JAXBElement<T></span> <span class="element-name">unmarshal</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.xml/javax/xml/transform/Source.html" title="class or interface in javax.xml.transform" class="external-link">Source</a> input, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> declaredType, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> properties)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Unmarshal an object from the given stream, DOM or other sources. |
| Together with the <a href="#unmarshal(javax.xml.transform.Source,java.util.Map)">Unmarshal Global Root Element</a> variant, |
| this is the most flexible unmarshalling method provided in this <code>XML</code> class. |
| The source is specified by the <code>input</code> argument implementation, for example |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.xml/javax/xml/transform/stream/StreamSource.html" title="class or interface in javax.xml.transform.stream" class="external-link"><code>StreamSource</code></a> for reading from a file or input stream. |
| The optional <code>properties</code> map can contain any key documented in this <code>XML</code> class, |
| together with the keys documented in the <cite>supported properties</cite> section of the the |
| <code>Unmarshaller</code> class.</div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - compile-time value of the <code>declaredType</code> argument.</dd> |
| <dt>Parameters:</dt> |
| <dd><code>input</code> - the file from which to read a XML representation.</dd> |
| <dd><code>declaredType</code> - the JAXB mapped class of the object to unmarshal.</dd> |
| <dd><code>properties</code> - an optional map of properties to give to the unmarshaller, or <code>null</code> if none.</dd> |
| <dt>Returns:</dt> |
| <dd>the object unmarshalled from the given input, wrapped in a JAXB element.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if a property has an illegal value, or if an error occurred during the unmarshalling.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2010–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |