abstractfeaturecollection.html
来自「Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理」· HTML 代码 · 共 1,113 行 · 第 1/5 页
HTML
1,113 行
</pre><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/FeatureResults.html#getBounds()">getBounds</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/FeatureResults.html" title="interface in org.geotools.data">FeatureResults</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Bounding box of this FeatureResults, or an empty Envelope</DL></DD></DL><HR><A NAME="getSchema()"><!-- --></A><H3>getSchema</H3><PRE>public <A HREF="../../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A> <B>getSchema</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><DD>The schema for the child features of this collection. <p> There is a difference between getFeatureType() and getSchema()represents the LCD FeatureType that best represents the contents of this collection. <ul> <li>The degenerate case returns the "_Feature" FeatureType, where the onlything known is that the contents are Features. <li>For a collection backed by a shapefiles (or database tables) the FeatureType returned by getSchema() will complete describe each and every child in the collection. <li>For mixed content FeatureCollections you will need to check the FeatureType of each Feature as it is retrived from the collection </ul> </p> <p> The method getSchema() is named for compatability with the geotools 2.0 API. In the Geotools 2.2 time frame we should be able to replace this method with a careful check of getFeatureType() and its attributes. </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#getSchema()">getSchema</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>FeatureType describing the "common" schema to all child features of this collection</DL></DD></DL><HR><A NAME="addListener(org.geotools.feature.CollectionListener)"><!-- --></A><H3>addListener</H3><PRE>public void <B>addListener</B>(<A HREF="../../../../org/geotools/feature/CollectionListener.html" title="interface in org.geotools.feature">CollectionListener</A> listener)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><DD>Adds a listener for collection events. <p> When this collection is backed by live data the event notification will follow the guidelines outlined by FeatureListner. </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#addListener(org.geotools.feature.CollectionListener)">addListener</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener to add</DL></DD></DL><HR><A NAME="removeListener(org.geotools.feature.CollectionListener)"><!-- --></A><H3>removeListener</H3><PRE>public void <B>removeListener</B>(<A HREF="../../../../org/geotools/feature/CollectionListener.html" title="interface in org.geotools.feature">CollectionListener</A> listener) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><DD>Removes a listener for collection events.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#removeListener(org.geotools.feature.CollectionListener)">removeListener</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener to remove<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - If the listener is null.</DL></DD></DL><HR><A NAME="features()"><!-- --></A><H3>features</H3><PRE>public <A HREF="../../../../org/geotools/feature/FeatureIterator.html" title="interface in org.geotools.feature">FeatureIterator</A> <B>features</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><DD>Obtain a FeatureIterator of the Features within this collection. <p> The implementation of Collection must adhere to the rules of fail-fast concurrent modification. In addition (to allow for resource backed collections, the <code>close( Iterator )</code> method must be called. <p> This is almost equivalent to: <ul> <li>a Type-Safe call to: <code>getAttribute(getFeatureType().getAttributeType(0).getName()).iterator();</code>. <li>A Java 5:<code>Iterator<Feature></code> </ul> </p> Example (safe) use:<pre><code> FeatureIterator iterator=collection.features(); try { while( iterator.hasNext() ){ Feature feature = iterator.next(); System.out.println( feature.getID() ); } } finally { collection.close( iterator ); } </code></pre> </p> <p> GML Note: The contents of this iterator are considered to be defined by <b>featureMember</b> tags (and/or the single allowed <b>FeatureMembers</b> tag). Please see getFeatureType for more details. </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#features()">features</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A FeatureIterator.</DL></DD></DL><HR><A NAME="close(org.geotools.feature.FeatureIterator)"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>(<A HREF="../../../../org/geotools/feature/FeatureIterator.html" title="interface in org.geotools.feature">FeatureIterator</A> close)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><DD>Clean up any resources assocaited with this iterator in a manner similar to JDO collections. <p> You must be sure to allow null values, this is because in a try/finally block client code may not be sure if they have actualy succeed in assign a value to an iterator they wish to ensure is closed. By permiting null as an api we prevent a null check in lots of finally statements. </p> <p> Note: Because of FeatureReader using an interator internally, there is only one implementation of this method that makes any sense:<pre><code> <b>public void</b> close( FeatureIterator iterator) { <b>if</b>( iterator != null ) iterator.close(); } </code></pre> </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#close(org.geotools.feature.FeatureIterator)">close</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="closeIterator(org.geotools.feature.FeatureIterator)"><!-- --></A><H3>closeIterator</H3><PRE>public void <B>closeIterator</B>(<A HREF="../../../../org/geotools/feature/FeatureIterator.html" title="interface in org.geotools.feature">FeatureIterator</A> close)</PRE><DL><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="purge()"><!-- --></A><H3>purge</H3><PRE>public void <B>purge</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html" title="interface in org.geotools.data.collection">ResourceCollection</A></CODE></B></DD><DD>Close any outstanding resources released by this resources. <p> This method should be used with great caution, it is however available to allow the use of the ResourceCollection with algorthims that are unaware of the need to close iterators after use. </p> <p> Example of using a normal Collections utility method:<pre><code> Collections.sort( collection ); collection.purge(); </code></pre><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html#purge()">purge</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html" title="interface in org.geotools.data.collection">ResourceCollection</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#purge()">purge</A></CODE> in class <CODE><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html" title="class in org.geotools.feature.collection">AbstractResourceCollection</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="accepts(org.geotools.feature.visitor.FeatureVisitor, org.geotools.util.ProgressListener)"><!-- --></A><H3>accepts</H3><PRE>public void <B>accepts</B>(<A HREF="../../../../org/geotools/feature/visitor/FeatureVisitor.html" title="interface in org.geotools.feature.visitor">FeatureVisitor</A> visitor, <A HREF="../../../../org/geotools/util/ProgressListener.html" title="interface in org.geotools.util">ProgressListener</A> progress) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Accepts a visitor, which then visits each feature in the collecti
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?