📄 defaultquery.html
字号:
The Filter can be used to define constraints on a query. </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/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DefaultQuery.html#getHandle()">getHandle</A></B>()</CODE><BR> The handle attribute is included to allow a client to associate a mnemonic name to the Query request. </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/data/DefaultQuery.html#getMaxFeatures()">getMaxFeatures</A></B>()</CODE><BR> The optional maxFeatures can be used to limit the number of features that a query request retrieves. </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/net/URI.html" title="class or interface in java.net">URI</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DefaultQuery.html#getNamespace()">getNamespace</A></B>()</CODE><BR> The namespace attribute is used to indicate the namespace of the schema being represented.</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/String.html" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DefaultQuery.html#getPropertyNames()">getPropertyNames</A></B>()</CODE><BR> The property names is used to specify the attributes that should be selected for the return feature collection. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> SortBy[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DefaultQuery.html#getSortBy()">getSortBy</A></B>()</CODE><BR> Retrive list of SortBy information. </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/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DefaultQuery.html#getTypeName()">getTypeName</A></B>()</CODE><BR> The typeName attribute is used to indicate the name of the feature type to be queried. </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/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DefaultQuery.html#getVersion()">getVersion</A></B>()</CODE><BR> From WFS Spec: The version attribute is included in order to accommodate systems that support feature versioning. </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/data/DefaultQuery.html#hashCode()">hashCode</A></B>()</CODE><BR> Hashcode based on propertyName, maxFeatures and filter.</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/data/DefaultQuery.html#retrieveAllProperties()">retrieveAllProperties</A></B>()</CODE><BR> Convenience method to determine if the query should use the full schema (all properties) of the data source for the features returned. </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/data/DefaultQuery.html#setCoordinateSystem(org.opengis.referencing.crs.CoordinateReferenceSystem)">setCoordinateSystem</A></B>(CoordinateReferenceSystem system)</CODE><BR> setCoordinateSystem purpose. </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/data/DefaultQuery.html#setCoordinateSystemReproject(org.opengis.referencing.crs.CoordinateReferenceSystem)">setCoordinateSystemReproject</A></B>(CoordinateReferenceSystem system)</CODE><BR> setCoordinateSystemReproject purpose. </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/data/DefaultQuery.html#setFilter(org.geotools.filter.Filter)">setFilter</A></B>(<A HREF="../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> filter)</CODE><BR> Sets the filter to constrain the query.</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/data/DefaultQuery.html#setHandle(java.lang.String)">setHandle</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> handle)</CODE><BR> Sets a mnemonic name for the query request.</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/data/DefaultQuery.html#setMaxFeatures(int)">setMaxFeatures</A></B>(int maxFeatures)</CODE><BR> Sets the max features to retrieved by this query.</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/data/DefaultQuery.html#setPropertyNames(java.util.List)">setPropertyNames</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/List.html" title="class or interface in java.util">List</A> propNames)</CODE><BR> Sets the proper attributeTypes constructed from a schema and a list of propertyNames.</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/data/DefaultQuery.html#setPropertyNames(java.lang.String[])">setPropertyNames</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>[] propNames)</CODE><BR> Sets the properties to retrieve from the db. </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/data/DefaultQuery.html#setSortBy(org.opengis.filter.sort.SortBy[])">setSortBy</A></B>(SortBy[] sortBy)</CODE><BR> Sets the sort by information.</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/data/DefaultQuery.html#setTypeName(java.lang.String)">setTypeName</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> typeName)</CODE><BR> Sets the typename.</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/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DefaultQuery.html#toString()">toString</A></B>()</CODE><BR> Over ride of toString</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#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#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#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> <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="DefaultQuery()"><!-- --></A><H3>DefaultQuery</H3><PRE>public <B>DefaultQuery</B>()</PRE><DL><DD>/** No argument constructor.<P></DL><HR><A NAME="DefaultQuery(java.lang.String)"><!-- --></A><H3>DefaultQuery</H3><PRE>public <B>DefaultQuery</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> typeName)</PRE><DL><DD>Query with typeName. <p> </p><P><DT><B>Parameters:</B><DD><CODE>typeName</CODE> - the name of the featureType to retrieve</DL><HR><A NAME="DefaultQuery(java.lang.String, org.geotools.filter.Filter)"><!-- --></A><H3>DefaultQuery</H3><PRE>public <B>DefaultQuery</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> typeName, <A HREF="../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> filter)</PRE><DL><DD>Constructor with typeName and filter. Note that current datasource implementations only have one type per datasource, so the typeName field will likely be ignored.<P><DT><B>Parameters:</B><DD><CODE>typeName</CODE> - the name of the featureType to retrieve.<DD><CODE>filter</CODE> - the OGC filter to constrain the request.</DL><HR><A NAME="DefaultQuery(java.lang.String, org.geotools.filter.Filter, java.lang.String[])"><!-- --></A><H3>DefaultQuery</H3><PRE>public <B>DefaultQuery</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> typeName, <A HREF="../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> filter, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] properties)</PRE><DL><DD>Constructor that sets the filter and properties<P><DT><B>Parameters:</B><DD><CODE>typeName</CODE> - <DD><CODE>filter</CODE> - the OGC filter to constrain the request.<DD><CODE>properties</CODE> - an array of the properties to fetch.</DL><HR><A NAME="DefaultQuery(java.lang.String, org.geotools.filter.Filter, int, java.lang.String[], java.lang.String)"><!-- --></A><H3>DefaultQuery</H3><PRE>public <B>DefaultQuery</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> typeName, <A HREF="../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> filter, int maxFeatures, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] propNames, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> handle)</PRE><DL><DD>Constructor that sets all fields.<P><DT><B>Parameters:</B><DD><CODE>typeName</CODE> - the name of the featureType to retrieve.<DD><CODE>filter</CODE> - the OGC filter to constrain the request.<DD><CODE>maxFeatures</CODE> - the maximum number of features to be returned.<DD><CODE>propNames</CODE> - an array of the properties to fetch.<DD><CODE>handle</CODE> - the name to associate with the query.</DL><HR><A NAME="DefaultQuery(java.lang.String, java.net.URI, org.geotools.filter.Filter, int, java.lang.String[], java.lang.String)"><!-- --></A><H3>DefaultQuery</H3><PRE>public <B>DefaultQuery</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> typeName, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A> namespace, <A HREF="../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A> filter, int maxFeatures, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] propNames, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> handle)</PRE><DL><DD>Constructor that sets all fields.<P><DT><B>Parameters:</B><DD><CODE>typeName</CODE> - the name of the featureType to retrieve.<DD><CODE>namespace</CODE> - Namespace for provided typeName, or null if unspecified<DD><CODE>filter</CODE> - the OGC filter to constrain the request.<DD><CODE>maxFeatures</CODE> - the maximum number of features to be returned.<DD><CODE>propNames</CODE> - an array of the properties to fetch.<DD><CODE>handle</CODE> - the name to associate with the query.</DL><HR><A NAME="DefaultQuery(org.geotools.data.Query)"><!-- --></A><H3>DefaultQuery</H3><PRE>public <B>DefaultQuery</B>(<A HREF="../../../org/geotools/data/Query.html" title="interface in org.geotools.data">Query</A> query)</PRE><DL><DD>Copy contructor, clones the state of a generic Query into a DefaultQuery
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -