defaultfeaturecollection.html
来自「Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理」· HTML 代码 · 共 1,240 行 · 第 1/5 页
HTML
1,240 行
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#removeListener(org.geotools.feature.CollectionListener)">removeListener</A></B>(<A HREF="../../../org/geotools/feature/CollectionListener.html" title="interface in org.geotools.feature">CollectionListener</A> listener)</CODE><BR> Removes a listener for collection events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#retainAll(java.util.Collection)">retainAll</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> collection)</CODE><BR> Retains only the elements in this collection that are contained in the specified collection (optional operation). </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#setAttribute(int, java.lang.Object)">setAttribute</A></B>(int position, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> val)</CODE><BR> Sets an attribute by the given zero-based index. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#setAttribute(java.lang.String, java.lang.Object)">setAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> xPath, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> attribute)</CODE><BR> Sets a single attribute for this feature, passed as a complex object. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#setDefaultGeometry(com.vividsolutions.jts.geom.Geometry)">setDefaultGeometry</A></B>(<A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/Geometry.html" title="class or interface in com.vividsolutions.jts.geom">Geometry</A> geometry)</CODE><BR> Sets the default geometry for this feature.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#setParent(org.geotools.feature.FeatureCollection)">setParent</A></B>(<A HREF="../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A> collection)</CODE><BR> Sets the parent collection this feature is stored in, if it is not already set. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#size()">size</A></B>()</CODE><BR> Returns the number of elements in this collection. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/geotools/feature/FeatureList.html" title="interface in org.geotools.feature">FeatureList</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#sort(org.geotools.filter.SortBy)">sort</A></B>(<A HREF="../../../org/geotools/filter/SortBy.html" title="interface in org.geotools.filter">SortBy</A> order)</CODE><BR> Construct a sorted view of this content. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/geotools/feature/FeatureList.html" title="interface in org.geotools.feature">FeatureList</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#sort(org.geotools.filter.SortBy2)">sort</A></B>(<A HREF="../../../org/geotools/filter/SortBy2.html" title="interface in org.geotools.filter">SortBy2</A> order)</CODE><BR> Allows for "Advanced" sort capabilities specific to the GeoTools platform! </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#subCollection(org.geotools.filter.Filter)">subCollection</A></B>(<A HREF="../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> filter)</CODE><BR> Will return an optimized subCollection based on access to the origional MemoryFeatureCollection. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#toArray()">toArray</A></B>()</CODE><BR> Returns an array containing all of the elements in this collection. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#toArray(java.lang.Object[])">toArray</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] a)</CODE><BR> Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. </TD></TR></TABLE> <A NAME="methods_inherited_from_class_Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_Collection"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html#equals(java.lang.Object)" title="class or interface in java.util">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html#hashCode()" title="class or interface in java.util">hashCode</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="DefaultFeatureCollection(java.lang.String, org.geotools.feature.FeatureType)"><!-- --></A><H3>DefaultFeatureCollection</H3><PRE>protected <B>DefaultFeatureCollection</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> id, <A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A> featureType)</PRE><DL><DD>This constructor is protected to discourage direct usage... <p> Opportunistic reuse is encouraged, but only for the purposes of testing or other specialized uses. Normal creation should occur through <code>org.geotools.core.FeatureCollections.newCollection()</code> allowing applications to customize any generated collections. </p><P><DT><B>Parameters:</B><DD><CODE>id</CODE> - may be null ... feature id<DD><CODE>featureType</CODE> - optional, may be null</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><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="getBounds()"><!-- --></A><H3>getBounds</H3><PRE>public <A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/Envelope.html" title="class or interface in com.vividsolutions.jts.geom">Envelope</A> <B>getBounds</B>()</PRE><DL><DD>Gets the bounding box for the features in this feature collection.<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>the envelope of the geometries contained by this feature 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>Adds a listener for collection events.<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)</PRE><DL><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>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?