simplebinding.html
来自「Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理」· HTML 代码 · 共 332 行 · 第 1/2 页
HTML
332 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_13) on Tue Jun 05 11:36:30 GMT-05:00 2007 --><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><TITLE>SimpleBinding (Geotools 2.3.x 2.3.2 API)</TITLE><META NAME="keywords" CONTENT="org.geotools.xml.SimpleBinding interface"><META NAME="keywords" CONTENT="parse()"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="SimpleBinding (Geotools 2.3.x 2.3.2 API)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SimpleBinding.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../org/geotools/xml/SchemaIndex.html" title="interface in org.geotools.xml"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="SimpleBinding.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.geotools.xml</FONT><BR>Interface SimpleBinding</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../org/geotools/xml/Binding.html" title="interface in org.geotools.xml">Binding</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../org/geotools/xml/AbstractSimpleBinding.html" title="class in org.geotools.xml">AbstractSimpleBinding</A>, <A HREF="../../../org/geotools/gml2/bindings/GMLNullTypeBinding.html" title="class in org.geotools.gml2.bindings">GMLNullTypeBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSAllNNIBinding.html" title="class in org.geotools.xs.bindings">XSAllNNIBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSAnySimpleTypeBinding.html" title="class in org.geotools.xs.bindings">XSAnySimpleTypeBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSAnyURIBinding.html" title="class in org.geotools.xs.bindings">XSAnyURIBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSBase64BinaryBinding.html" title="class in org.geotools.xs.bindings">XSBase64BinaryBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSBlockSetBinding.html" title="class in org.geotools.xs.bindings">XSBlockSetBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSBooleanBinding.html" title="class in org.geotools.xs.bindings">XSBooleanBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSByteBinding.html" title="class in org.geotools.xs.bindings">XSByteBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSDateBinding.html" title="class in org.geotools.xs.bindings">XSDateBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSDateTimeBinding.html" title="class in org.geotools.xs.bindings">XSDateTimeBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSDecimalBinding.html" title="class in org.geotools.xs.bindings">XSDecimalBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSDerivationControlBinding.html" title="class in org.geotools.xs.bindings">XSDerivationControlBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSDerivationSetBinding.html" title="class in org.geotools.xs.bindings">XSDerivationSetBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSDoubleBinding.html" title="class in org.geotools.xs.bindings">XSDoubleBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSDurationBinding.html" title="class in org.geotools.xs.bindings">XSDurationBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSENTITIESBinding.html" title="class in org.geotools.xs.bindings">XSENTITIESBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSENTITYBinding.html" title="class in org.geotools.xs.bindings">XSENTITYBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSFloatBinding.html" title="class in org.geotools.xs.bindings">XSFloatBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSFormChoiceBinding.html" title="class in org.geotools.xs.bindings">XSFormChoiceBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSFullDerivationSetBinding.html" title="class in org.geotools.xs.bindings">XSFullDerivationSetBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSGDayBinding.html" title="class in org.geotools.xs.bindings">XSGDayBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSGMonthBinding.html" title="class in org.geotools.xs.bindings">XSGMonthBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSGMonthDayBinding.html" title="class in org.geotools.xs.bindings">XSGMonthDayBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSGYearBinding.html" title="class in org.geotools.xs.bindings">XSGYearBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSGYearMonthBinding.html" title="class in org.geotools.xs.bindings">XSGYearMonthBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSHexBinaryBinding.html" title="class in org.geotools.xs.bindings">XSHexBinaryBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSIDBinding.html" title="class in org.geotools.xs.bindings">XSIDBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSIDREFBinding.html" title="class in org.geotools.xs.bindings">XSIDREFBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSIDREFSBinding.html" title="class in org.geotools.xs.bindings">XSIDREFSBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSIntBinding.html" title="class in org.geotools.xs.bindings">XSIntBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSIntegerBinding.html" title="class in org.geotools.xs.bindings">XSIntegerBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSLanguageBinding.html" title="class in org.geotools.xs.bindings">XSLanguageBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSLongBinding.html" title="class in org.geotools.xs.bindings">XSLongBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSNameBinding.html" title="class in org.geotools.xs.bindings">XSNameBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSNamespaceListBinding.html" title="class in org.geotools.xs.bindings">XSNamespaceListBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSNCNameBinding.html" title="class in org.geotools.xs.bindings">XSNCNameBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSNegativeIntegerBinding.html" title="class in org.geotools.xs.bindings">XSNegativeIntegerBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSNMTOKENBinding.html" title="class in org.geotools.xs.bindings">XSNMTOKENBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSNMTOKENSBinding.html" title="class in org.geotools.xs.bindings">XSNMTOKENSBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSNonNegativeIntegerBinding.html" title="class in org.geotools.xs.bindings">XSNonNegativeIntegerBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSNonPositiveIntegerBinding.html" title="class in org.geotools.xs.bindings">XSNonPositiveIntegerBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSNormalizedStringBinding.html" title="class in org.geotools.xs.bindings">XSNormalizedStringBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSNOTATIONBinding.html" title="class in org.geotools.xs.bindings">XSNOTATIONBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSPositiveIntegerBinding.html" title="class in org.geotools.xs.bindings">XSPositiveIntegerBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSPublicBinding.html" title="class in org.geotools.xs.bindings">XSPublicBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSQNameBinding.html" title="class in org.geotools.xs.bindings">XSQNameBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSReducedDerivationControlBinding.html" title="class in org.geotools.xs.bindings">XSReducedDerivationControlBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSShortBinding.html" title="class in org.geotools.xs.bindings">XSShortBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSSimpleDerivationSetBinding.html" title="class in org.geotools.xs.bindings">XSSimpleDerivationSetBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSStringBinding.html" title="class in org.geotools.xs.bindings">XSStringBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSTimeBinding.html" title="class in org.geotools.xs.bindings">XSTimeBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSTokenBinding.html" title="class in org.geotools.xs.bindings">XSTokenBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSTypeDerivationControlBinding.html" title="class in org.geotools.xs.bindings">XSTypeDerivationControlBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSUnsignedByteBinding.html" title="class in org.geotools.xs.bindings">XSUnsignedByteBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSUnsignedIntBinding.html" title="class in org.geotools.xs.bindings">XSUnsignedIntBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSUnsignedLongBinding.html" title="class in org.geotools.xs.bindings">XSUnsignedLongBinding</A>, <A HREF="../../../org/geotools/xs/bindings/XSUnsignedShortBinding.html" title="class in org.geotools.xs.bindings">XSUnsignedShortBinding</A></DD></DL><HR><DL><DT>public interface <B>SimpleBinding</B><DT>extends <A HREF="../../../org/geotools/xml/Binding.html" title="interface in org.geotools.xml">Binding</A></DL><P>A strategy for parsing components in an instance document which are of simple type. <p> Simple types can be manifested in elements and in attributes. Simple type strategies must be capable of parsing simple values regardless of the form. </p> <p> Strategy objects must declare how they relate to other strategy objects in the type hierarchy of the type they parse. To allow strategy objects which relate through a type hiearchy to communicate, a value is passed along to strategies as they are executed. As an example, consider the strategies for <b>integer</b> and <b>decimal</b>. </p> <pre> <code> class DecimalStrategy implements Strategy { ... int getExecutionMode() { return OVERRIDE; } Object parse(InstanceComponent instance, Object value) throws Exception { BigDecimal decimal = new BigDecimal(instance.getText()); return decimal; } ... } class IntegerStrategy implements Strategy { ... int getExecutionMode() { return AFTER; } Object parse(InstanceComponent instance, Object value) throws Exception { BigDecimal decimal = (BigDecimal)value; return decimal.toBigInteger(); } ... } </code> </pre> <p> In the above example, the decimal strategy is at the top of the hierarchy as it declares its execution mode as <A HREF="../../../org/geotools/xml/Binding.html#OVERRIDE"><CODE>Binding.OVERRIDE</CODE></A>. Therefore it must process the raw text of the instance being parsed, and transform it into the specific object, in this case an object of type BigDecimal. </p> <p> The integer strategy extends the decimal strategy as it declares its execution mode as <A HREF="../../../org/geotools/xml/Binding.html#AFTER"><CODE>Binding.AFTER</CODE></A>. Therefore the integer strategy has access to the result of the decimal strategy, and can simply transform the result of the decimal strategy into its specific type. In this case an object of type BigInteger. </p><P>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?