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/#double">xs:double</a> type.
   24    * <p>
   25    * Naturally, convertible to a Java double.
   26    */ 
   27   public interface XmlDouble extends XmlAnySimpleType
   28   {
   29       /** The constant {@link SchemaType} object representing this schema type. */
   30       public static final SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_double");
   31       
   32       /** Returns this value as a double */
   33       double getDoubleValue();
   34       /** Sets this value as a double */
   35       void setDoubleValue(double v);
   36   
   37       /**
   38        * Returns this value as a double
   39        * @deprecated replaced with {@link #getDoubleValue}
   40        **/
   41       double doubleValue();
   42       /**
   43        * Sets this value as a double
   44        * @deprecated replaced with {@link #setDoubleValue}
   45        **/
   46       void set(double v);
   47   
   48       /**
   49        * A class with methods for creating instances
   50        * of {@link XmlDouble}.
   51        */
   52       public static final class Factory
   53       {
   54           /** Creates an empty instance of {@link XmlDouble} */
   55           public static XmlDouble newInstance() {
   56             return (XmlDouble) XmlBeans.getContextTypeLoader().newInstance( type, null ); }
   57           
   58           /** Creates an empty instance of {@link XmlDouble} */
   59           public static XmlDouble newInstance(org.apache.xmlbeans.XmlOptions options) {
   60             return (XmlDouble) XmlBeans.getContextTypeLoader().newInstance( type, options ); }
   61           
   62           /** Creates an immutable {@link XmlDouble} value */
   63           public static XmlDouble newValue(Object obj) {
   64             return (XmlDouble) type.newValue( obj ); }
   65           
   66           /** Parses a {@link XmlDouble} fragment from a String. For example: "<code>&lt;xml-fragment&gt;123.34e+57&lt;/xml-fragment&gt;</code>". */
   67           public static XmlDouble parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
   68             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( s, type, null ); }
   69           
   70           /** Parses a {@link XmlDouble} fragment from a String. For example: "<code>&lt;xml-fragment&gt;123.34e+57&lt;/xml-fragment&gt;</code>". */
   71           public static XmlDouble parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
   72             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( s, type, options ); }
   73           
   74           /** Parses a {@link XmlDouble} fragment from a File. */
   75           public static XmlDouble parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   76             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( f, type, null ); }
   77           
   78           /** Parses a {@link XmlDouble} fragment from a File. */
   79           public static XmlDouble parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   80             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( f, type, options ); }
   81           
   82           /** Parses a {@link XmlDouble} fragment from a URL. */
   83           public static XmlDouble parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   84             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( u, type, null ); }
   85   
   86           /** Parses a {@link XmlDouble} fragment from a URL. */
   87           public static XmlDouble parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   88             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( u, type, options ); }
   89   
   90           /** Parses a {@link XmlDouble} fragment from an InputStream. */
   91           public static XmlDouble parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   92             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( is, type, null ); }
   93           
   94           /** Parses a {@link XmlDouble} fragment from an InputStream. */
   95           public static XmlDouble parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   96             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( is, type, options ); }
   97           
   98           /** Parses a {@link XmlDouble} fragment from a Reader. */
   99           public static XmlDouble parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
  100             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( r, type, null ); }
  101           
  102           /** Parses a {@link XmlDouble} fragment from a Reader. */
  103           public static XmlDouble parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
  104             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( r, type, options ); }
  105           
  106           /** Parses a {@link XmlDouble} fragment from a DOM Node. */
  107           public static XmlDouble parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
  108             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( node, type, null ); }
  109           
  110           /** Parses a {@link XmlDouble} fragment from a DOM Node. */
  111           public static XmlDouble parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
  112             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( node, type, options ); }
  113           
  114           /** Parses a {@link XmlDouble} fragment from an XMLInputStream.
  115            * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
  116            */
  117           public static XmlDouble parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
  118             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
  119           
  120           /** Parses a {@link XmlDouble} fragment from an XMLInputStream.
  121            * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
  122            */
  123           public static XmlDouble 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 (XmlDouble) XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
  125           
  126           /** Parses a {@link XmlDouble} fragment from an XMLStreamReader. */
  127           public static XmlDouble parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
  128             return (XmlDouble) XmlBeans.getContextTypeLoader().parse( xsr, type, null ); }
  129           
  130           /** Parses a {@link XmlDouble} fragment from an XMLStreamReader. */
  131           public static XmlDouble parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException{
  132             return (XmlDouble) 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]