featuretype.html

来自「Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理」· HTML 代码 · 共 989 行 · 第 1/4 页

HTML
989 行
字号
public <A HREF="../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A>[] <B>getAttributeTypes</B>()</PRE><DL><DD>AttributeTypes for this FeatureType, all attributes defined by this FeatureType and its super types define schema for feature instances. <p> The provided array of AttributeTypes should be considered as adding to (or overriding) the the AttribtueTypes defined by this FeatureTypes ancestors. </p> <p> Note Well: Client code should not consider the index provided by the find( attName ) method as a valid index into the returned array. </p><P><DD><DL><DT><B>Returns:</B><DD>Array of AttributeType describing this schema, array may be length 0, but should         not be null</DL></DD></DL><HR><A NAME="hasAttributeType(java.lang.String)"><!-- --></A><H3>hasAttributeType</H3><PRE>public boolean <B>hasAttributeType</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>&nbsp;xPath)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>It seems this method is ill concieved, use getAttributeType( xpath ) != null as a             replacement</I><P><DD>This is only used twice in the whole geotools code base, and one of those is for a test, so we're removing it from the interface. If getAttributeType does not have the AttributeType it will just return null. Gets the number of occurrences of this attribute. <p> Question: the comment says we are removing this, but it is not depricated? And how the heck can the number of occurances out of a boolean. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>xPath</CODE> - XPath pointer to attribute type.<DT><B>Returns:</B><DD>Number of occurrences.</DL></DD></DL><HR><A NAME="duplicate(org.geotools.feature.Feature)"><!-- --></A><H3>duplicate</H3><PRE>public <A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A> <B>duplicate</B>(<A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A>&nbsp;feature)                  throws <A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></PRE><DL><DD>Create a duplicate of the provided feature, must delegate to an appropriate FeatureFactory create method. <p> The implementation is assumed to make use of AttributeType duplicate as required for a deep copy. </p> //@deprecated This method will be removed in 2.2, please use FeatureFactory obtained from FactoryFinder<P><DD><DL><DT><B>Parameters:</B><DD><CODE>feature</CODE> - <DT><B>Returns:</B><DD>a deep copy of feature<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></CODE></DL></DD></DL><HR><A NAME="create(java.lang.Object[])"><!-- --></A><H3>create</H3><PRE>public <A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A> <B>create</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>[]&nbsp;attributes)               throws <A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></PRE><DL><DD>Creates a new feature, with a generated unique featureID. <p> Generating a FeatureID is less than ideal, as a FeatureID should be something special about the "real world object" being modeled as a feature. <p> As an example: the "Effiel Tower" is a great feature id (there is only one) and we can use that Feature ID in serveral systems: <ul> <li>In a tour guide FeatureTypes one which records (NAME, LOCATION, COST); and <li>In a historical reference (NAME, LOCATION, HIEGHT, DATE, HISTORY) </ul> <p> Explicitly a FeatureID should be persistant over time, and between systems. <p> The FeatureIDs "generated" by this method are generally created by a datasource. This method is more for testing that doesn't need featureID. </p> <p> Warning: This class does not follow the geotools guidelines of sepearting out Interface from Factory, in geotools 2.3 there will be a formal FeatureFactory allowing you to provide application specific FeatureImplementations as an orthogonal concern to definition of type. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>attributes</CODE> - the array of attribute values<DT><B>Returns:</B><DD>The created feature<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></CODE> - if the FeatureType does not validate the attributes.</DL></DD></DL><HR><A NAME="create(java.lang.Object[], java.lang.String)"><!-- --></A><H3>create</H3><PRE>public <A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A> <B>create</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>[]&nbsp;attributes,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;featureID)               throws <A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></PRE><DL><DD>Scheduled for removal in Geotools 2.2, please use FeatureFactory. <p> Creates a new feature, with the indicated featureID. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>attributes</CODE> - the array of attribute values.<DD><CODE>featureID</CODE> - the feature ID.<DT><B>Returns:</B><DD>the created feature.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></CODE> - if the FeatureType does not validate the attributes.</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</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>&nbsp;arg0)</PRE><DL><DD>FeatureType check based on namespace, typeName, attributes and ancestors. <p> Conceptually FeatureType equality is supped to indicate an exact match based AttributeType and Ancestors. The geotools models includes additional information of namespace and typename. </p> <p> As far as the geotools data model is concerned any FeatureType implementation should be able to be subsituted for another. (An actually application may provided an implementation that provdes tracking of metadata such as creation history, or support for additional interfaces). </p> <p> Required implementation:<pre><code> </code></pre> A sample implementation is provided in FeatureTypes.equals( FeatureType, FeatureType ). </p> <p> Questions: <br>Q: You may wonder why namespace and typeName are not enought? <br>A: Geotools often returns a "limitied" schema in response to a query where only a subset of the attributes are requested. <br>Q: Doesn't that still indicate the same schema? <br>A: Yes it kind of should, a GML application (such as GeoServer) has to actually follow the application schema and include attributes required by the schema (but not request by the query). This library is more lax in its treatment, and expects you to uses isDecendedFrom as required. </p><P><DD><DL></DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Hascode based on namespace, typeName, attributes and ancestors. <p> Hascode is always a matched set with an equals implementation, please see the javadocs for equals for a detailed discussion. </p><P><DD><DL><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang"><CODE>Object.hashCode()</CODE></A></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>&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/FeatureType.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/feature/FeatureList.html" title="interface in org.geotools.feature"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/geotools/feature/GeometryAttributeType.html" title="interface in org.geotools.feature"><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="FeatureType.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright &copy; 1996-2007 <a href="http://www.geotools.org">Geotools</a>. All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

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