blob: f0ad8895da078baa774fe1e58a2597e58faacb2c [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>ReferenceResolver (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.ReferenceResolver class">
<meta name="keywords" content="DEFAULT">
<meta name="keywords" content="newIdentifiedObject()">
<meta name="keywords" content="resolve()">
<meta name="keywords" content="canSubstituteByReference()">
<meta name="keywords" content="anchor()">
<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="ReferenceResolver (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance 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/ReferenceResolver.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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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 ReferenceResolver" class="title">Class ReferenceResolver</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>ReferenceResolver</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public class <span class="typeNameLabel">ReferenceResolver</span>
extends <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></pre>
<div class="block">Controls the (un)marshaller behavior regarding the <code>xlink</code> or <code>uuidref</code> attributes.
At marshalling time, this class controls whether the marshaller is allowed to write a reference
to an existing instance instead than writing the full object definition.
At unmarshalling time, this class replaces (if possible) a reference by the full object definition.
<p>Subclasses can override the methods defined in this class in order to search in their own catalog.
See the <a href="XML.html#RESOLVER"><code>XML​.RESOLVER</code></a> javadoc for an example of registering a custom <code>Reference­Resolver</code>
to a unmarshaller.</p></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="ReferenceResolver.html" title="class in org.apache.sis.xml">ReferenceResolver</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT">DEFAULT</a></span></code></th>
<td class="colLast">
<div class="block">The default and thread-safe instance.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">ReferenceResolver</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates a default <code>Reference­Resolver</code>.</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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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><a href="XLink.html" title="class in org.apache.sis.xml">XLink</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#anchor(org.apache.sis.xml.MarshalContext,java.lang.Object,java.lang.CharSequence)">anchor</a></span>&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;value,
<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">CharSequence</a>&nbsp;text)</code></th>
<td class="colLast">
<div class="block">Returns the <code>&lt;gcx:Anchor&gt;</code> to use for the given text, or <code>null</code> if none.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,java.lang.String)">canSubstituteByReference</a></span>&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
T&nbsp;object,
<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;id)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the marshaller can use a <code>xlink:href="#id"</code> reference to the given object
instead than writing the full XML element.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,java.util.UUID)">canSubstituteByReference</a></span>&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
T&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util" class="externalLink">UUID</a>&nbsp;uuid)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the marshaller can use a reference to the given object
instead than writing the full XML element.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,org.apache.sis.xml.XLink)">canSubstituteByReference</a></span>&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
T&nbsp;object,
<a href="XLink.html" title="class in org.apache.sis.xml">XLink</a>&nbsp;link)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the marshaller can use a <code>xlink:href</code> reference to the given
object instead than writing the full XML element.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newIdentifiedObject(org.apache.sis.xml.MarshalContext,java.lang.Class,org.opengis.metadata.Identifier...)">newIdentifiedObject</a></span>&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/Identifier.html?is-external=true" title="class or interface in org.opengis.metadata" class="externalLink">Identifier</a>...&nbsp;identifiers)</code></th>
<td class="colLast">
<div class="block">Returns an empty object of the given type having the given identifiers.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolve(org.apache.sis.xml.MarshalContext,java.lang.Class,java.util.UUID)">resolve</a></span>&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util" class="externalLink">UUID</a>&nbsp;uuid)</code></th>
<td class="colLast">
<div class="block">Returns an object of the given type for the given <code>uuid</code> attribute, or <code>null</code> if none.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolve(org.apache.sis.xml.MarshalContext,java.lang.Class,org.apache.sis.xml.XLink)">resolve</a></span>&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
<a href="XLink.html" title="class in org.apache.sis.xml">XLink</a>&nbsp;link)</code></th>
<td class="colLast">
<div class="block">Returns an object of the given type for the given <code>xlink</code> attribute, or <code>null</code> if none.</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="DEFAULT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT</h4>
<pre>public static final&nbsp;<a href="ReferenceResolver.html" title="class in org.apache.sis.xml">ReferenceResolver</a> DEFAULT</pre>
<div class="block">The default and thread-safe instance. This instance is used at unmarshalling time when
no <code>Reference­Resolver</code> was explicitly set by the <a href="XML.html#RESOLVER"><code>XML​.RESOLVER</code></a> property.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ReferenceResolver</h4>
<pre>protected&nbsp;ReferenceResolver()</pre>
<div class="block">Creates a default <code>Reference­Resolver</code>. This constructor is for subclasses only.</div>
</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="newIdentifiedObject(org.apache.sis.xml.MarshalContext,java.lang.Class,org.opengis.metadata.Identifier...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newIdentifiedObject</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;T&nbsp;newIdentifiedObject&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/Identifier.html?is-external=true" title="class or interface in org.opengis.metadata" class="externalLink">Identifier</a>...&nbsp;identifiers)</pre>
<div class="block">Returns an empty object of the given type having the given identifiers.
The object returned by the default implementation has the following properties:
<ul>
<li>Implements the given <code>type</code> interface.</li>
<li>Implements the <a href="NilObject.html" title="interface in org.apache.sis.xml"><code>Nil­Object</code></a> and <a href="IdentifiedObject.html" title="interface in org.apache.sis.xml"><code>Identified­Object</code></a> interfaces from this package.</li>
<li><a href="IdentifiedObject.html#getIdentifiers()"><code>Identified­Object​.get­Identifiers()</code></a> will return the given identifiers.</li>
<li><a href="IdentifiedObject.html#getIdentifierMap()"><code>Identified­Object​.get­Identifier­Map()</code></a> will return a <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>
view over the given identifiers.</li>
<li>All other methods except the ones inherited from the <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"><code>Object</code></a> class will return
an empty collection, an empty array, <code>null</code>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink"><code>Na­N</code></a>, 0 or
<code>false</code>, depending on the method return type.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.</dd>
<dd><code>type</code> - the type of object to be unmarshalled, often as a GeoAPI interface.</dd>
<dd><code>identifiers</code> - an arbitrary amount of identifiers. For each identifier,
the <a href="../referencing/ImmutableIdentifier.html#getAuthority()">authority</a>
is typically (but not necessarily) one of the constants defined in <a href="IdentifierSpace.html" title="interface in org.apache.sis.xml"><code>Identifier­Space</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an object of the given type for the given identifiers, or <code>null</code> if none.</dd>
</dl>
</li>
</ul>
<a id="resolve(org.apache.sis.xml.MarshalContext,java.lang.Class,java.util.UUID)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resolve</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;T&nbsp;resolve&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util" class="externalLink">UUID</a>&nbsp;uuid)</pre>
<div class="block">Returns an object of the given type for the given <code>uuid</code> attribute, or <code>null</code> if none.
The default implementation returns <code>null</code> in all cases.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.</dd>
<dd><code>type</code> - the type of object to be unmarshalled, often as a GeoAPI interface.</dd>
<dd><code>uuid</code> - the <code>uuid</code> attributes.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an object of the given type for the given <code>uuid</code> attribute, or <code>null</code> if none.</dd>
</dl>
</li>
</ul>
<a id="resolve(org.apache.sis.xml.MarshalContext,java.lang.Class,org.apache.sis.xml.XLink)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resolve</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;T&nbsp;resolve&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
<a href="XLink.html" title="class in org.apache.sis.xml">XLink</a>&nbsp;link)</pre>
<div class="block">Returns an object of the given type for the given <code>xlink</code> attribute, or <code>null</code> if none.
The default implementation performs the following lookups:
<ul>
<li>If the <a href="XLink.html#getHRef()"><code>xlink:href</code></a> attribute is a <a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true#getFragment()" title="class or interface in java.net" class="externalLink">URI fragment</a>
of the form <code>"#foo"</code> and if an object of class <code>type</code> with the <code>gml:id="foo"</code> attribute
has previously been seen in the same XML document, then that object is returned.</li>
<li>Otherwise returns <code>null</code>.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.</dd>
<dd><code>type</code> - the type of object to be unmarshalled, often as a GeoAPI interface.</dd>
<dd><code>link</code> - the <code>xlink</code> attributes.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an object of the given type for the given <code>xlink</code> attribute, or <code>null</code> if none.</dd>
</dl>
</li>
</ul>
<a id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,java.lang.Object,java.lang.String)">
<!-- -->
</a><a id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canSubstituteByReference</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;boolean&nbsp;canSubstituteByReference&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
T&nbsp;object,
<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;id)</pre>
<div class="block">Returns <code>true</code> if the marshaller can use a <code>xlink:href="#id"</code> reference to the given object
instead than writing the full XML element. This method is invoked by the marshaller when:
<ul>
<li>The given object has already been marshalled in the same XML document.</li>
<li>The marshalled object had a <code>gml:id</code> attribute
<ul>
<li>either specified explicitly by
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true#put(K,V)" title="class or interface in java.util" class="externalLink">Identifier­Map​.put</a>(<a href="IdentifierSpace.html#ID">Identifier­Space​.ID</a>, id)</code></li>
<li>or inferred automatically by the marshalled object
(e.g. <a href="../referencing/AbstractIdentifiedObject.html" title="class in org.apache.sis.referencing"><code>Abstract­Identified­Object</code></a>).</li>
</ul>
</li>
</ul>
Note that if this method returns <code>true</code>, then the use of <code>xlink:href="#id"</code> will have
precedence over <a href="#canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,java.util.UUID)">UUID</a>
and <a href="#canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,org.apache.sis.xml.XLink)">XLink alternatives</a>.
<p>The default implementation unconditionally returns <code>true</code>.
Subclasses can override this method if they want to filter which objects to declare by reference.</p></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.</dd>
<dd><code>type</code> - the type of object to be unmarshalled, often as a GeoAPI interface.</dd>
<dd><code>object</code> - the object to be marshalled.</dd>
<dd><code>id</code> - the <code>gml:id</code> value of the object to be marshalled.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the marshaller can use the <code>xlink:href="#id"</code> attribute
instead than marshalling the given object.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.7</dd>
</dl>
</li>
</ul>
<a id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,java.lang.Object,java.util.UUID)">
<!-- -->
</a><a id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,java.util.UUID)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canSubstituteByReference</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;boolean&nbsp;canSubstituteByReference&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
T&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util" class="externalLink">UUID</a>&nbsp;uuid)</pre>
<div class="block">Returns <code>true</code> if the marshaller can use a reference to the given object
instead than writing the full XML element. This method is invoked when an object to
be marshalled has a UUID identifier. Because those object may be defined externally,
SIS can not know if the object shall be fully marshalled or not.
Such information needs to be provided by the application.
<p>The default implementation returns <code>true</code> in the following cases:</p>
<ul>
<li>If <code>object</code> implements <a href="NilObject.html" title="interface in org.apache.sis.xml"><code>Nil­Object</code></a>.</li>
<li>If <code>object</code> implements <a href="../util/Emptiable.html" title="interface in org.apache.sis.util"><code>Emptiable</code></a> and its <code>is­Empty()</code> method returns <code>true</code>.</li>
</ul>
Subclasses can override this method if they know whether the receiver will be able to resolve the reference.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.</dd>
<dd><code>type</code> - the type of object to be unmarshalled, often as a GeoAPI interface.</dd>
<dd><code>object</code> - the object to be marshalled.</dd>
<dd><code>uuid</code> - the unique identifier of the object to be marshalled.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the marshaller can use the <code>uuidref</code> attribute
instead than marshalling the given object.</dd>
</dl>
</li>
</ul>
<a id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,java.lang.Object,org.apache.sis.xml.XLink)">
<!-- -->
</a><a id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,org.apache.sis.xml.XLink)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canSubstituteByReference</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;boolean&nbsp;canSubstituteByReference&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;type,
T&nbsp;object,
<a href="XLink.html" title="class in org.apache.sis.xml">XLink</a>&nbsp;link)</pre>
<div class="block">Returns <code>true</code> if the marshaller can use a <code>xlink:href</code> reference to the given
object instead than writing the full XML element. This method is invoked when an object to be
marshalled has a <a href="XLink.html" title="class in org.apache.sis.xml"><code>XLink</code></a> identifier. Because those object may be defined externally,
SIS can not know if the object shall be fully marshalled or not.
Such information needs to be provided by the application.
<p>The default implementation returns <code>true</code> in the following cases:</p>
<ul>
<li>If <code>object</code> implements <a href="NilObject.html" title="interface in org.apache.sis.xml"><code>Nil­Object</code></a>.</li>
<li>If <code>object</code> implements <a href="../util/Emptiable.html" title="interface in org.apache.sis.util"><code>Emptiable</code></a> and its <code>is­Empty()</code> method returns <code>true</code>.</li>
</ul>
Subclasses can override this method if they know whether the receiver will be able to resolve the reference.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.</dd>
<dd><code>type</code> - the type of object to be unmarshalled, often as a GeoAPI interface.</dd>
<dd><code>object</code> - the object to be marshalled.</dd>
<dd><code>link</code> - the reference of the object to be marshalled.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the marshaller can use the <code>xlink:href</code> attribute
instead than marshalling the given object.</dd>
</dl>
</li>
</ul>
<a id="anchor(org.apache.sis.xml.MarshalContext,java.lang.Object,java.lang.CharSequence)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>anchor</h4>
<pre class="methodSignature">public&nbsp;<a href="XLink.html" title="class in org.apache.sis.xml">XLink</a>&nbsp;anchor&#8203;(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a>&nbsp;context,
<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;value,
<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">CharSequence</a>&nbsp;text)</pre>
<div class="block">Returns the <code>&lt;gcx:Anchor&gt;</code> to use for the given text, or <code>null</code> if none.
Anchors can appear in ISO 19115-3 documents where we would normally expect a character sequence.
For example:
<table class="sis">
<caption>XML representations of string</caption>
<tr>
<th>As <code>&lt;gco:Character­String&gt;</code></th>
<th>As <code>&lt;gcx:Anchor&gt;</code></th>
</tr><tr>
<td>
<pre> &lt;cit:country&gt;
&lt;gco:CharacterString&gt;France&lt;/gco:CharacterString&gt;
&lt;/cit:country&gt;</pre>
</td><td>
<pre> &lt;cit:country&gt;
&lt;gcx:Anchor xlink:href="SDN:C320:2:FR"&gt;France&lt;/gcx:Anchor&gt;
&lt;/cit:country&gt;</pre>
</td></tr>
</table>
Subclasses can override this method if they can provide a mapping from some text values to anchors.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.</dd>
<dd><code>value</code> - the value for which an anchor is requested. Often the same instance than <code>text</code>,
but can also be the <a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net" class="externalLink"><code>URI</code></a> or <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> instance for which
<code>text</code> is a string representation.</dd>
<dd><code>text</code> - the textual representation of the value for which to get the anchor.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the anchor for the given text, or <code>null</code> if none.</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/ReferenceResolver.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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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>