| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>NilObject (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.NilObject interface"> |
| <meta name="keywords" content="getNilReason()"> |
| <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="NilObject (Apache SIS 1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/NilObject.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 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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"> </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> <a href="package-summary.html">org.apache.sis.xml</a></div> |
| <h2 title="Interface NilObject" class="title">Interface NilObject</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public interface <span class="typeNameLabel">NilObject</span></pre> |
| <div class="block">A marker interface for nil XML elements providing an explanation about why the information is absent. |
| GeoAPI getter methods usually return a <code>null</code> value when no information is available for |
| a given attribute. However it is possible to specify why an information is absent, in which case |
| the corresponding getter method will rather return an instance of this <code>NilObject</code> interface. |
| The information may be absent for various reasons, including the attribute being inapplicable in the metadata context |
| (<a href="NilReason.html#INAPPLICABLE"><code>NilReason.INAPPLICABLE</code></a>), the information probably exists but is unknown to the data provider |
| (<a href="NilReason.html#UNKNOWN"><code>UNKNOW</code></a>), the information may not exist at all (<a href="NilReason.html#MISSING"><code>MISSING</code></a>) or can not be divulged (<a href="NilReason.html#WITHHELD"><code>WITHHELD</code></a>). |
| |
| <p>Nil objects appear most frequently in XML documents because if a mandatory ISO 19115-1 attribute |
| is absent, then the ISO 19115-3 standard requires us to said why it is absent. The following example |
| shows a <code>CI_Citation</code> fragment with an ordinary <code>CI_Series</code> element on the left side, |
| and an unknown <code>CI_Series</code> element on the right side:</p> |
| |
| <table class="sis"> |
| <caption>Example of missing object</caption> |
| <tr> |
| <th>Normal <code>Series</code> element</th> |
| <th>Unknown <code>Series</code> element</th> |
| </tr><tr><td> |
| <blockquote><pre><cit:CI_Citation> |
| <cit:series> |
| <cit:CI_Series> |
| <!-- Some content here --> |
| </cit:CI_Series> |
| </cit:series> |
| </cit:CI_Citation></pre></blockquote> |
| </td><td> |
| <blockquote><pre><cit:CI_Citation> |
| <cit:series nilReason="unknown"/> |
| </cit:CI_Citation></pre></blockquote> |
| </td></tr></table> |
| |
| If the <code>CI_Series</code> element was completely omitted, then <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/citation/Citation.html?is-external=true#getSeries()" title="class or interface in org.opengis.metadata.citation" class="externalLink"><code>Citation.getSeries()</code></a> |
| method would return <code>null</code> in Apache SIS implementation. But since a <code>nilReason</code> is provided, |
| then the SIS implementation of <code>getSeries()</code> will rather return an object which implement |
| both the <code>Series</code> and the <code>NilObject</code> interfaces, and the <a href="#getNilReason()"><code>getNilReason()</code></a> method |
| on that instance will return the <a href="NilReason.html#UNKNOWN"><code>NilReason.UNKNOWN</code></a> constant. |
| |
| <div class="section">Instantiation</div> |
| Instances of <code>NilObject</code> are created by first fetching the reason why the information |
| is missing, then invoking <a href="NilReason.html#createNilObject(java.lang.Class)"><code>NilReason.createNilObject(Class)</code></a>. The following example |
| instantiates a <code>Citation</code> object which is nil because the information are missing: |
| |
| <blockquote><pre>Citation nil = NilReason.MISSING.<b>createNilObject</b>(Citation.<font color="green">class</font>);</pre></blockquote></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.3</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="NilReason.html#createNilObject(java.lang.Class)"><code>NilReason.createNilObject(Class)</code></a>, |
| <a href="../util/Numbers.html#valueOfNil(java.lang.Class)"><code>Numbers.valueOfNil(Class)</code></a></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"> |
| <!-- ========== 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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </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="NilReason.html" title="class in org.apache.sis.xml">NilReason</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNilReason()">getNilReason</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the reason why this object contains no information.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="getNilReason()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getNilReason</h4> |
| <pre class="methodSignature"><a href="NilReason.html" title="class in org.apache.sis.xml">NilReason</a> getNilReason()</pre> |
| <div class="block">Returns the reason why this object contains no information.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the reason why this object contains no information.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="NilReason.html#forObject(java.lang.Object)"><code>NilReason.forObject(Object)</code></a></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/NilObject.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 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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 © 2010–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |