⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 query.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_13) on Tue Jun 05 11:36:23 GMT-05:00 2007 --><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><TITLE>Query (Geotools 2.3.x 2.3.2 API)</TITLE><META NAME="keywords" CONTENT="org.geotools.data.Query interface"><META NAME="keywords" CONTENT="NO_NAMESPACE"><META NAME="keywords" CONTENT="DEFAULT_MAX"><META NAME="keywords" CONTENT="ALL"><META NAME="keywords" CONTENT="FIDS"><META NAME="keywords" CONTENT="NO_NAMES"><META NAME="keywords" CONTENT="ALL_NAMES"><META NAME="keywords" CONTENT="getPropertyNames()"><META NAME="keywords" CONTENT="retrieveAllProperties()"><META NAME="keywords" CONTENT="getMaxFeatures()"><META NAME="keywords" CONTENT="getFilter()"><META NAME="keywords" CONTENT="getTypeName()"><META NAME="keywords" CONTENT="getNamespace()"><META NAME="keywords" CONTENT="getHandle()"><META NAME="keywords" CONTENT="getVersion()"><META NAME="keywords" CONTENT="getCoordinateSystem()"><META NAME="keywords" CONTENT="getCoordinateSystemReproject()"><META NAME="keywords" CONTENT="getSortBy()"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="Query (Geotools 2.3.x 2.3.2 API)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Query.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../org/geotools/data/LockingManager.html" title="interface in org.geotools.data"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/geotools/data/Repository.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>  &nbsp;&nbsp;<A HREF="Query.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.geotools.data</FONT><BR>Interface Query</H2><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../org/geotools/data/DefaultQuery.html" title="class in org.geotools.data">DefaultQuery</A></DD></DL><HR><DL><DT>public interface <B>Query</B></DL><P>Encapsulates a data request. <p> The query object is used by the FeatureSource.getFeatures(Query) to encapsulate a request. For this use it the FeatureSource.getSchema().getTypeName() should match the one provided by the Query, or the Query should not provide one. </p> <p> Suggested Extensions (Jody): </p> <ul> <li> Transient CoordianteSystem override done getCoordianteSystem() </li> <li> Transient Geometry reproject to an alternate CoordinateSystem - done getCoordinateSystemReproject() </li> <li> Consider Namespace, FeatueType name override - not done considered evil </li> <li> DataStore.getFeatureReader( Query, Transaction ) </li> <li> DataStore.getView( Query ) - prototype in AbstractDataStore (not really ready for primetime, see Expr) </li> </ul><P><P><DL><DT><B>Author:</B></DT>  <DD>Chris Holmes</DD><DT><B>Module:</B></DT><DD><CODE><B>module/api</B></CODE> &nbsp; (<A HREF="http://maven.geotools.fr/repository/org/geotools/gt2-api/"><CODE>gt2-api.jar</CODE></A>) (<A HREF="http://maven.geotools.fr/reports/api/index.html">Maven report</A>) (<A HREF="http://svn.geotools.org/geotools/tags/2.3.2/module/api/src/org/geotools/data/Query.java">SVN head</A>)</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../org/geotools/data/Query.html" title="interface in org.geotools.data">Query</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/Query.html#ALL">ALL</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Implements a query that will fetch all features from a datasource. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<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/Query.html#ALL_NAMES">ALL_NAMES</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask for all properties when used with setPropertyNames.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/Query.html#DEFAULT_MAX">DEFAULT_MAX</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;So getMaxFeatures does not return null we use a very large number.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../org/geotools/data/Query.html" title="interface in org.geotools.data">Query</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/Query.html#FIDS">FIDS</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Implements a query that will fetch all the FeatureIDs from a datasource. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<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/Query.html#NO_NAMES">NO_NAMES</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask for no properties when used with setPropertyNames. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<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/Query.html#NO_NAMESPACE">NO_NAMESPACE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TODO: should this be ANY_URI</TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;CoordinateReferenceSystem</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/Query.html#getCoordinateSystem()">getCoordinateSystem</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Temporarily override the coordinate system. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;CoordinateReferenceSystem</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/Query.html#getCoordinateSystemReproject()">getCoordinateSystemReproject</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Request data reprojection. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../org/geotools/filter/Filter.html" title="interface in org.geotools.filter">Filter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/Query.html#getFilter()">getFilter</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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/Query.html#getHandle()">getHandle</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/Query.html#getMaxFeatures()">getMaxFeatures</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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/Query.html#getNamespace()">getNamespace</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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/Query.html#getPropertyNames()">getPropertyNames</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The properties array 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>&nbsp;SortBy[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/Query.html#getSortBy()">getSortBy</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SortBy results according to indicated property and order. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<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/Query.html#getTypeName()">getTypeName</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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/Query.html#getVersion()">getVersion</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/Query.html#retrieveAllProperties()">retrieveAllProperties</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to determine if the query should use the full schema (all properties) of the data source for the features returned.  </TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="NO_NAMESPACE"><!-- --></A><H3>NO_NAMESPACE</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A> <B>NO_NAMESPACE</B></PRE><DL><DD>TODO: should this be ANY_URI<P><DL></DL></DL><HR><A NAME="DEFAULT_MAX"><!-- --></A><H3>DEFAULT_MAX</H3><PRE>public static final int <B>DEFAULT_MAX</B></PRE><DL><DD>So getMaxFeatures does not return null we use a very large number.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.geotools.data.Query.DEFAULT_MAX">Constant Field Values</A></DL></DL><HR><A NAME="ALL"><!-- --></A><H3>ALL</H3><PRE>public static final <A HREF="../../../org/geotools/data/Query.html" title="interface in org.geotools.data">Query</A> <B>ALL</B></PRE><DL><DD>Implements a query that will fetch all features from a datasource. This query should retrieve all properties, with no maxFeatures, no filtering, and the default featureType.<P><DL></DL></DL><HR><A NAME="FIDS"><!-- --></A><H3>FIDS</H3><PRE>public static final <A HREF="../../../org/geotools/data/Query.html" title="interface in org.geotools.data">Query</A> <B>FIDS</B></PRE><DL><DD>Implements a query that will fetch all the FeatureIDs from a datasource. This query should retrive no properties, with no maxFeatures, no filtering, and the a featureType with no attribtues.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -