📄 featuresource.html
字号:
<DL><DD>Access to the DataStore implementing this FeatureStore. <p> You may use this to access such as <code>namespace</code> provided by DataStore. </p><P><DD><DL><DT><B>Returns:</B><DD>DataStore implementing this FeatureStore</DL></DD></DL><HR><A NAME="addFeatureListener(org.geotools.data.FeatureListener)"><!-- --></A><H3>addFeatureListener</H3><PRE>public void <B>addFeatureListener</B>(<A HREF="../../../org/geotools/data/FeatureListener.html" title="interface in org.geotools.data">FeatureListener</A> listener)</PRE><DL><DD>Adds a listener to the list that's notified each time a change to the FeatureStore occurs.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - FeatureListener</DL></DD></DL><HR><A NAME="removeFeatureListener(org.geotools.data.FeatureListener)"><!-- --></A><H3>removeFeatureListener</H3><PRE>public void <B>removeFeatureListener</B>(<A HREF="../../../org/geotools/data/FeatureListener.html" title="interface in org.geotools.data">FeatureListener</A> listener)</PRE><DL><DD>Removes a listener from the list that's notified each time a change to the FeatureStore occurs.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - FeatureListener</DL></DD></DL><HR><A NAME="getFeatures(org.geotools.data.Query)"><!-- --></A><H3>getFeatures</H3><PRE>public <A HREF="../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A> <B>getFeatures</B>(<A HREF="../../../org/geotools/data/Query.html" title="interface in org.geotools.data">Query</A> query) 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>Loads features from the datasource into the returned FeatureResults, based on the passed query.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>query</CODE> - a datasource query object. It encapsulates requested information, such as typeName, maxFeatures and filter.<DT><B>Returns:</B><DD>Collection The collection to put the features into.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - For all data source errors.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/data/Query.html" title="interface in org.geotools.data"><CODE>Query</CODE></A></DL></DD></DL><HR><A NAME="getFeatures(org.geotools.filter.Filter)"><!-- --></A><H3>getFeatures</H3><PRE>public <A HREF="../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A> <B>getFeatures</B>(<A HREF="../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> filter) 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>Loads features from the datasource into the returned FeatureResults, based on the passed filter.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>filter</CODE> - An OpenGIS filter; specifies which features to retrieve. <tt>null</tt> is not allowed, use Filter.NONE instead.<DT><B>Returns:</B><DD>Collection The collection to put the features into.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - For all data source errors.</DL></DD></DL><HR><A NAME="getFeatures()"><!-- --></A><H3>getFeatures</H3><PRE>public <A HREF="../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A> <B>getFeatures</B>() 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>Loads all features from the datasource into the return FeatureResults. <p> Filter.NONE can also be used to get all features. Calling this function is equivalent to using <A HREF="../../../org/geotools/data/Query.html#ALL"><CODE>Query.ALL</CODE></A> </p><P><DD><DL><DT><B>Returns:</B><DD>Collection The collection to put the features into.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - For all data source errors.</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>Retrieves the featureType that features extracted from this datasource will be created with. <p> The schema returned is the LCD supported by all available Features. In the common case of shapfiles and database table this schema will match that of every feature available. In the degenerate GML case this will simply reflect the gml:AbstractFeatureType. </p><P><DD><DL><DT><B>Returns:</B><DD>the schema of features created by this datasource.<DT><B>'TODO:'</B></DT> <DD>REVISIT: Our current FeatureType model is not yet advanced enough to handle multiple featureTypes. Should getSchema take a typeName now that a query takes a typeName, and thus DataSources can now support multiple types? Or just wait until we can programmatically make powerful enough schemas?, REVISIT: we could also just use DataStore to capture multi FeatureTypes?</DD></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>() 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>Gets the bounding box of this datasource. <p> With getBounds(Query) this becomes a convenience method for getBounds(Query.ALL), that is the bounds for all features contained here. </p> <p> If getBounds() returns <code>null</code> due to expense consider using <code>getFeatures().getBounds()</code> as a an alternative. </p><P><DD><DL><DT><B>Returns:</B><DD>The bounding box of the datasource or null if unknown and too expensive for the method to calculate.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if there are errors getting the bounding box.<DT><B>'TODO:'</B></DT> <DD>REVISIT: Do we need this or can we use getBounds( Query.ALL )?</DD></DL></DD></DL><HR><A NAME="getBounds(org.geotools.data.Query)"><!-- --></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>(<A HREF="../../../org/geotools/data/Query.html" title="interface in org.geotools.data">Query</A> query) 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>Gets the bounding box of the features that would be returned by this query. <p> To retrieve the bounds of the DataSource please use <code>getBounds( Query.ALL )</code>. </p> <p> This method is needed if we are to stream features to a gml out, since a FeatureCollection must have a boundedBy element. </p> <p> If getBounds(Query) returns <code>null</code> due to expense consider using <code>getFeatures(Query).getBounds()</code> as a an alternative. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>query</CODE> - Contains the Filter and MaxFeatures to find the bounds for.<DT><B>Returns:</B><DD>The bounding box of the datasource or null if unknown and too expensive for the method to calculate or any errors occur.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - DOCUMENT ME!</DL></DD></DL><HR><A NAME="getCount(org.geotools.data.Query)"><!-- --></A><H3>getCount</H3><PRE>public int <B>getCount</B>(<A HREF="../../../org/geotools/data/Query.html" title="interface in org.geotools.data">Query</A> query) 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>Gets the number of the features that would be returned by this query. <p></p> <p> If getBounds(Query) returns <code>-1</code> due to expense consider using <code>getFeatures(Query).getCount()</code> as a an alternative. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>query</CODE> - Contains the Filter and MaxFeatures to find the bounds for.<DT><B>Returns:</B><DD>The number of Features provided by the Query or <code>-1</code> if count is too expensive to calculate or any errors or occur.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if there are errors getting the count</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FeatureSource.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../org/geotools/data/FeatureResults.html" title="interface in org.geotools.data"><B>PREV CLASS</B></A> <A HREF="../../../org/geotools/data/FeatureStore.html" title="interface in org.geotools.data"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="FeatureSource.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright © 1996-2007 <a href="http://www.geotools.org">Geotools</a>. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -