abstractfeaturelist.html

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

HTML
1,047 行
字号
<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#getFeatureType()">getFeatureType</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A reference to this collections type</DL></DD></DL><HR><A NAME="getID()"><!-- --></A><H3>getID</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getID</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Gets the unique feature ID for this feature.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/Feature.html#getID()">getID</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>Unique identifier for this feature.</DL></DD></DL><HR><A NAME="getAttributes(java.lang.Object[])"><!-- --></A><H3>getAttributes</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>getAttributes</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)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Copy all the attributes of this Feature into the given array. If the argument array is null, a new one will be created. Gets all attributes from this feature, returned as a complex object array.  This array comes with no metadata, so to interpret this collection the caller class should ask for the schema as well.  This array may have multiple entries for each AttributeType depending  on the AttributeType's multiplicity.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/Feature.html#getAttributes(java.lang.Object[])">getAttributes</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>attributes</CODE> - An array to copy attributes into. May be null.<DT><B>Returns:</B><DD>The array passed in, or a new one if null.</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><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Gets an attribute for this feature at the location specified by xPath. Due to the complex nature of xpath, a List of all valid values will be returned when an attribute is requested. These values can range from complete Feature Collections to single primative attribute values. When a  particular instance of the Attribute is requested, then the Object will  be returned. Simply put, in the general case we are assuming the existance  of multiplicity, so specify which instance you want or you get them all.  Example of getting a list:    ./road     returns the List of road attribute instances    Example of getting an Object: ./road[0]  returns the first road<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 List of copies of the requested attribute, null if the         requested xpath is not found, or NULL_ATTRIBUTE.</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><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Gets an attribute by the given zero-based index. This index is based on the values  within the Feature as opposed to the AttributeType declaration. To get the values  for the 5th attributeType, use the schema to determine the xPath and class the  getAttribute(xPath) method.<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><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Sets an attribute by the given zero-based index. This index is based on the values  within the Feature as opposed to the AttributeType declaration. To get the values  for the 5th attributeType, use the schema to determine the xPath and class the  setAttribute(xPath,val) method.<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><HR><A NAME="getNumberOfAttributes()"><!-- --></A><H3>getNumberOfAttributes</H3><PRE>public int <B>getNumberOfAttributes</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Get the number of attributes this feature has. This is NOT simply a convenience method for calling getFeatureType().getNumberOfAttributes().   This is the same as calling getAttributes(null).length. This represents the number of  actual attribute values in the feature, and may differ from the number of AttributeTypes  defined in the FeatureType based on the multiplicity of the AttributeTypes.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/Feature.html#getNumberOfAttributes()">getNumberOfAttributes</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>The total number of attributes this Feature contains.</DL></DD></DL><HR><A NAME="setAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>setAttribute</H3><PRE>public void <B>setAttribute</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,                         <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;attribute)                  throws <A HREF="../../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Sets a single attribute for this feature, passed as a complex object. If the attribute does not exist or the object does not conform to the internal schema, an exception is thrown.  Checking this is, of course, left to the feature to do internally.  Well behaved features should always fully check the passed attributes against thire schema before adding them.  NOTE: The xPath may contain instance information about multiplicity,   for example: ./road[3] which is the third road attribute in this feature.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/Feature.html#setAttribute(java.lang.String, 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>xPath</CODE> - XPath representation of attribute location.<DD><CODE>attribute</CODE> - Feature attribute to 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 attribute is illegal for the         path specified.</DL></DD></DL><HR><A NAME="getDefaultGeometry()"><!-- --></A><H3>getDefaultGeometry</H3><PRE>public <A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/Geometry.html" title="class or interface in com.vividsolutions.jts.geom">Geometry</A> <B>getDefaultGeometry</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Gets the default geometry for this feature. <p> This method will return <code>null</code> if no DefaultGeometry has been defined by the schema. </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/Feature.html#getDefaultGeometry()">getDefaultGeometry</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>Default geometry for this feature, or <code>null</code></DL></DD></DL><HR><A NAME="setDefaultGeometry(com.vividsolutions.jts.geom.Geometry)"><!-- --></A><H3>

⌨️ 快捷键说明

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