Home » xmlbeans-2.5.0-src » org.apache » xmlbeans » [javadoc | source]

    1   /*   Copyright 2004 The Apache Software Foundation
    2    *
    3    *   Licensed under the Apache License, Version 2.0 (the "License");
    4    *   you may not use this file except in compliance with the License.
    5    *   You may obtain a copy of the License at
    6    *
    7    *       http://www.apache.org/licenses/LICENSE-2.0
    8    *
    9    *   Unless required by applicable law or agreed to in writing, software
   10    *   distributed under the License is distributed on an "AS IS" BASIS,
   11    *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   12    *   See the License for the specific language governing permissions and
   13    *  limitations under the License.
   14    */
   15   
   16   package org.apache.xmlbeans;
   17   
   18   import javax.xml.stream.XMLStreamReader;
   19   
   20   
   21   /**
   22    * Corresponds to the XML Schema
   23    * <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#float">xs:float</a> type.
   24    * <p>
   25    * Naturally, convertible to a Java float.
   26    */ 
   27   public interface XmlFloat extends XmlAnySimpleType
   28   {
   29       /** The constant {@link SchemaType} object representing this schema type. */
   30       public static final SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_float");
   31       
   32       /** Returns this value as a float */
   33       float getFloatValue();
   34       /** Sets this value as a float */
   35       void setFloatValue(float v);
   36   
   37       /**
   38        * Returns this value as a float
   39        * @deprecated replaced by {@link #getFloatValue}
   40        **/
   41       float floatValue();
   42       /**
   43        * Sets this value as a float
   44        * @deprecated replaced by {@link #setFloatValue}
   45        **/
   46       void set(float v);
   47       
   48       /**
   49        * A class with methods for creating instances
   50        * of {@link XmlFloat}.
   51        */
   52       public static final class Factory
   53       {
   54           /** Creates an empty instance of {@link XmlFloat} */
   55           public static XmlFloat newInstance() {
   56             return (XmlFloat) XmlBeans.getContextTypeLoader().newInstance( type, null ); }
   57           
   58           /** Creates an empty instance of {@link XmlFloat} */
   59           public static XmlFloat newInstance(org.apache.xmlbeans.XmlOptions options) {
   60             return (XmlFloat) XmlBeans.getContextTypeLoader().newInstance( type, options ); }
   61           
   62           /** Creates an immutable {@link XmlFloat} value */
   63           public static XmlFloat newValue(Object obj) {
   64             return (XmlFloat) type.newValue( obj ); }
   65           
   66           /** Parses a {@link XmlFloat} fragment from a String. For example: "<code>&lt;xml-fragment&gt;12.34e+5&lt;/xml-fragment&gt;</code>". */
   67           public static XmlFloat parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
   68             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( s, type, null ); }
   69           
   70           /** Parses a {@link XmlFloat} fragment from a String. For example: "<code>&lt;xml-fragment&gt;12.34e+5&lt;/xml-fragment&gt;</code>". */
   71           public static XmlFloat parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
   72             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( s, type, options ); }
   73           
   74           /** Parses a {@link XmlFloat} fragment from a File. */
   75           public static XmlFloat parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   76             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( f, type, null ); }
   77           
   78           /** Parses a {@link XmlFloat} fragment from a File. */
   79           public static XmlFloat parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   80             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( f, type, options ); }
   81           
   82           /** Parses a {@link XmlFloat} fragment from a URL. */
   83           public static XmlFloat parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   84             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( u, type, null ); }
   85   
   86           /** Parses a {@link XmlFloat} fragment from a URL. */
   87           public static XmlFloat parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   88             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( u, type, options ); }
   89   
   90           /** Parses a {@link XmlFloat} fragment from an InputStream. */
   91           public static XmlFloat parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   92             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( is, type, null ); }
   93           
   94           /** Parses a {@link XmlFloat} fragment from an InputStream. */
   95           public static XmlFloat parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   96             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( is, type, options ); }
   97           
   98           /** Parses a {@link XmlFloat} fragment from a Reader. */
   99           public static XmlFloat parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
  100             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( r, type, null ); }
  101           
  102           /** Parses a {@link XmlFloat} fragment from a Reader. */
  103           public static XmlFloat parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
  104             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( r, type, options ); }
  105           
  106           /** Parses a {@link XmlFloat} fragment from a DOM Node. */
  107           public static XmlFloat parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
  108             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( node, type, null ); }
  109           
  110           /** Parses a {@link XmlFloat} fragment from a DOM Node. */
  111           public static XmlFloat parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
  112             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( node, type, options ); }
  113           
  114           /** Parses a {@link XmlFloat} fragment from an XMLInputStream.
  115            * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
  116            */
  117           public static XmlFloat parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
  118             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
  119           
  120           /** Parses a {@link XmlFloat} fragment from an XMLInputStream.
  121            * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
  122            */
  123           public static XmlFloat parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
  124             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
  125           
  126           /** Parses a {@link XmlFloat} fragment from an XMLStreamReader. */
  127           public static XmlFloat parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
  128             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( xsr, type, null ); }
  129           
  130           /** Parses a {@link XmlFloat} fragment from an XMLStreamReader. */
  131           public static XmlFloat parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException{
  132             return (XmlFloat) XmlBeans.getContextTypeLoader().parse( xsr, type, options ); }
  133           
  134           /** Returns a validating XMLInputStream.
  135            * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
  136            */
  137           public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
  138             return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
  139           
  140           /** Returns a validating XMLInputStream.
  141            * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
  142            */
  143           public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
  144             return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
  145           
  146           private Factory() { } // No instance of this class allowed
  147       }
  148   }
  149   

Home » xmlbeans-2.5.0-src » org.apache » xmlbeans » [javadoc | source]