simplefeature.html

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

HTML
453 行
字号
<CODE>&nbsp;<A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/SimpleFeature.html#getFeatureType()">getFeatureType</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a reference to the schema for this feature. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/SimpleFeature.html#setAttribute(int, java.lang.Object)">setAttribute</A></B>(int&nbsp;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>&nbsp;val)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/feature/SimpleFeature.html#setAttributes(java.lang.Object[])">setAttributes</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>[]&nbsp;attributes)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets all attributes for this feature, passed as a complex object array. </TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_Feature"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface <A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../org/geotools/feature/Feature.html#getAttributes(java.lang.Object[])">getAttributes</A>, <A HREF="../../../org/geotools/feature/Feature.html#getBounds()">getBounds</A>, <A HREF="../../../org/geotools/feature/Feature.html#getDefaultGeometry()">getDefaultGeometry</A>, <A HREF="../../../org/geotools/feature/Feature.html#getID()">getID</A>, <A HREF="../../../org/geotools/feature/Feature.html#getNumberOfAttributes()">getNumberOfAttributes</A>, <A HREF="../../../org/geotools/feature/Feature.html#getParent()">getParent</A>, <A HREF="../../../org/geotools/feature/Feature.html#setAttribute(java.lang.String, java.lang.Object)">setAttribute</A>, <A HREF="../../../org/geotools/feature/Feature.html#setDefaultGeometry(com.vividsolutions.jts.geom.Geometry)">setDefaultGeometry</A>, <A HREF="../../../org/geotools/feature/Feature.html#setParent(org.geotools.feature.FeatureCollection)">setParent</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ 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="getFeatureType()"><!-- --></A><H3>getFeatureType</H3><PRE>public <A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A> <B>getFeatureType</B>()</PRE><DL><DD>Gets a reference to the schema for this feature. This method should always return DefaultFeatureType Object.  This will be explicitly posible in Java 1.5 (dz)<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/Feature.html#getFeatureType()">getFeatureType</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A reference to this simple feature's schema.</DL></DD></DL><HR><A NAME="setAttributes(java.lang.Object[])"><!-- --></A><H3>setAttributes</H3><PRE>public void <B>setAttributes</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>Sets all attributes for this feature, passed as a complex object array. Note that this array must conform to the internal schema for this feature, or it will throw an exception.  Checking this is, of course, left to the feature to do internally.  Well behaved features should always fully check the passed attributes against thier schema before adding them.  Since this is a SimpleFeature, the number of attributes will be exactly  the same as the number of attribute types. Attribute values will be paired  with attribute types based on array indexes.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attributes</CODE> - All feature attributes.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></CODE> - Passed attributes do not match schema.</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>public <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>getAttribute</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>This is the same as the parent declaration, except that when the instance  is not specified for the xPath, [0] will be added as there is only ever one  Attribute value for an AttributeType<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/Feature.html#getAttribute(java.lang.String)">getAttribute</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>xPath</CODE> - XPath representation of attribute location.<DT><B>Returns:</B><DD>A copy of the requested attribute, null if the requested xpath         is not found, or NULL_ATTRIBUTE.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/feature/Feature.html#getAttribute(java.lang.String)"><CODE>Feature.getAttribute(String)</CODE></A></DL></DD></DL><HR><A NAME="getAttribute(int)"><!-- --></A><H3>getAttribute</H3><PRE>public <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>getAttribute</B>(int&nbsp;index)</PRE><DL><DD>Gets an attribute by the given zero-based index. Unlike the parent interface,  this index is guaranteed to match the index of AttributeType in the FeatureType.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/Feature.html#getAttribute(int)">getAttribute</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - The requested index. Must be 0 &lt;= idx &lt;        getNumberOfAttributes().<DT><B>Returns:</B><DD>A copy of the requested attribute, or NULL_ATTRIBUTE.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/feature/Feature.html#getAttribute(java.lang.String)"><CODE>Feature.getAttribute(String)</CODE></A></DL></DD></DL><HR><A NAME="setAttribute(int, java.lang.Object)"><!-- --></A><H3>setAttribute</H3><PRE>public void <B>setAttribute</B>(int&nbsp;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>&nbsp;val)                  throws <A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A>,                         <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ArrayIndexOutOfBoundsException.html" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</A></PRE><DL><DD>Sets an attribute by the given zero-based index. Unlike the parent interface,  this index is guaranteed to match the index of AttributeType in the FeatureType.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/Feature.html#setAttribute(int, java.lang.Object)">setAttribute</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>position</CODE> - The requested index. Must be 0 &lt;= idx &lt;        getNumberOfAttributes()<DD><CODE>val</CODE> - An object representing the attribute being set<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></CODE> - if the passed in val does not validate         against the AttributeType at that position.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ArrayIndexOutOfBoundsException.html" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</A></CODE> - if an invalid position is given<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/feature/Feature.html#setAttribute(java.lang.String, java.lang.Object)"><CODE>Feature.setAttribute(String, Object)</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/SimpleFeature.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/PrimativeAttributeType.html" title="interface in org.geotools.feature"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="SimpleFeature.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 + -
显示快捷键?