featureattributetype.html

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

HTML
831 行
字号
<A NAME="parse(java.lang.Object)"><!-- --></A><H3>parse</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>parse</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;value)             throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A></CODE></B></DD><DD>Allows this AttributeType to convert an argument to its prefered storage type. If no parsing is possible, returns the original value. If a parse is attempted, yet fails (i.e. a poor decimal format) throw the Exception. This is mostly for use internally in Features, but implementors should simply follow the rules to be safe.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/AttributeType.html#parse(java.lang.Object)">parse</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the object to attempt parsing of.<DT><B>Returns:</B><DD><code>value</code> converted to the preferred storage of this         <code>AttributeType</code>.  If no parsing was possible then         the same object is returned.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if parsing is attempted and is         unsuccessful.</DL></DD></DL><HR><A NAME="validate(java.lang.Object)"><!-- --></A><H3>validate</H3><PRE>public void <B>validate</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;obj)              throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A></CODE></B></DD><DD>Whether the tested object passes the validity constraints of  this AttributeType.  At a minimum it should be of the correct class specified by <A HREF="../../../../org/geotools/feature/AttributeType.html#getType()"><CODE>AttributeType.getType()</CODE></A>, non-null if isNillable is <tt>false</tt>, and a geometry if isGeometry is <tt>true</tt>.  If The object does not validate then an IllegalArgumentException reporting the error in validation should be thrown.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/AttributeType.html#validate(java.lang.Object)">validate</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - The object to be tested for validity.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the object does not validate.</DL></DD></DL><HR><A NAME="duplicate(java.lang.Object)"><!-- --></A><H3>duplicate</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>duplicate</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;src)                 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/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A></CODE></B></DD><DD>Create a duplicate value of the passed Object. For immutable Objects, it is not neccessary to create a new Object.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/AttributeType.html#duplicate(java.lang.Object)">duplicate</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>src</CODE> - The Object to duplicate.<DT><B>Returns:</B><DD>Duplicate of provided object<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></CODE> - If the src Object is not the correct         type.</DL></DD></DL><HR><A NAME="createDefaultValue()"><!-- --></A><H3>createDefaultValue</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>createDefaultValue</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A></CODE></B></DD><DD>Create a default value for this AttributeType. If the type is nillable, the Object may or may not be null.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/AttributeType.html#createDefaultValue()">createDefaultValue</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/AttributeType.html" title="interface in org.geotools.feature">AttributeType</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Default value, note may be null if isNillable is true</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>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></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></DL></DD><DD><DL><DT><B>Returns:</B><DD>equivalent value to getAttributeTypes().length</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>&nbsp;xPath)</PRE><DL><DD>Gets the attributeType at this xPath, if the specified attributeType does not exist then null is returned.<P><DD><DL></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>&nbsp;type)</PRE><DL><DD>Find the position of a given AttributeType.<P><DD><DL></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>&nbsp;attName)</PRE><DL><DD>Find the position of an AttributeType which matches the given String.<P><DD><DL></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&nbsp;position)</PRE><DL><DD>Gets the attributeType at the specified index.<P><DD><DL></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><DL></DL></DD><DD><DL></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/FeatureAttributeType.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/type/DateUtil.html" title="class in org.geotools.feature.type"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/geotools/feature/type/GeometricAttributeType.html" title="class in org.geotools.feature.type"><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="FeatureAttributeType.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;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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 + -
显示快捷键?