blob: b40e34c658bd46c8d08bcd45d36237fd4036dc7d [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 -->
<title>XML (Apache SIS 1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2019-09-20">
<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="DEFAULT_NAMESPACE">
<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="WARNING_LISTENER">
<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="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="XML (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.xml</a></div>
<h2 title="Class XML" class="title">Class XML</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../util/Static.html" title="class in org.apache.sis.util">Static</a></li>
<li>
<ul class="inheritance">
<li>XML</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">XML</span>
extends <a href="../util/Static.html" title="class in org.apache.sis.util">Static</a></pre>
<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>Marshaller­Pool</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 <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink"><code>Marshaller</code></a>
and <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink"><code>Unmarshaller</code></a> instances created by <a href="MarshallerPool.html" title="class in org.apache.sis.xml"><code>Marshaller­Pool</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/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink"><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/javase/8/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util" class="externalLink"><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/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink"><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>&lt;gco:Character­String&gt;</code> elements.</td></tr>
<tr><td><a href="#WARNING_FILTER"><code>WARNING_FILTER</code></a></td> <td><a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Filter.html?is-external=true" title="class or interface in java.util.logging" class="externalLink"><code>Filter</code></a></td> <td>for being notified about non-fatal warnings.</td></tr>
</table></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<p><font size="-1">Defined in the <code>sis-metadata</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CONVERTER">CONVERTER</a></span></code></th>
<td class="colLast">
<div class="block">Controls the behaviors of the (un)marshalling process when an element can not be processed,
or alter the element values.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_NAMESPACE">DEFAULT_NAMESPACE</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">This property is no longer honored by Apache SIS 1.0.</div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#GML_VERSION">GML_VERSION</a></span></code></th>
<td class="colLast">
<div class="block">Specifies the GML version of the document to be marshalled or unmarshalled.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#LENIENT_UNMARSHAL">LENIENT_UNMARSHAL</a></span></code></th>
<td class="colLast">
<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>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#LOCALE">LOCALE</a></span></code></th>
<td class="colLast">
<div class="block">Specifies the locale to use for marshalling
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/InternationalString.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>International­String</code></a> and <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/CodeList.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>Code­List</code></a>
instances.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#METADATA_VERSION">METADATA_VERSION</a></span></code></th>
<td class="colLast">
<div class="block">Specifies the metadata version of the document to be marshalled or unmarshalled.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#RESOLVER">RESOLVER</a></span></code></th>
<td class="colLast">
<div class="block">Allows client code to replace <code>xlink</code> or <code>uuidref</code> attributes by the actual objects to use.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SCHEMAS">SCHEMAS</a></span></code></th>
<td class="colLast">
<div class="block">Specifies the root URL of schemas.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#STRING_SUBSTITUTES">STRING_SUBSTITUTES</a></span></code></th>
<td class="colLast">
<div class="block">Allows marshallers to substitute some code lists by the simpler <code>&lt;gco:Character­String&gt;</code> element.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TIMEZONE">TIMEZONE</a></span></code></th>
<td class="colLast">
<div class="block">Specifies the timezone to use for marshalling dates and times.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#WARNING_FILTER">WARNING_FILTER</a></span></code></th>
<td class="colLast">
<div class="block">Specifies a listener to be notified when a non-fatal error occurred during the (un)marshalling.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#WARNING_LISTENER">WARNING_LISTENER</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Replaced by <a href="#WARNING_FILTER"><code>WARNING_FILTER</code></a>.</div>
</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#marshal(java.lang.Object)">marshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object)</code></th>
<td class="colLast">
<div class="block">Marshal the given object into a string.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#marshal(java.lang.Object,java.io.File)">marshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink">File</a>&nbsp;output)</code></th>
<td class="colLast">
<div class="block">Marshal the given object into a file.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#marshal(java.lang.Object,java.io.OutputStream)">marshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">OutputStream</a>&nbsp;output)</code></th>
<td class="colLast">
<div class="block">Marshal the given object into a stream.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#marshal(java.lang.Object,java.nio.file.Path)">marshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file" class="externalLink">Path</a>&nbsp;output)</code></th>
<td class="colLast">
<div class="block">Marshal the given object into a path.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#marshal(java.lang.Object,javax.xml.transform.Result,java.util.Map)">marshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform" class="externalLink">Result</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;?&gt;&nbsp;properties)</code></th>
<td class="colLast">
<div class="block">Marshal the given object to a stream, DOM or other destinations.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(java.io.File)">unmarshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink">File</a>&nbsp;input)</code></th>
<td class="colLast">
<div class="block">Unmarshal an object from the given file.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(java.io.InputStream)">unmarshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;input)</code></th>
<td class="colLast">
<div class="block">Unmarshal an object from the given stream.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(java.lang.String)">unmarshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;xml)</code></th>
<td class="colLast">
<div class="block">Unmarshal an object from the given string.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(java.net.URL)">unmarshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net" class="externalLink">URL</a>&nbsp;input)</code></th>
<td class="colLast">
<div class="block">Unmarshal an object from the given URL.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(java.nio.file.Path)">unmarshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file" class="externalLink">Path</a>&nbsp;input)</code></th>
<td class="colLast">
<div class="block">Unmarshal an object from the given path.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBElement.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBElement</a>&lt;T&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(javax.xml.transform.Source,java.lang.Class,java.util.Map)">unmarshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/Source.html?is-external=true" title="class or interface in javax.xml.transform" class="externalLink">Source</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;declaredType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;?&gt;&nbsp;properties)</code></th>
<td class="colLast">
<div class="block">Unmarshal an object from the given stream, DOM or other sources.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(javax.xml.transform.Source,java.util.Map)">unmarshal</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/Source.html?is-external=true" title="class or interface in javax.xml.transform" class="externalLink">Source</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;?&gt;&nbsp;properties)</code></th>
<td class="colLast">
<div class="block">Unmarshal an object from the given stream, DOM or other sources.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">get­Class</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hash­Code</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notify­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">to­String</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="LOCALE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LOCALE</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> LOCALE</pre>
<div class="block">Specifies the locale to use for marshalling
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/InternationalString.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>International­String</code></a> and <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/CodeList.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>Code­List</code></a>
instances. The value for this property shall be an instance of <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Locale</code></a> or a
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Char­Sequence</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>&lt;lan:PT_Free­Text&gt;</code> element containing
many localized strings need to be represented in a Java <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>String</code></a> object. In
such case, the unmarshaller will try to pickup a string in the language specified
by this property.</p>
<div class="section">Default behavior</div>
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/annotation/UML.html?is-external=true#identifier()" title="class or interface in org.opengis.annotation" class="externalLink">UML identifiers</a>. While such identifiers often look like English words, they are not
considered as the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true#ENGLISH" title="class or interface in java.util" class="externalLink">English</a> localization.
The algorithm attempting to find a "unlocalized" string is defined in the
<a href="../util/iso/DefaultInternationalString.html#toString(java.util.Locale)"><code>Default­International­String​.to­String(Locale)</code></a> javadoc.
<div class="section">Special case</div>
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>Default­Metadata</code></a>, then the value given to its
<a href="../metadata/iso/DefaultMetadata.html#setLanguage(java.util.Locale)"><code>set­Language(Locale)</code></a>
method will have precedence over this property. This behavior is compliant with INSPIRE rules.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../setup/OptionKey.html#LOCALE"><code>Option­Key​.LOCALE</code></a>,
<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true#setProperty(java.lang.String,java.lang.Object)" title="class or interface in javax.xml.bind" class="externalLink"><code>Marshaller​.set­Property(String, Object)</code></a>,
<a href="../metadata/iso/DefaultMetadata.html#setLanguage(java.util.Locale)"><code>Default­Metadata​.set­Language(Locale)</code></a>,
<a href="../../../../constant-values.html#org.apache.sis.xml.XML.LOCALE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TIMEZONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TIMEZONE</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> TIMEZONE</pre>
<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/javase/8/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Time­Zone</code></a>
or a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Char­Sequence</code></a> recognized by <a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html?is-external=true#getTimeZone(java.lang.String)" title="class or interface in java.util" class="externalLink"><code>Time­Zone​.get­Time­Zone(String)</code></a>.
<div class="section">Default behavior</div>
If this property is never set, then (un)marshalling will use the
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html?is-external=true#getDefault()" title="class or interface in java.util" class="externalLink">default timezone</a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../setup/OptionKey.html#TIMEZONE"><code>Option­Key​.TIMEZONE</code></a>,
<a href="../../../../constant-values.html#org.apache.sis.xml.XML.TIMEZONE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SCHEMAS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SCHEMAS</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> SCHEMAS</pre>
<div class="block">Specifies the root URL of schemas. The value for this property shall
be an instance of <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Map&lt;String,String&gt;</code></a>.
This property controls the URL to be used when marshalling the following elements:
<ul>
<li>The value of the <code>code­List</code> attribute when marshalling subclasses of
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/CodeList.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>Code­List</code></a>.</li>
<li>The value of the <code>uom</code> attribute when marshalling measures
(for example <code>&lt;gco:Distance&gt;</code>).</li>
</ul>
Two <code>Map</code> keys are currently recognized: <code>"cat"</code> and <code>"gmd"</code>,
which stands for the new ISO 19115-3:2016 and the legacy ISO 19139:2007 schemas respectively.
The key to be used depends on the <a href="#METADATA_VERSION">metadata version</a> to be marshalled.
Additional keys, if any, are ignored. Future SIS versions may recognize more keys.
<div class="section">Valid values</div>
The following table gives some typical URLs.
The URL in bold character is the default one.
<table class="sis">
<caption>Supported schemas</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><b>gmd</b></td><td>
http://www.isotc211.org/2005/<br>
<b>http://schemas.opengis.net/iso/19139/20070417/</b><br>
http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/<br>
http://eden.ign.fr/xsd/fra/20060922/
</td></tr>
</table></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.xml.XML.SCHEMAS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="DEFAULT_NAMESPACE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_NAMESPACE</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang" class="externalLink">@Deprecated</a>
public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> DEFAULT_NAMESPACE</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">This property is no longer honored by Apache SIS 1.0.
Use <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/annotation/XmlSchema.html?is-external=true" title="class or interface in javax.xml.bind.annotation" class="externalLink"><code>Xml­Schema</code></a> instead.</div>
</div>
<div class="block">Specifies the default namespace of the XML document to write.
An example of value for this key is <code>"http://www​.isotc211​.org/2005/gmd"</code>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.xml.XML.DEFAULT_NAMESPACE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="GML_VERSION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>GML_VERSION</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> GML_VERSION</pre>
<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>&lt;gml:Vertical­Datum&gt;</code>,
the <code>&lt;gml:vertical­Datum­Type&gt;</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/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><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.
<div class="section">Supported GML versions</div>
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>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.xml.XML.GML_VERSION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="METADATA_VERSION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>METADATA_VERSION</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> METADATA_VERSION</pre>
<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/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><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>&lt;gml:domain­Of­Validity&gt;</code> element inside a coordinate reference system
is always marshalled using ISO 19139:2007 if the enclosing element uses GML 3.2 schema.</p>
<div class="section">Supported metadata versions</div>
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>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.xml.XML.METADATA_VERSION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="LENIENT_UNMARSHAL">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LENIENT_UNMARSHAL</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> LENIENT_UNMARSHAL</pre>
<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/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Boolean</code></a> instance,
or <code>"true"</code> or <code>"false"</code> as a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><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 sometime produce undesirable results or make debugging more difficult.
For this reason <a href="MarshallerPool.html" title="class in org.apache.sis.xml"><code>Marshaller­Pool</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>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.xml.XML.LENIENT_UNMARSHAL">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="RESOLVER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RESOLVER</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> RESOLVER</pre>
<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>Reference­Resolver</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 sometime 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>Reference­Resolver</code></a> and configuring
a unmarshaller as below:
<blockquote><pre>ReferenceResolver myResolver = ...;
Map&lt;String,Object&gt; properties = <font color="green">new</font> HashMap&lt;&gt;();
properties.<b>put</b>(XML.RESOLVER, myResolver);
Object obj = XML.<b>unmarshal</b>(source, properties);</pre></blockquote></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true#setProperty(java.lang.String,java.lang.Object)" title="class or interface in javax.xml.bind" class="externalLink"><code>Unmarshaller​.set­Property(String, Object)</code></a>,
<a href="ReferenceResolver.html" title="class in org.apache.sis.xml"><code>Reference­Resolver</code></a>,
<a href="../../../../constant-values.html#org.apache.sis.xml.XML.RESOLVER">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="CONVERTER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CONVERTER</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> CONVERTER</pre>
<div class="block">Controls the behaviors of the (un)marshalling process when an element can not 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>Value­Converter</code></a>.
<p>If an element in a XML document can not be parsed (for example if a <a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net" class="externalLink">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 <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true#setProperty(java.lang.String,java.lang.Object)" title="class or interface in javax.xml.bind" class="externalLink"><code>Marshaller​.set­Property(String, Object)</code></a> with this <code>CONVERTER</code> property
key and a custom <a href="ValueConverter.html" title="class in org.apache.sis.xml"><code>Value­Converter</code></a> instance. <code>Value­Converter</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>Value­Converter</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&lt;String&gt; messages = <font color="green">new</font> ArrayList&lt;String&gt;();
<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> &lt;T&gt; <font color="green">boolean</font> <b>exceptionOccured</b>(MarshalContext context,
T value, Class&lt;T&gt; sourceType, Class&lt;T&gt; 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&lt;String,Object&gt; properties = <font color="green">new</font> HashMap&lt;&gt;();
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>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true#setProperty(java.lang.String,java.lang.Object)" title="class or interface in javax.xml.bind" class="externalLink"><code>Unmarshaller​.set­Property(String, Object)</code></a>,
<a href="ValueConverter.html" title="class in org.apache.sis.xml"><code>Value­Converter</code></a>,
<a href="../../../../constant-values.html#org.apache.sis.xml.XML.CONVERTER">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="STRING_SUBSTITUTES">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STRING_SUBSTITUTES</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> STRING_SUBSTITUTES</pre>
<div class="block">Allows marshallers to substitute some code lists by the simpler <code>&lt;gco:Character­String&gt;</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>&lt;lan:Language­Code&gt;</code> elements</li>
<li>"<code>country</code>" for substituting <code>&lt;lan:Country&gt;</code> elements</li>
<li>"<code>filename</code>" for substituting <code>&lt;gcx:File­Name&gt;</code> elements</li>
<li>"<code>mimetype</code>" for substituting <code>&lt;gcx:Mime­File­Type&gt;</code> elements</li>
</ul>
<div class="note"><b>Example:</b>
INSPIRE compliant language code shall be formatted like below (details may vary):
<blockquote><pre>&lt;gmd:language&gt;
&lt;gmd:LanguageCode
codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#LanguageCode"
codeListValue="fra"&gt;French&lt;/gmd:LanguageCode&gt;
&lt;/gmd:language&gt;</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>&lt;lan:language&gt;
&lt;gco:CharacterString&gt;fra&lt;/gco:CharacterString&gt;
&lt;/lan:language&gt;</pre></blockquote>
</div></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.xml.XML.STRING_SUBSTITUTES">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="WARNING_FILTER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>WARNING_FILTER</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> WARNING_FILTER</pre>
<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/javase/8/docs/api/java/util/logging/Filter.html?is-external=true" title="class or interface in java.util.logging" class="externalLink"><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/javase/8/docs/api/java/util/logging/Filter.html?is-external=true#isLoggable(java.util.logging.LogRecord)" title="class or interface in java.util.logging" class="externalLink"><code>Filter​.is­Loggable(Log­Record)</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>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.xml.XML.WARNING_FILTER">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="WARNING_LISTENER">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>WARNING_LISTENER</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang" class="externalLink">@Deprecated</a>
public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> WARNING_LISTENER</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Replaced by <a href="#WARNING_FILTER"><code>WARNING_FILTER</code></a>.</div>
</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 <code>Warning­Listener&lt;Object&gt;</code>.
<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="../util/logging/WarningListener.html#warningOccured(S,java.util.logging.LogRecord)"><code>Warning­Listener​.warning­Occured(Object, Log­Record)</code></a>
method will be invoked and the warning will <em>not</em> be logged by the (un)marshaller.</p></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../util/logging/WarningListener.html" title="interface in org.apache.sis.util.logging"><code>Warning­Listener</code></a>,
<a href="../../../../constant-values.html#org.apache.sis.xml.XML.WARNING_LISTENER">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="marshal(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>marshal</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;marshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<div class="block">Marshal the given object into a string.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>object</code> - the root of content tree to be marshalled.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the XML representation of the given object.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred during the marshalling.</dd>
</dl>
</li>
</ul>
<a id="marshal(java.lang.Object,java.io.OutputStream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>marshal</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;marshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">OutputStream</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<div class="block">Marshal the given object into a stream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></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><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred during the marshalling.</dd>
</dl>
</li>
</ul>
<a id="marshal(java.lang.Object,java.io.File)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>marshal</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;marshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink">File</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<div class="block">Marshal the given object into a file.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></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><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred during the marshalling.</dd>
</dl>
</li>
</ul>
<a id="marshal(java.lang.Object,java.nio.file.Path)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>marshal</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;marshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file" class="externalLink">Path</a>&nbsp;output)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<div class="block">Marshal the given object into a path.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></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><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred during the marshalling.</dd>
</dl>
</li>
</ul>
<a id="marshal(java.lang.Object,javax.xml.transform.Result,java.util.Map)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>marshal</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;marshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform" class="externalLink">Result</a>&nbsp;output,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;?&gt;&nbsp;properties)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<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/javase/8/docs/api/javax/xml/transform/stream/StreamResult.html?is-external=true" title="class or interface in javax.xml.transform.stream" class="externalLink"><code>Stream­Result</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
<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink"><code>Marshaller</code></a> class.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></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><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if a property has an illegal value, or if an error occurred during the marshalling.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.4</dd>
</dl>
</li>
</ul>
<a id="unmarshal(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unmarshal</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;unmarshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;xml)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<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>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>xml</code> - the XML representation of an object.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the object unmarshalled from the given input.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred during the unmarshalling.</dd>
</dl>
</li>
</ul>
<a id="unmarshal(java.io.InputStream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unmarshal</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;unmarshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;input)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<div class="block">Unmarshal an object from the given stream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the stream from which to read a XML representation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the object unmarshalled from the given input.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred during the unmarshalling.</dd>
</dl>
</li>
</ul>
<a id="unmarshal(java.net.URL)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unmarshal</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;unmarshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net" class="externalLink">URL</a>&nbsp;input)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<div class="block">Unmarshal an object from the given URL.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the URL from which to read a XML representation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the object unmarshalled from the given input.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred during the unmarshalling.</dd>
</dl>
</li>
</ul>
<a id="unmarshal(java.io.File)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unmarshal</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;unmarshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink">File</a>&nbsp;input)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<div class="block">Unmarshal an object from the given file.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the file from which to read a XML representation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the object unmarshalled from the given input.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred during the unmarshalling.</dd>
</dl>
</li>
</ul>
<a id="unmarshal(java.nio.file.Path)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unmarshal</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;unmarshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file" class="externalLink">Path</a>&nbsp;input)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<div class="block">Unmarshal an object from the given path.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the path from which to read a XML representation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the object unmarshalled from the given input.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred during the unmarshalling.</dd>
</dl>
</li>
</ul>
<a id="unmarshal(javax.xml.transform.Source,java.util.Map)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unmarshal</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;unmarshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/Source.html?is-external=true" title="class or interface in javax.xml.transform" class="externalLink">Source</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;?&gt;&nbsp;properties)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<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/javase/8/docs/api/javax/xml/transform/stream/StreamSource.html?is-external=true" title="class or interface in javax.xml.transform.stream" class="externalLink"><code>Stream­Source</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
<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink"><code>Unmarshaller</code></a> class.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt>
<dd>the object unmarshalled from the given input.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if a property has an illegal value, or if an error occurred during the unmarshalling.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.4</dd>
</dl>
</li>
</ul>
<a id="unmarshal(javax.xml.transform.Source,java.lang.Class,java.util.Map)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>unmarshal</h4>
<pre class="methodSignature">public static&nbsp;&lt;T&gt;&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBElement.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBElement</a>&lt;T&gt;&nbsp;unmarshal&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/Source.html?is-external=true" title="class or interface in javax.xml.transform" class="externalLink">Source</a>&nbsp;input,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;T&gt;&nbsp;declaredType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;?&gt;&nbsp;properties)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<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/javase/8/docs/api/javax/xml/transform/stream/StreamSource.html?is-external=true" title="class or interface in javax.xml.transform.stream" class="externalLink"><code>Stream­Source</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
<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink"><code>Unmarshaller</code></a> class.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - compile-time value of the <code>declared­Type</code> argument.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the file from which to read a XML representation.</dd>
<dd><code>declared­Type</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><span class="returnLabel">Returns:</span></dt>
<dd>the object unmarshalled from the given input, wrapped in a JAXB element.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if a property has an illegal value, or if an error occurred during the unmarshalling.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.8</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>