| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>ReferenceResolver (Apache SIS 1.4 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2023-10-05"> |
| <meta name="description" content="declaration: module: org.apache.sis.metadata, package: org.apache.sis.xml, class: ReferenceResolver"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <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="../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.6.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var pathtoroot = "../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span></button> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="../../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Summary:</p> |
| <ul> |
| <li>Nested</li> |
| <li><a href="#field-summary">Field</a></li> |
| <li><a href="#constructor-summary">Constr</a></li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| </li> |
| <li> |
| <p>Detail:</p> |
| <ul> |
| <li><a href="#field-detail">Field</a></li> |
| <li><a href="#constructor-detail">Constr</a></li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field-summary">Field</a> | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li><a href="#field-detail">Field</a> | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><a href="../../../../../search.html">SEARCH</a> |
| <input type="text" id="search-input" disabled placeholder="Search"> |
| <input type="reset" id="reset-button" disabled value="reset"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="module-label-in-type">Module</span> <a href="../../../../module-summary.html">org.apache.sis.metadata</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.xml</a></div> |
| <h1 title="Class ReferenceResolver" class="title">Class ReferenceResolver</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| <div class="inheritance">ReferenceResolver</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">ReferenceResolver</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div> |
| <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 of 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>ReferenceResolver</code> |
| to a unmarshaller.</p></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.3</dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <li> |
| <section class="field-summary" id="field-summary"> |
| <h2>Field Summary</h2> |
| <div class="caption"><span>Fields</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Field</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>static final <a href="ReferenceResolver.html" title="class in org.apache.sis.xml">ReferenceResolver</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#DEFAULT" class="member-name-link">DEFAULT</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">The default and thread-safe instance.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier</div> |
| <div class="table-header col-second">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>protected </code></div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">ReferenceResolver</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a default <code>ReferenceResolver</code>.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="XLink.html" title="class in org.apache.sis.xml">XLink</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#anchor(org.apache.sis.xml.MarshalContext,java.lang.Object,java.lang.CharSequence)" class="member-name-link">anchor</a><wbr>(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> value, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> text)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the <code><gcx:Anchor></code> to use for the given text, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><T> boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,java.lang.String)" class="member-name-link">canSubstituteByReference</a><wbr>(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| T object, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> id)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if the marshaller can use a <code>xlink:href="#id"</code> reference to the given object |
| instead of writing the full XML element.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><T> boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,java.util.UUID)" class="member-name-link">canSubstituteByReference</a><wbr>(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| T object, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a> uuid)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if the marshaller can use a reference to the given object |
| instead of writing the full XML element.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><T> boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,org.apache.sis.xml.XLink)" class="member-name-link">canSubstituteByReference</a><wbr>(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| T object, |
| <a href="XLink.html" title="class in org.apache.sis.xml">XLink</a> link)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if the marshaller can use a <code>xlink:href</code> reference to the given |
| object instead of writing the full XML element.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><T> T</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#newIdentifiedObject(org.apache.sis.xml.MarshalContext,java.lang.Class,org.opengis.metadata.Identifier...)" class="member-name-link">newIdentifiedObject</a><wbr>(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Identifier.html" title="class or interface in org.opengis.metadata" class="external-link">Identifier</a>... identifiers)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns an empty object of the given type having the given identifiers.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><T> T</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#resolve(org.apache.sis.xml.MarshalContext,java.lang.Class,java.util.UUID)" class="member-name-link">resolve</a><wbr>(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a> uuid)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns an object of the given type for the given <code>uuid</code> attribute, or <code>null</code> if none.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><T> T</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#resolve(org.apache.sis.xml.MarshalContext,java.lang.Class,org.apache.sis.xml.XLink)" class="member-name-link">resolve</a><wbr>(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| <a href="XLink.html" title="class in org.apache.sis.xml">XLink</a> link)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns an object of the given type for the given <code>xlink</code> attribute, or <code>null</code> if none.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-Object">Methods inherited from class <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <li> |
| <section class="field-details" id="field-detail"> |
| <h2>Field Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="DEFAULT"> |
| <h3>DEFAULT</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="ReferenceResolver.html" title="class in org.apache.sis.xml">ReferenceResolver</a></span> <span class="element-name">DEFAULT</span></div> |
| <div class="block">The default and thread-safe instance. This instance is used at unmarshalling time when |
| no <code>ReferenceResolver</code> was explicitly set by the <a href="XML.html#RESOLVER"><code>XML.RESOLVER</code></a> property.</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>ReferenceResolver</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="element-name">ReferenceResolver</span>()</div> |
| <div class="block">Creates a default <code>ReferenceResolver</code>. This constructor is for subclasses only.</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="newIdentifiedObject(org.apache.sis.xml.MarshalContext,java.lang.Class,org.opengis.metadata.Identifier...)"> |
| <h3>newIdentifiedObject</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><T></span> <span class="return-type">T</span> <span class="element-name">newIdentifiedObject</span><wbr><span class="parameters">(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/Identifier.html" title="class or interface in org.opengis.metadata" class="external-link">Identifier</a>... identifiers)</span></div> |
| <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>NilObject</code></a> and <a href="IdentifiedObject.html" title="interface in org.apache.sis.xml"><code>IdentifiedObject</code></a> interfaces from this package.</li> |
| <li><a href="IdentifiedObject.html#getIdentifiers()"><code>IdentifiedObject.getIdentifiers()</code></a> will return the given identifiers.</li> |
| <li><a href="IdentifiedObject.html#getIdentifierMap()"><code>IdentifiedObject.getIdentifierMap()</code></a> will return a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map</code></a> |
| view over the given identifiers.</li> |
| <li>All other methods except the ones inherited from the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link"><code>Object</code></a> class will return |
| an empty collection, an empty array, <code>null</code>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double.NaN</code></a>, 0 or <code>false</code>, |
| depending on the method return type.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd> |
| <dt>Parameters:</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 number of identifiers. For each identifier, |
| the <a href="../../../../../org.apache.sis.referencing/org/apache/sis/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>IdentifierSpace</code></a>.</dd> |
| <dt>Returns:</dt> |
| <dd>an object of the given type for the given identifiers, or <code>null</code> if none.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="resolve(org.apache.sis.xml.MarshalContext,java.lang.Class,java.util.UUID)"> |
| <h3>resolve</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><T></span> <span class="return-type">T</span> <span class="element-name">resolve</span><wbr><span class="parameters">(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a> uuid)</span></div> |
| <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 class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd> |
| <dt>Parameters:</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>Returns:</dt> |
| <dd>an object of the given type for the given <code>uuid</code> attribute, or <code>null</code> if none.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="resolve(org.apache.sis.xml.MarshalContext,java.lang.Class,org.apache.sis.xml.XLink)"> |
| <h3>resolve</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><T></span> <span class="return-type">T</span> <span class="element-name">resolve</span><wbr><span class="parameters">(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| <a href="XLink.html" title="class in org.apache.sis.xml">XLink</a> link)</span></div> |
| <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/en/java/javase/11/docs/api/java.base/java/net/URI.html#getFragment()" title="class or interface in java.net" class="external-link">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 class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd> |
| <dt>Parameters:</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>Returns:</dt> |
| <dd>an object of the given type for the given <code>xlink</code> attribute, or <code>null</code> if none.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,java.lang.String)"> |
| <h3 id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,java.lang.Object,java.lang.String)">canSubstituteByReference</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><T></span> <span class="return-type">boolean</span> <span class="element-name">canSubstituteByReference</span><wbr><span class="parameters">(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| T object, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> id)</span></div> |
| <div class="block">Returns <code>true</code> if the marshaller can use a <code>xlink:href="#id"</code> reference to the given object |
| instead of 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/en/java/javase/11/docs/api/java.base/java/util/Map.html#put(K,V)" title="class or interface in java.util" class="external-link">IdentifierMap.put</a>(<a href="IdentifierSpace.html#ID">IdentifierSpace.ID</a>, id)</code></li> |
| <li>or inferred automatically by the marshalled object |
| (e.g. <a href="../../../../../org.apache.sis.referencing/org/apache/sis/referencing/AbstractIdentifiedObject.html" title="class in org.apache.sis.referencing"><code>AbstractIdentifiedObject</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 class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd> |
| <dt>Parameters:</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>Returns:</dt> |
| <dd><code>true</code> if the marshaller can use the <code>xlink:href="#id"</code> attribute |
| instead of marshalling the given object.</dd> |
| <dt>Since:</dt> |
| <dd>0.7</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,java.util.UUID)"> |
| <h3 id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,java.lang.Object,java.util.UUID)">canSubstituteByReference</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><T></span> <span class="return-type">boolean</span> <span class="element-name">canSubstituteByReference</span><wbr><span class="parameters">(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| T object, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a> uuid)</span></div> |
| <div class="block">Returns <code>true</code> if the marshaller can use a reference to the given object |
| instead of 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 cannot 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>NilObject</code></a>.</li> |
| <li>If <code>object</code> implements <a href="../../../../../org.apache.sis.util/org/apache/sis/util/Emptiable.html" title="interface in org.apache.sis.util"><code>Emptiable</code></a> and its <code>isEmpty()</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 class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd> |
| <dt>Parameters:</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>Returns:</dt> |
| <dd><code>true</code> if the marshaller can use the <code>uuidref</code> attribute |
| instead of marshalling the given object.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,T,org.apache.sis.xml.XLink)"> |
| <h3 id="canSubstituteByReference(org.apache.sis.xml.MarshalContext,java.lang.Class,java.lang.Object,org.apache.sis.xml.XLink)">canSubstituteByReference</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><T></span> <span class="return-type">boolean</span> <span class="element-name">canSubstituteByReference</span><wbr><span class="parameters">(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><T> type, |
| T object, |
| <a href="XLink.html" title="class in org.apache.sis.xml">XLink</a> link)</span></div> |
| <div class="block">Returns <code>true</code> if the marshaller can use a <code>xlink:href</code> reference to the given |
| object instead of 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 cannot 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>NilObject</code></a>.</li> |
| <li>If <code>object</code> implements <a href="../../../../../org.apache.sis.util/org/apache/sis/util/Emptiable.html" title="interface in org.apache.sis.util"><code>Emptiable</code></a> and its <code>isEmpty()</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 class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>T</code> - the compile-time type of the <code>type</code> argument.</dd> |
| <dt>Parameters:</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>Returns:</dt> |
| <dd><code>true</code> if the marshaller can use the <code>xlink:href</code> attribute |
| instead of marshalling the given object.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="anchor(org.apache.sis.xml.MarshalContext,java.lang.Object,java.lang.CharSequence)"> |
| <h3>anchor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="XLink.html" title="class in org.apache.sis.xml">XLink</a></span> <span class="element-name">anchor</span><wbr><span class="parameters">(<a href="MarshalContext.html" title="class in org.apache.sis.xml">MarshalContext</a> context, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> value, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> text)</span></div> |
| <div class="block">Returns the <code><gcx:Anchor></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><gco:CharacterString></code></th> |
| <th>As <code><gcx:Anchor></code></th> |
| </tr><tr> |
| <td> |
| <pre> <cit:country> |
| <gco:CharacterString>France</gco:CharacterString> |
| </cit:country></pre> |
| </td><td> |
| <pre> <cit:country> |
| <gcx:Anchor xlink:href="SDN:C320:2:FR">France</gcx:Anchor> |
| </cit:country></pre> |
| </td></tr> |
| </table> |
| |
| Subclasses can override this method if they can provide a mapping from some text values to anchors.</div> |
| <dl class="notes"> |
| <dt>Parameters:</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/en/java/javase/11/docs/api/java.base/java/net/URI.html" title="class or interface in java.net" class="external-link"><code>URI</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link"><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>Returns:</dt> |
| <dd>the anchor for the given text, or <code>null</code> if none.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |