| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>AbstractFeature (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.feature, package: org.apache.sis.feature, class: AbstractFeature"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.feature.AbstractFeature class"> |
| <meta name="keywords" content="getType()"> |
| <meta name="keywords" content="getProperty()"> |
| <meta name="keywords" content="setProperty()"> |
| <meta name="keywords" content="getPropertyValue()"> |
| <meta name="keywords" content="setPropertyValue()"> |
| <meta name="keywords" content="getValueOrFallback()"> |
| <meta name="keywords" content="getOperationValue()"> |
| <meta name="keywords" content="setOperationValue()"> |
| <meta name="keywords" content="quality()"> |
| <meta name="keywords" content="toString()"> |
| <meta name="keywords" content="hashCode()"> |
| <meta name="keywords" content="equals()"> |
| <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>Field</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>Field</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>Field | </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>Field | </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.feature</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.feature</a></div> |
| <h1 title="Class AbstractFeature" class="title">Class AbstractFeature</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">AbstractFeature</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">AbstractFeature</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> |
| implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></span></div> |
| <div class="block">An instance of a <a href="DefaultFeatureType.html" title="class in org.apache.sis.feature">feature type</a> containing values for a real-world phenomena. |
| Each feature instance can provide values for the following properties: |
| |
| <ul> |
| <li><a href="AbstractAttribute.html" title="class in org.apache.sis.feature">Attributes</a></li> |
| <li><a href="AbstractAssociation.html" title="class in org.apache.sis.feature">Associations to other features</a></li> |
| <li><a href="AbstractOperation.html" title="class in org.apache.sis.feature">Operations</a></li> |
| </ul> |
| |
| <code>AbstractFeature</code> can be instantiated by calls to <a href="DefaultFeatureType.html#newInstance()"><code>DefaultFeatureType.newInstance()</code></a>. |
| |
| <h2 id="simple-features-heading">Simple features</h2> |
| A feature is said “simple” if it complies to the following conditions: |
| <ul> |
| <li>the feature allows only attributes and operations (no associations),</li> |
| <li>the cardinality of all attributes is constrained to [1 … 1].</li> |
| </ul> |
| |
| <h2 id="operations-heading">Operations</h2> |
| Properties that are instances of <code>Operation</code> are usually not stored in <code>Feature</code> instances. |
| Instead, the <a href="AbstractOperation.html#apply(org.apache.sis.feature.AbstractFeature,org.opengis.parameter.ParameterValueGroup)"><code>Operation.apply(…)</code></a> method is invoked every times that the property |
| value is requested. <code>AbstractFeature</code> does not cache operation results. |
| Those results are usually read-only, but may be writable under the conditions documented in |
| <a href="#setOperationValue(java.lang.String,java.lang.Object)"><code>setOperationValue(String, Object)</code></a>. |
| |
| <h2 id="limitations-heading">Limitations</h2> |
| <ul> |
| <li><b>Multi-threading:</b> <code>AbstractFeature</code> instances are <strong>not</strong> thread-safe. |
| Synchronization, if needed, shall be done externally by the caller.</li> |
| <li><b>Serialization:</b> serialized objects of this class are not guaranteed to be compatible with future |
| versions. Serialization should be used only for short term storage or RMI between applications running |
| the same SIS version.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.5</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="DefaultFeatureType.html#newInstance()"><code>DefaultFeatureType.newInstance()</code></a></li> |
| <li><a href="../../../../../serialized-form.html#org.apache.sis.feature.AbstractFeature">Serialized Form</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== 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(org.apache.sis.feature.DefaultFeatureType)" class="member-name-link">AbstractFeature</a><wbr>(<a href="DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> type)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new feature of the given type.</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-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract 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>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(<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> obj)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Compares this feature with the given object for equality.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <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></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getOperationValue(java.lang.String)" class="member-name-link">getOperationValue</a><wbr>(<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> name)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Executes the parameterless operation of the given name and returns the value of its result.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><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></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getProperty(java.lang.String)" class="member-name-link">getProperty</a><wbr>(<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> name)</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 property (attribute, feature association or operation result) of the given name.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <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></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getPropertyValue(java.lang.String)" class="member-name-link">getPropertyValue</a><wbr>(<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> name)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the value for the property of the given name.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getType()" class="member-name-link">getType</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns information about the feature (name, characteristics, <i>etc.</i>).</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <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></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getValueOrFallback(java.lang.String,java.lang.Object)" class="member-name-link">getValueOrFallback</a><wbr>(<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> name, |
| <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> missingPropertyFallback)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the value for the property of the given name if that property exists, or a fallback value otherwise.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hashCode()" class="member-name-link">hashCode</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a hash code value for this feature.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/quality/DataQuality.html" title="class or interface in org.opengis.metadata.quality" class="external-link">DataQuality</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#quality()" class="member-name-link">quality</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Evaluates the quality of this feature at this method invocation time.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setOperationValue(java.lang.String,java.lang.Object)" class="member-name-link">setOperationValue</a><wbr>(<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> name, |
| <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)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Executes the parameterless operation of the given name and sets the value of its result.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setProperty(java.lang.Object)" class="member-name-link">setProperty</a><wbr>(<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> property)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the property (attribute or feature association).</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setPropertyValue(java.lang.String,java.lang.Object)" class="member-name-link">setPropertyValue</a><wbr>(<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> name, |
| <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)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Sets the value for the property of the given name.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><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></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Formats this feature in a tabular format.</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#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#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#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"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>(org.apache.sis.feature.DefaultFeatureType)"> |
| <h3>AbstractFeature</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="element-name">AbstractFeature</span><wbr><span class="parameters">(<a href="DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a> type)</span></div> |
| <div class="block">Creates a new feature of the given type.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - information about the feature (name, characteristics, <i>etc.</i>).</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="DefaultFeatureType.html#newInstance()"><code>DefaultFeatureType.newInstance()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="getType()"> |
| <h3>getType</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a></span> <span class="element-name">getType</span>()</div> |
| <div class="block">Returns information about the feature (name, characteristics, <i>etc.</i>). |
| |
| <div class="warning"><b>Warning:</b> In a future SIS version, the return type may be changed |
| to <code>org.opengis.feature.FeatureType</code>. This change is pending GeoAPI revision.</div></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>information about the feature.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getProperty(java.lang.String)"> |
| <h3>getProperty</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><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> <span class="element-name">getProperty</span><wbr><span class="parameters">(<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> name)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div> |
| <div class="block">Returns the property (attribute, feature association or operation result) of the given name. |
| If the property type is a parameterless <a href="AbstractOperation.html" title="class in org.apache.sis.feature">operation</a>, then this |
| method may return the result of <a href="AbstractOperation.html#apply(org.apache.sis.feature.AbstractFeature,org.opengis.parameter.ParameterValueGroup)">executing</a> the operation |
| on this feature, at implementation choice. |
| |
| <p>This method returns the property <em>instance</em>. If only the property <em>value</em> is |
| desired, then <a href="#getPropertyValue(java.lang.String)"><code>getPropertyValue(String)</code></a> is preferred since it gives to SIS a chance to |
| avoid the creation of <a href="AbstractAttribute.html" title="class in org.apache.sis.feature"><code>AbstractAttribute</code></a> or <a href="AbstractAssociation.html" title="class in org.apache.sis.feature"><code>AbstractAssociation</code></a> instances.</p> |
| |
| <h4 id="note-for-subclass-implementers-heading">Note for subclass implementers</h4> |
| The default implementation returns an instance that redirect all read and write operations to |
| <a href="#getPropertyValue(java.lang.String)"><code>getPropertyValue(String)</code></a> and <a href="#setPropertyValue(java.lang.String,java.lang.Object)"><code>setPropertyValue(String, Object)</code></a> respectively. |
| That default implementation is intended to make easier for developers to create their own |
| customized <code>AbstractFacture</code> implementations, but has drawbacks: |
| a new <code>Property</code> instance is created every time that this <code>getProperty(String)</code> method is invoked, |
| and the returned <code>Property</code> implementation is not very efficient |
| since it has to perform multiple lookups and type checks. |
| Implementers are encouraged to override this method if they can provide a more efficient implementation. |
| Note that this is already the case when using implementations created by <a href="DefaultFeatureType.html#newInstance()"><code>DefaultFeatureType.newInstance()</code></a>. |
| |
| <div class="warning"><b>Warning:</b> In a future SIS version, the return type may be changed |
| to <code>org.opengis.feature.Property</code>. This change is pending GeoAPI revision.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - the property name.</dd> |
| <dt>Returns:</dt> |
| <dd>the property of the given name (never <code>null</code>).</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the given argument is not a property name of this feature.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="#getPropertyValue(java.lang.String)"><code>getPropertyValue(String)</code></a></li> |
| <li><a href="DefaultFeatureType.html#getProperty(java.lang.String)"><code>DefaultFeatureType.getProperty(String)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setProperty(java.lang.Object)"> |
| <h3>setProperty</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setProperty</span><wbr><span class="parameters">(<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> property)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div> |
| <div class="block">Sets the property (attribute or feature association). |
| The given property shall comply to the following conditions: |
| |
| <ul> |
| <li>It must be non-null.</li> |
| <li>Its name shall be the name of the property to set in this feature.</li> |
| <li>Its type shall be the same instance than the <a href="DefaultFeatureType.html#getProperty(java.lang.String)">property type</a> defined by the feature type for the above name. |
| In other words, the following condition shall hold:</li> |
| </ul> |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">assert property.getType() == getType().getProperty(property.getName()); |
| </code></pre> |
| </div> |
| |
| |
| This method is useful for storing non-default <code>Attribute</code> or <code>FeatureAssociation</code> implementations |
| in this feature. When default implementations are sufficient, the <a href="#setPropertyValue(java.lang.String,java.lang.Object)"><code>setPropertyValue(String, Object)</code></a> |
| method is preferred. |
| |
| <h4 id="note-for-subclass-implementers-heading1">Note for subclass implementers</h4> |
| The default implementation verifies that the given property has the expected type and a null or empty |
| <a href="AbstractAttribute.html#characteristics()">map of characteristics</a>, then delegates to |
| <a href="#setPropertyValue(java.lang.String,java.lang.Object)"><code>setPropertyValue(String, Object)</code></a>. |
| That default implementation is intended to make easier for developers to create their own |
| customized <code>AbstractFacture</code> implementations, but has drawbacks: |
| the given <code>Property</code> instance is not stored (only its <a href="AbstractAttribute.html#getValue()">value</a> |
| is stored), and it cannot have custom <a href="AbstractAttribute.html#characteristics()">characteristics</a>. |
| Implementers are encouraged to override this method if they can provide a better implementation. |
| Note that this is already the case when using implementations created by <a href="DefaultFeatureType.html#newInstance()"><code>DefaultFeatureType.newInstance()</code></a>. |
| |
| <div class="warning"><b>Warning:</b> In a future SIS version, the argument may be changed |
| to <code>org.opengis.feature.Property</code>. This change is pending GeoAPI revision.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>property</code> - the property to set.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the name of the given property is not a property name of this feature.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the value of the given property is not valid.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the property cannot be set for another reason.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="#setPropertyValue(java.lang.String,java.lang.Object)"><code>setPropertyValue(String, Object)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getPropertyValue(java.lang.String)"> |
| <h3>getPropertyValue</h3> |
| <div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type"><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> <span class="element-name">getPropertyValue</span><wbr><span class="parameters">(<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> name)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div> |
| <div class="block">Returns the value for the property of the given name. |
| This convenience method is equivalent to invoking <a href="#getProperty(java.lang.String)"><code>getProperty(String)</code></a> for the given name, |
| then to perform one of the following actions depending on the property type and the multiplicity: |
| |
| <table class="sis"> |
| <caption>Class of returned value</caption> |
| <tr><th>Property type</th> <th>max. occurs</th> <th>Method invoked</th> <th>Return type</th></tr> |
| <tr><td><code>AttributeType</code></td> <td>0 or 1</td> <td><code>Attribute.getValue()</code></td> <td><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></td></tr> |
| <tr><td><code>AttributeType</code></td> <td>2 or more</td> <td><code>Attribute.getValues()</code></td> <td><code>Collection<?></code></td></tr> |
| <tr><td><code>FeatureAssociationRole</code></td> <td>0 or 1</td> <td><code>FeatureAssociation.getValue()</code></td> <td><code>Feature</code></td></tr> |
| <tr><td><code>FeatureAssociationRole</code></td> <td>2 or more</td> <td><code>FeatureAssociation.getValues()</code></td> <td><code>Collection<Feature></code></td></tr> |
| </table> |
| |
| <div class="note"><b>Note:</b> “max. occurs” is the <a href="DefaultAttributeType.html#getMaximumOccurs()">maximum |
| number of occurrences</a> and does not depend on the actual number of values. If an attribute allows more than one |
| value, then this method will always return a collection for that attribute even if the collection is empty.</div> |
| |
| <h4 id="multi-valued-properties-and-collections-heading">Multi-valued properties and collections</h4> |
| In the case of multi-valued properties (“max. occurs” > 1), the collection returned by this method may |
| or may not be modifiable, at implementation choice. Generally the caller cannot add new elements into the |
| returned collection anyway since <code>Collection<?></code> does not allow such operations, and more specific |
| casts (e.g. <code>Collection<String></code> cannot be checked at runtime. |
| If a type-safe modifiable collection is desired, the following approach can be used instead: |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">Attribute<String> attribute = Features.cast((Attribute<?>) feature.getProperty(name), String.class); |
| Collection<String> values = attribute.getValues(); // This collection is guaranteed to be "live". |
| </code></pre> |
| </div> |
| </div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - the property name.</dd> |
| <dt>Returns:</dt> |
| <dd>value of the specified property, or the |
| <a href="DefaultAttributeType.html#getDefaultValue()">default value</a> (which may be <code>null</code>} if none.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the given argument is not an attribute or association name of this feature.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="AbstractAttribute.html#getValue()"><code>AbstractAttribute.getValue()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setPropertyValue(java.lang.String,java.lang.Object)"> |
| <h3>setPropertyValue</h3> |
| <div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type">void</span> <span class="element-name">setPropertyValue</span><wbr><span class="parameters">(<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> name, |
| <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)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div> |
| <div class="block">Sets the value for the property of the given name. |
| |
| <h4 id="validation-heading">Validation</h4> |
| The amount of validation performed by this method is implementation dependent. |
| Usually, only the most basic constraints are verified. This is so for performance reasons |
| and also because some rules may be temporarily broken while constructing a feature. |
| A more exhaustive verification can be performed by invoking the <a href="#quality()"><code>quality()</code></a> method.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - the attribute name.</dd> |
| <dd><code>value</code> - the new value for the given attribute (may be <code>null</code>).</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the given name is not an attribute or association name of this feature.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the value is not assignable to the expected value class.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the given value is not valid for a reason other than its type.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="AbstractAttribute.html#setValue(V)"><code>AbstractAttribute.setValue(Object)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getValueOrFallback(java.lang.String,java.lang.Object)"> |
| <h3>getValueOrFallback</h3> |
| <div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type"><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> <span class="element-name">getValueOrFallback</span><wbr><span class="parameters">(<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> name, |
| <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> missingPropertyFallback)</span></div> |
| <div class="block">Returns the value for the property of the given name if that property exists, or a fallback value otherwise. |
| This method is equivalent to the following code, but potentially more efficient when the property does not exist: |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">try { |
| return getPropertyValue(name); |
| } catch (PropertyNotFoundException ignore) { |
| return missingPropertyFallback |
| } |
| </code></pre> |
| </div> |
| |
| |
| Note that if a property of the given name exists but has no value, then this method returns the |
| <a href="DefaultAttributeType.html#getDefaultValue()">default value</a> (which may be <code>null</code>). |
| <cite>Property without value</cite> is not equivalent to <cite>non-existent property</cite>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - the property name.</dd> |
| <dd><code>missingPropertyFallback</code> - the (potentially <code>null</code>) value to return |
| if no attribute or association of the given name exists.</dd> |
| <dt>Returns:</dt> |
| <dd>value or default value of the specified property, or <code>missingPropertyFallback</code> |
| if no attribute or association of that name exists. This value may be <code>null</code>.</dd> |
| <dt>Since:</dt> |
| <dd>1.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getOperationValue(java.lang.String)"> |
| <h3>getOperationValue</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><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> <span class="element-name">getOperationValue</span><wbr><span class="parameters">(<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> name)</span></div> |
| <div class="block">Executes the parameterless operation of the given name and returns the value of its result. |
| This is a convenience method for sub-classes where some properties may be operations that |
| <a href="AbstractOperation.html#getDependencies()">depend</a> on other properties of this <code>Feature</code> instance |
| (for example a <a href="FeatureOperations.html#link(java.util.Map,org.apache.sis.feature.AbstractIdentifiedType)">link</a> to another property value). |
| Invoking this method is equivalent to performing the following steps: |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java"> public Object getPropertyValue(String name) { |
| Operation operation = (Operation) type.getProperty(name); |
| Property result = operation.apply(this, null); |
| if (result instanceof Attribute<?>) { |
| return ...; // the attribute value. |
| } else if (result instanceof FeatureAssociation) { |
| return ...; // the associated feature. |
| } else { |
| return null; |
| } |
| } |
| </code></pre> |
| </div> |
| </div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - the name of the operation to execute. The caller is responsible to ensure that the |
| property type for that name is an instance of <a href="AbstractOperation.html" title="class in org.apache.sis.feature"><code>AbstractOperation</code></a>.</dd> |
| <dt>Returns:</dt> |
| <dd>the result value of the given operation, or <code>null</code> if none.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setOperationValue(java.lang.String,java.lang.Object)"> |
| <h3>setOperationValue</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">void</span> <span class="element-name">setOperationValue</span><wbr><span class="parameters">(<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> name, |
| <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)</span></div> |
| <div class="block">Executes the parameterless operation of the given name and sets the value of its result. |
| This method is the complement of <a href="#getOperationValue(java.lang.String)"><code>getOperationValue(String)</code></a> for subclasses where |
| some properties may be operations. Not all operations accept assignments, |
| but the <a href="FeatureOperations.html#link(java.util.Map,org.apache.sis.feature.AbstractIdentifiedType)">link</a> and |
| <a href="FeatureOperations.html#compound(java.util.Map,java.lang.String,java.lang.String,java.lang.String,org.apache.sis.feature.AbstractIdentifiedType...)">compound</a> operations (for instances) do. |
| Whether an operation is writable or not depends on whether the computed <code>Property</code> |
| supports <a href="AbstractAttribute.html#setValue(V)"><code>AbstractAttribute.setValue(Object)</code></a> or <a href="AbstractAssociation.html#setValue(org.apache.sis.feature.AbstractFeature)"><code>AbstractAssociation.setValue(Feature)</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - the name of the operation to execute. The caller is responsible to ensure that the |
| property type for that name is an instance of <a href="AbstractOperation.html" title="class in org.apache.sis.feature"><code>AbstractOperation</code></a>.</dd> |
| <dd><code>value</code> - the value to assign to the result of the named operation.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if the operation of the given name does not accept assignment.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="quality()"> |
| <h3>quality</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/quality/DataQuality.html" title="class or interface in org.opengis.metadata.quality" class="external-link">DataQuality</a></span> <span class="element-name">quality</span>()</div> |
| <div class="block">Evaluates the quality of this feature at this method invocation time. The data quality reports |
| may include information about whether the property values met the constraints defined by the |
| property types, or any other criterion at implementation choice. |
| |
| <p>The default implementation reports data quality with at least the following information:</p> |
| <ul> |
| <li> |
| The <a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/quality/DefaultDataQuality.html#getScope()">scope</a> |
| <a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/maintenance/DefaultScope.html#getLevel()">level</a> is set to |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/maintenance/ScopeCode.html#FEATURE" title="class or interface in org.opengis.metadata.maintenance" class="external-link"><code>ScopeCode.FEATURE</code></a>. |
| </li><li> |
| The <a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/quality/DefaultDataQuality.html#getReports()">reports</a> list contains |
| at most one <a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/quality/DefaultDomainConsistency.html" title="class in org.apache.sis.metadata.iso.quality">domain consistency</a> |
| element per property. Implementations are free to omit element for properties having nothing to report. |
| </li><li> |
| Each report may have one or more <a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.html" title="class in org.apache.sis.metadata.iso.quality">conformance result</a>, as documented on <a href="AbstractAttribute.html#quality()"><code>AbstractAttribute.quality()</code></a> javadoc. |
| </li> |
| </ul> |
| |
| This feature is valid if this method does not report any |
| <a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.html" title="class in org.apache.sis.metadata.iso.quality">conformance result</a> having a |
| <a href="../../../../../org.apache.sis.metadata/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.html#pass()">pass</a> value of <code>false</code>. |
| |
| <h4 id="example-heading">Example</h4> |
| Given a feature with an attribute named “population”. |
| If this attribute is mandatory ([1 … 1] multiplicity) but no value has been assigned to it, |
| then this <code>quality()</code> method will return the following data quality report: |
| |
| <pre class="text"> |
| Data quality |
| ├─Scope |
| │ └─Level………………………………………………… Feature |
| └─Report |
| ├─Measure identification |
| │ └─Code………………………………………… population |
| ├─Evaluation method type…… Direct internal |
| └─Result |
| ├─Explanation……………………… Missing value for “population” property. |
| └─Pass………………………………………… false</pre></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>reports on all constraint violations found.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="AbstractAttribute.html#quality()"><code>AbstractAttribute.quality()</code></a></li> |
| <li><a href="AbstractAssociation.html#quality()"><code>AbstractAssociation.quality()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toString()"> |
| <h3>toString</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><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></span> <span class="element-name">toString</span>()</div> |
| <div class="block">Formats this feature in a tabular format.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><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></code> in class <code><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></code></dd> |
| <dt>Returns:</dt> |
| <dd>a string representation of this feature in a tabular format.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="FeatureFormat.html" title="class in org.apache.sis.feature"><code>FeatureFormat</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="hashCode()"> |
| <h3>hashCode</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">hashCode</span>()</div> |
| <div class="block">Returns a hash code value for this feature. |
| The default implementation performs the following algorithm: |
| |
| <ul> |
| <li>Iterate over all properties returned by <code>type.getProperty(true)</code> – |
| thus including properties inherited from parent types (if any): |
| <ul> |
| <li>For each property type, get the value with <a href="#getPropertyValue(java.lang.String)"><code>getPropertyValue(String)</code></a>.</li> |
| <li>Compute the hash code from the property name and value, ignoring the properties |
| having a null value.</li> |
| </ul></li> |
| </ul> |
| |
| Subclasses should override this method with a more efficient algorithm for their internal structure. |
| There is no need to reproduce the same hash code value than the one computed by this default method.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><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></code> in class <code><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></code></dd> |
| <dt>Returns:</dt> |
| <dd>a hash code value.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="equals(java.lang.Object)"> |
| <h3>equals</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">equals</span><wbr><span class="parameters">(<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> obj)</span></div> |
| <div class="block">Compares this feature with the given object for equality. |
| The default implementation performs the following algorithm: |
| |
| <ul> |
| <li>Verify that both objects are non-null and of the same class.</li> |
| <li>Iterate over all properties returned by <code>type.getProperty(true)</code> – |
| thus including properties inherited from parent types (if any): |
| <ul> |
| <li>For each property type, get the value from both <code>FeatureType</code> |
| by a call to <a href="#getPropertyValue(java.lang.String)"><code>getPropertyValue(String)</code></a>.</li> |
| <li>Verify that the two values are either both null, or equal in the sense of |
| <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"><code>Object.equals(Object)</code></a>.</li> |
| </ul></li> |
| </ul> |
| |
| Subclasses should override this method with a more efficient algorithm for their internal structure.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><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></code> in class <code><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></code></dd> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if both objects are equal.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |