setattributetype.html

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

HTML
830 行
字号
</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>This method is unstable ... and does not yet check validity well. TODO make this method robust  This method assumes the Objects are in the order of the attributes.  In the future, this should be implemented with a bubble sort type  algorithm for testing each object vs each child. Bubble sort is  recommended as the sample size is typically less than 25 elements,  and the operation takes O(n*n) time.  Note that on the Attribute side of the fence ... this is acutally  an unordered List (a Set of elements, where each element has multiplicity ...)<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>This method is unstable ... and does not yet check validity well. TODO make this method robust  This method assumes the Objects are in the order of the attributes.  In the future, this should be implemented with a bubble sort type  algorithm for testing each object vs each child. Bubble sort is  recommended as the sample size is typically less than 25 elements,  and the operation takes O(n*n) time.<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>This method is unstable ... and does not yet check validity well. TODO make this method robust  This method assumes the Objects are in the order of the attributes.  In the future, this should be implemented with a bubble sort type  algorithm for testing each object vs each child. Bubble sort is  recommended as the sample size is typically less than 25 elements,  and the operation takes O(n*n) time.<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/SetAttributeType.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/SchemaImpl.html" title="class in org.geotools.feature.type"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/geotools/feature/type/TemporalAttributeType.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="SetAttributeType.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 + -
显示快捷键?