defaultfeaturetype.html
来自「Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理」· HTML 代码 · 共 961 行 · 第 1/4 页
HTML
961 行
<DT><B>Returns:</B><DD>The created feature with this as its feature type.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></CODE> - if this 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>[] 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> featureID) throws <A HREF="../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></PRE><DL><DD>Creates a new feature, with the proper featureID, using this FeatureType.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#create(java.lang.Object[], java.lang.String)">create</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><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 this FeatureType does not validate the attributes.</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> original) 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/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#duplicate(org.geotools.feature.Feature)">duplicate</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>original</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="getDefaultGeometry()"><!-- --></A><H3>getDefaultGeometry</H3><PRE>public <A HREF="../../../org/geotools/feature/GeometryAttributeType.html" title="interface in org.geotools.feature">GeometryAttributeType</A> <B>getDefaultGeometry</B>()</PRE><DL><DD>Gets the default geometry AttributeType. If the FeatureType has more one geometry it is up to the implementor to determine which geometry is the default. If working with multiple geometries it is best to get the attributeTypes and iterate through them, checking isGeometry on each. This should just be used a convenience method when it is known that the features are flat.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#getDefaultGeometry()">getDefaultGeometry</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The attribute type of the default geometry, which will contain the position.</DL></DD></DL><HR><A NAME="getAttributeType(java.lang.String)"><!-- --></A><H3>getAttributeType</H3><PRE>public <A HREF="../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A> <B>getAttributeType</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> xPath)</PRE><DL><DD>Gets the attributeType at this xPath, if the specified attributeType does not exist then null is returned.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#getAttributeType(java.lang.String)">getAttributeType</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>xPath</CODE> - XPath pointer to attribute type.<DT><B>Returns:</B><DD>True if attribute exists.</DL></DD></DL><HR><A NAME="find(org.geotools.feature.AttributeType)"><!-- --></A><H3>find</H3><PRE>public int <B>find</B>(<A HREF="../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A> type)</PRE><DL><DD>Find the position of a given AttributeType.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#find(org.geotools.feature.AttributeType)">find</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - The type to search for.<DT><B>Returns:</B><DD>-1 if not found, a zero-based index if found.</DL></DD></DL><HR><A NAME="find(java.lang.String)"><!-- --></A><H3>find</H3><PRE>public int <B>find</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> attName)</PRE><DL><DD>Find the position of an AttributeType which matches the given String.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#find(java.lang.String)">find</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attName</CODE> - the name to look for<DT><B>Returns:</B><DD>-1 if not found, zero-based index otherwise</DL></DD></DL><HR><A NAME="getAttributeType(int)"><!-- --></A><H3>getAttributeType</H3><PRE>public <A HREF="../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A> <B>getAttributeType</B>(int position)</PRE><DL><DD>Gets the attributeType at the specified index.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#getAttributeType(int)">getAttributeType</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>position</CODE> - the position of the attribute to check.<DT><B>Returns:</B><DD>The attribute type at the specified position.</DL></DD></DL><HR><A NAME="getAttributeTypes()"><!-- --></A><H3>getAttributeTypes</H3><PRE>public <A HREF="../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A>[] <B>getAttributeTypes</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#getAttributeTypes()">getAttributeTypes</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><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="getNamespace()"><!-- --></A><H3>getNamespace</H3><PRE>public <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>getNamespace</B>()</PRE><DL><DD>Gets the global schema namespace.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#getNamespace()">getNamespace</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Namespace of schema.</DL></DD></DL><HR><A NAME="getTypeName()"><!-- --></A><H3>getTypeName</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>getTypeName</B>()</PRE><DL><DD>Gets the type name for this schema.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#getTypeName()">getTypeName</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Namespace of schema.</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> xPath)</PRE><DL><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><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureType.html#hasAttributeType(java.lang.String)">hasAttributeType</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></DL></DD><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="getAttributeCount()"><!-- --></A><H3>getAttributeCount</H3><PRE>public int <B>getAttributeCount</B>()</PRE><DL><DD>Returns the number of attributes at the first 'level' of the schema.<P><DD><DL>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?