blob: cdebdb52d8138e62d4257615294d89ddf55eb20b [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 -->
<title>AbstractFeature (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.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="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="../../../../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="AbstractFeature (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":6,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":6,"i10":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/AbstractFeature.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.feature</a></div>
<h2 title="Class AbstractFeature" class="title">Class AbstractFeature</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li>
<li>
<ul class="inheritance">
<li>AbstractFeature</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">AbstractFeature</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></pre>
<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>Abstract­Feature</code> can be instantiated by calls to <a href="DefaultFeatureType.html#newInstance()"><code>Default­Feature­Type​.new­Instance()</code></a>.
<div class="section">Simple features</div>
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>
<div class="section">Limitations</div>
<ul>
<li><b>Multi-threading:</b> <code>Abstract­Feature</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>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.5</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="DefaultFeatureType.html#newInstance()"><code>Default­Feature­Type​.new­Instance()</code></a>,
<a href="../../../../serialized-form.html#org.apache.sis.feature.AbstractFeature">Serialized Form</a></dd>
<p><font size="-1">Defined in the <code>sis-feature</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.feature.DefaultFeatureType)">AbstractFeature</a></span>&#8203;(<a href="DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Creates a new feature of the given type.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(java.lang.Object)">equals</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;obj)</code></th>
<td class="colLast">
<div class="block">Compares this feature with the given object for equality.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getOperationValue(java.lang.String)">getOperationValue</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Executes the parameterless operation of the given name and returns the value of its result.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProperty(java.lang.String)">getProperty</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Returns the property (attribute, feature association or operation result) of the given name.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPropertyValue(java.lang.String)">getPropertyValue</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Returns the value for the property of the given name.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getType()">getType</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns information about the feature (name, characteristics, <i>etc.</i>).</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a hash code value for this feature.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/quality/DataQuality.html?is-external=true" title="class or interface in org.opengis.metadata.quality" class="externalLink">DataQuality</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#quality()">quality</a></span>()</code></th>
<td class="colLast">
<div class="block">Evaluates the quality of this feature at this method invocation time.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setOperationValue(java.lang.String,java.lang.Object)">setOperationValue</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Executes the parameterless operation of the given name and sets the value of its result.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setProperty(java.lang.Object)">setProperty</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;property)</code></th>
<td class="colLast">
<div class="block">Sets the property (attribute or feature association).</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPropertyValue(java.lang.String,java.lang.Object)">setPropertyValue</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the value for the property of the given name.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">
<div class="block">Formats this feature in a tabular format.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">get­Class</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notify­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.apache.sis.feature.DefaultFeatureType)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>AbstractFeature</h4>
<pre>protected&nbsp;AbstractFeature&#8203;(<a href="DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>&nbsp;type)</pre>
<div class="block">Creates a new feature of the given type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - information about the feature (name, characteristics, <i>etc.</i>).</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="DefaultFeatureType.html#newInstance()"><code>Default­Feature­Type​.new­Instance()</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getType</h4>
<pre class="methodSignature">public&nbsp;<a href="DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>&nbsp;getType()</pre>
<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​.Feature­Type</code>. This change is pending GeoAPI revision.</div></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>information about the feature.</dd>
</dl>
</li>
</ul>
<a id="getProperty(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProperty</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;getProperty&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<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>get­Property­Value(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>Abstract­Attribute</code></a> or <a href="AbstractAssociation.html" title="class in org.apache.sis.feature"><code>Abstract­Association</code></a> instances.</p>
<div class="note"><b>Note for subclass implementers:</b>
the default implementation returns an instance that redirect all read and write operations to
<a href="#getPropertyValue(java.lang.String)"><code>get­Property­Value(String)</code></a> and <a href="#setPropertyValue(java.lang.String,java.lang.Object)"><code>set­Property­Value(String, Object)</code></a> respectively.
That default implementation is intended to make easier for developers to create their own
customized <code>Abstract­Facture</code> implementations, but has drawbacks:
a new <code>Property</code> instance is created every time that this <code>get­Property(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>Default­Feature­Type​.new­Instance()</code></a>.</div>
<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>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the property name.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property of the given name (never <code>null</code>).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</a></code> - if the given argument is not a property name of this feature.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getPropertyValue(java.lang.String)"><code>get­Property­Value(String)</code></a>,
<a href="DefaultFeatureType.html#getProperty(java.lang.String)"><code>Default­Feature­Type​.get­Property(String)</code></a></dd>
</dl>
</li>
</ul>
<a id="setProperty(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setProperty</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setProperty&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;property)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<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>
<blockquote><pre><font color="green">assert</font> property.<b>getType</b>() == <b>getType</b>().<b>getProperty</b>(property.<b>getName</b>());</pre></blockquote>
This method is useful for storing non-default <code>Attribute</code> or <code>Feature­Association</code> implementations
in this feature. When default implementations are sufficient, the <a href="#setPropertyValue(java.lang.String,java.lang.Object)"><code>set­Property­Value(String, Object)</code></a>
method is preferred.
<div class="note"><b>Note for subclass implementers:</b>
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>set­Property­Value(String, Object)</code></a>.
That default implementation is intended to make easier for developers to create their own
customized <code>Abstract­Facture</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 can not 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>Default­Feature­Type​.new­Instance()</code></a>.</div>
<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>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>property</code> - the property to set.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</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/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</a></code> - if the value of the given property is not valid.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</a></code> - if the property can not be set for another reason.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setPropertyValue(java.lang.String,java.lang.Object)"><code>set­Property­Value(String, Object)</code></a></dd>
</dl>
</li>
</ul>
<a id="getPropertyValue(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPropertyValue</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;getPropertyValue&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<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>get­Property(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/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink"><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&lt;?&gt;</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&lt;Feature&gt;</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>
<div class="section">Multi-valued properties and collections</div>
In the case of multi-valued properties (“max. occurs” &gt; 1), the collection returned by this method may
or may not be modifiable, at implementation choice. Generally the caller can not add new elements into the
returned collection anyway since <code>Collection&lt;?&gt;</code> does not allow such operations, and more specific
casts (e.g. <code>Collection&lt;String&gt;</code> can not be checked at runtime (at least as of Java 8).
If a type-safe modifiable collection is desired, the following approach can be used instead:
<blockquote><pre>Attribute&lt;String&gt; attribute = Features.<b>cast</b>((Attribute&lt;?&gt;) feature.<b>getProperty</b>(name), String.<font color="green">class</font>);
Collection&lt;String&gt; values = attribute.<b>getValues</b>(); <i><font color="gray">// This collection is guaranteed to be "live".</font></i></pre></blockquote></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the property name.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value for the given property, or <code>null</code> if none.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</a></code> - if the given argument is not an attribute or association name of this feature.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="AbstractAttribute.html#getValue()"><code>Abstract­Attribute​.get­Value()</code></a></dd>
</dl>
</li>
</ul>
<a id="setPropertyValue(java.lang.String,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPropertyValue</h4>
<pre class="methodSignature">public abstract&nbsp;void&nbsp;setPropertyValue&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Sets the value for the property of the given name.
<div class="section">Validation</div>
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>
<dt><span class="paramLabel">Parameters:</span></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><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</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/javase/8/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class­Cast­Exception</a></code> - if the value is not assignable to the expected value class.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</a></code> - if the given value is not valid for a reason other than its type.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="AbstractAttribute.html#setValue(V)"><code>Abstract­Attribute​.set­Value(Object)</code></a></dd>
</dl>
</li>
</ul>
<a id="getOperationValue(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOperationValue</h4>
<pre class="methodSignature">protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;getOperationValue&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)</pre>
<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:
<blockquote><pre>Operation operation = (Operation) type.<b>getProperty</b>(name);
Property result = operation.<b>apply</b>(<font color="green">this</font>, <font color="green">null</font>);
<font color="green">if</font> (result <font color="green">instanceof</font> Attribute&lt;?&gt;) {
<font color="green">return</font> ...; <i><font color="gray">// the attribute value.</font></i>
} <font color="green">else</font> <font color="green">if</font> (result <font color="green">instanceof</font> FeatureAssociation) {
<font color="green">return</font> ...; <i><font color="gray">// the associated feature.</font></i>
} <font color="green">else</font> {
<font color="green">return</font> <font color="green">null</font>;
}</pre></blockquote></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></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>Abstract­Operation</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the result value of the given operation, or <code>null</code> if none.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.8</dd>
</dl>
</li>
</ul>
<a id="setOperationValue(java.lang.String,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOperationValue</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;setOperationValue&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;value)</pre>
<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>get­Operation­Value(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> operation for instance does.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></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>Abstract­Operation</code></a>.</dd>
<dd><code>value</code> - the value to assign to the result of the named operation.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­State­Exception</a></code> - if the operation of the given name does not accept assignment.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.8</dd>
</dl>
</li>
</ul>
<a id="quality()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>quality</h4>
<pre class="methodSignature">public&nbsp;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/quality/DataQuality.html?is-external=true" title="class or interface in org.opengis.metadata.quality" class="externalLink">DataQuality</a>&nbsp;quality()</pre>
<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="../metadata/iso/quality/DefaultDataQuality.html#getScope()">scope</a>
<a href="../metadata/iso/maintenance/DefaultScope.html#getLevel()">level</a> is set to
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/maintenance/ScopeCode.html?is-external=true#FEATURE" title="class or interface in org.opengis.metadata.maintenance" class="externalLink"><code>Scope­Code​.FEATURE</code></a>.
</li><li>
The <a href="../metadata/iso/quality/DefaultDataQuality.html#getReports()">reports</a> list contains
at most one <a href="../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="../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>Abstract­Attribute​.quality()</code></a> javadoc.
</li>
</ul>
This feature is valid if this method does not report any
<a href="../metadata/iso/quality/DefaultConformanceResult.html" title="class in org.apache.sis.metadata.iso.quality">conformance result</a> having a
<a href="../metadata/iso/quality/DefaultConformanceResult.html#pass()">pass</a> value of <code>false</code>.
<div class="note"><b>Example:</b> 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:
<blockquote><pre>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></blockquote>
</div></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>reports on all constraint violations found.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="AbstractAttribute.html#quality()"><code>Abstract­Attribute​.quality()</code></a>,
<a href="AbstractAssociation.html#quality()"><code>Abstract­Association​.quality()</code></a></dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;toString()</pre>
<div class="block">Formats this feature in a tabular format.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">to­String</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string representation of this feature in a tabular format.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="FeatureFormat.html" title="class in org.apache.sis.feature"><code>Feature­Format</code></a></dd>
</dl>
</li>
</ul>
<a id="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;hashCode()</pre>
<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​.get­Property(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>get­Property­Value(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>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hash­Code</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a hash code value.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.8</dd>
</dl>
</li>
</ul>
<a id="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>equals</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;equals&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;obj)</pre>
<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​.get­Property(true)</code>
thus including properties inherited from parent types (if any):
<ul>
<li>For each property type, get the value from both <code>Feature­Type</code>
by a call to <a href="#getPropertyValue(java.lang.String)"><code>get­Property­Value(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/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink"><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>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if both objects are equal.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.8</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/AbstractFeature.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>