blob: ceaf98063d08604194ef522545a14205c20fde27 [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>WritableFeatureSet (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.storage.WritableFeatureSet interface">
<meta name="keywords" content="updateType()">
<meta name="keywords" content="add()">
<meta name="keywords" content="removeIf()">
<meta name="keywords" content="replaceIf()">
<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="WritableFeatureSet (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/WritableFeatureSet.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>Constr&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>Constr&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.storage</a></div>
<h2 title="Interface WritableFeatureSet" class="title">Interface WritableFeatureSet</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><code><a href="DataSet.html" title="interface in org.apache.sis.storage">Data­Set</a></code>, <code><a href="FeatureSet.html" title="interface in org.apache.sis.storage">Feature­Set</a></code>, <code><a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">WritableFeatureSet</span>
extends <a href="FeatureSet.html" title="interface in org.apache.sis.storage">FeatureSet</a></pre>
<div class="block">A <a href="FeatureSet.html" title="interface in org.apache.sis.storage"><code>Feature­Set</code></a> with writing capabilities. <code>Writable­Feature­Set</code> inherits the reading capabilities from
its parent and adds the capabilities to <a href="#add(java.util.Iterator)">add</a>, <a href="#removeIf(java.util.function.Predicate)">remove</a>
or <a href="#replaceIf(java.util.function.Predicate,java.util.function.UnaryOperator)">replace</a> feature instances.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<p><font size="-1">Defined in the <code>sis-storage</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&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></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>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(java.util.Iterator)">add</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink">Iterator</a>&lt;? extends <a href="../feature/AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>&gt;&nbsp;features)</code></th>
<td class="colLast">
<div class="block">Inserts new feature instances in this <code>Feature­Set</code>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeIf(java.util.function.Predicate)">removeIf</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Predicate</a>&lt;? super <a href="../feature/AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>&gt;&nbsp;filter)</code></th>
<td class="colLast">
<div class="block">Removes all feature instances from this <code>Feature­Set</code> which matches the given predicate.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#replaceIf(java.util.function.Predicate,java.util.function.UnaryOperator)">replaceIf</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Predicate</a>&lt;? super <a href="../feature/AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>&gt;&nbsp;filter,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/UnaryOperator.html?is-external=true" title="class or interface in java.util.function" class="externalLink">UnaryOperator</a>&lt;<a href="../feature/AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>&gt;&nbsp;updater)</code></th>
<td class="colLast">
<div class="block">Updates all feature instances from this <code>Feature­Set</code> which match the given predicate.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#updateType(org.apache.sis.feature.DefaultFeatureType)">updateType</a></span>&#8203;(<a href="../feature/DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>&nbsp;newType)</code></th>
<td class="colLast">
<div class="block">Declares or redefines the type of all feature instances in this feature set.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.DataSet">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;<a href="DataSet.html" title="interface in org.apache.sis.storage">DataSet</a></h3>
<code><a href="DataSet.html#getEnvelope()">get­Envelope</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.FeatureSet">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;<a href="FeatureSet.html" title="interface in org.apache.sis.storage">FeatureSet</a></h3>
<code><a href="FeatureSet.html#features(boolean)">features</a>, <a href="FeatureSet.html#getType()">get­Type</a>, <a href="FeatureSet.html#subset(org.apache.sis.storage.Query)">subset</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Resource">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;<a href="Resource.html" title="interface in org.apache.sis.storage">Resource</a></h3>
<code><a href="Resource.html#addListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">add­Listener</a>, <a href="Resource.html#getIdentifier()">get­Identifier</a>, <a href="Resource.html#getMetadata()">get­Metadata</a>, <a href="Resource.html#removeListener(java.lang.Class,org.apache.sis.storage.event.StoreListener)">remove­Listener</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="updateType(org.apache.sis.feature.DefaultFeatureType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateType</h4>
<pre class="methodSignature">void&nbsp;updateType&#8203;(<a href="../feature/DefaultFeatureType.html" title="class in org.apache.sis.feature">DefaultFeatureType</a>&nbsp;newType)
throws <a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></pre>
<div class="block">Declares or redefines the type of all feature instances in this feature set.
In the case of a newly created feature set, this method can be used for defining the type of features
to be stored (this is not a required step however). In the case of a feature set which already contains
feature instances, this operation may take an undefined amount of time to execute since all features in
the set may need to be transformed.
<p>Feature sets may restrict the kind of changes that are allowed. An <a href="IllegalFeatureTypeException.html" title="class in org.apache.sis.storage"><code>Illegal­Feature­Type­Exception</code></a>
will be thrown if the given type contains incompatible property changes.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>new­Type</code> - new feature type definition (not <code>null</code>).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IllegalFeatureTypeException.html" title="class in org.apache.sis.storage">Illegal­Feature­Type­Exception</a></code> - if the given type is not compatible with the types supported by the store.</dd>
<dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if another error occurred while changing the feature type.</dd>
</dl>
</li>
</ul>
<a id="add(java.util.Iterator)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre class="methodSignature">void&nbsp;add&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink">Iterator</a>&lt;? extends <a href="../feature/AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>&gt;&nbsp;features)
throws <a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></pre>
<div class="block">Inserts new feature instances in this <code>Feature­Set</code>.
Any feature already present in this <a href="FeatureSet.html" title="interface in org.apache.sis.storage"><code>Feature­Set</code></a> will remain unmodified.
If a <a href="../feature/AbstractFeature.html#getProperty(java.lang.String)">feature property</a> is used as unique identifier, then:
<ul>
<li>If a given feature assigns to that property a value already in use, an exception will be thrown.</li>
<li>If given features do not assign value to that property, identifiers should be generated by the data store.</li>
</ul>
After successful insertion, the new features may appear after the features already present
but not necessarily; ordering is <a href="DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a> specific.
<div class="note"><b>API note:</b>
this method expects an <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Iterator</code></a> rather then a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html?is-external=true" title="class or interface in java.util.stream" class="externalLink"><code>Stream</code></a> for easing
inter-operability with various API. Implementing a custom <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Iterator</code></a> requires less effort
than implementing a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html?is-external=true" title="class or interface in java.util.stream" class="externalLink"><code>Stream</code></a>. On the other side if the user has a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html?is-external=true" title="class or interface in java.util.stream" class="externalLink"><code>Stream</code></a>,
obtaining an <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Iterator</code></a> can be done by a call to <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/BaseStream.html?is-external=true#iterator()" title="class or interface in java.util.stream" class="externalLink"><code>Base­Stream​.iterator()</code></a>.</div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>features</code> - feature instances to insert or copy in this <code>Feature­Set</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IllegalFeatureTypeException.html" title="class in org.apache.sis.storage">Illegal­Feature­Type­Exception</a></code> - if a feature given by the iterator is not of the type expected by this <code>Feature­Set</code>.</dd>
<dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if another error occurred while storing new features.</dd>
</dl>
</li>
</ul>
<a id="removeIf(java.util.function.Predicate)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeIf</h4>
<pre class="methodSignature">boolean&nbsp;removeIf&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Predicate</a>&lt;? super <a href="../feature/AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>&gt;&nbsp;filter)
throws <a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></pre>
<div class="block">Removes all feature instances from this <code>Feature­Set</code> which matches the given predicate.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filter</code> - a predicate which returns <code>true</code> for feature instances to be removed.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if any elements were removed.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if an error occurred while removing features.</dd>
</dl>
</li>
</ul>
<a id="replaceIf(java.util.function.Predicate,java.util.function.UnaryOperator)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>replaceIf</h4>
<pre class="methodSignature">void&nbsp;replaceIf&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Predicate</a>&lt;? super <a href="../feature/AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>&gt;&nbsp;filter,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/UnaryOperator.html?is-external=true" title="class or interface in java.util.function" class="externalLink">UnaryOperator</a>&lt;<a href="../feature/AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>&gt;&nbsp;updater)
throws <a href="DataStoreException.html" title="class in org.apache.sis.storage">DataStoreException</a></pre>
<div class="block">Updates all feature instances from this <code>Feature­Set</code> which match the given predicate.
For each <code>Feature</code> instance matching the given <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function" class="externalLink"><code>Predicate</code></a>,
the <code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true#apply(T)" title="class or interface in java.util.function" class="externalLink">Unary­Operator​.apply(Feature)</a></code> method will be invoked.
<code>Unary­Operator</code>s are free to modify the given <code>Feature</code> <i>in-place</i>
or to return a different feature instance. Two behaviors are possible:
<ul>
<li>If the operator returns a non-null <code>Feature</code>, then the modified feature is stored
in replacement of the previous feature (not necessarily at the same location).</li>
<li>If the operator returns <code>null</code>, then the feature will be removed from the <code>Feature­Set</code>.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filter</code> - a predicate which returns <code>true</code> for feature instances to be updated.</dd>
<dd><code>updater</code> - operation called for each matching <code>Feature</code> instance.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="IllegalFeatureTypeException.html" title="class in org.apache.sis.storage">Illegal­Feature­Type­Exception</a></code> - if a feature given by the operator is not of the type expected by this <code>Feature­Set</code>.</dd>
<dd><code><a href="DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code> - if another error occurred while replacing features.</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/WritableFeatureSet.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>Constr&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>Constr&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>