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/#unsignedShort">xs:unsignedShort</a> type.
   24    * One of the derived types based on <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#decimal">xs:decimal</a>.
   25    * <p>
   26    * Verified to be in the range 0..65535 when validating.
   27    * <p>
   28    * Convertible to a Java int.
   29    */ 
   30   public interface XmlUnsignedShort extends XmlUnsignedInt
   31   {
   32       /** The constant {@link SchemaType} object representing this schema type. */
   33       public static final SchemaType type = XmlBeans.getBuiltinTypeSystem().typeForHandle("_BI_unsignedShort");
   34       
   35       /** Returns this value as an int */
   36       int getIntValue();
   37       /** Sets this value as an int */
   38       void setIntValue(int v);
   39   
   40       /**
   41        * Returns this value as an int
   42        * @deprecated replaced with {@link #getIntValue}
   43        **/
   44       int intValue();
   45       /**
   46        * Sets this value as an int
   47        * @deprecated replaced with {@link #setIntValue}
   48        **/
   49       void set(int v);
   50   
   51       /**
   52        * A class with methods for creating instances
   53        * of {@link XmlUnsignedShort}.
   54        */
   55       public static final class Factory
   56       {
   57           /** Creates an empty instance of {@link XmlUnsignedShort} */
   58           public static XmlUnsignedShort newInstance() {
   59             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().newInstance( type, null ); }
   60           
   61           /** Creates an empty instance of {@link XmlUnsignedShort} */
   62           public static XmlUnsignedShort newInstance(org.apache.xmlbeans.XmlOptions options) {
   63             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().newInstance( type, options ); }
   64           
   65           /** Creates an immutable {@link XmlUnsignedShort} value */
   66           public static XmlUnsignedShort newValue(Object obj) {
   67             return (XmlUnsignedShort) type.newValue( obj ); }
   68           
   69           /** Parses a {@link XmlUnsignedShort} fragment from a String. For example: "<code>&lt;xml-fragment&gt;12345&lt;/xml-fragment&gt;</code>". */
   70           public static XmlUnsignedShort parse(java.lang.String s) throws org.apache.xmlbeans.XmlException {
   71             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( s, type, null ); }
   72           
   73           /** Parses a {@link XmlUnsignedShort} fragment from a String. For example: "<code>&lt;xml-fragment&gt;12345&lt;/xml-fragment&gt;</code>". */
   74           public static XmlUnsignedShort parse(java.lang.String s, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
   75             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( s, type, options ); }
   76           
   77           /** Parses a {@link XmlUnsignedShort} fragment from a File. */
   78           public static XmlUnsignedShort parse(java.io.File f) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   79             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( f, type, null ); }
   80           
   81           /** Parses a {@link XmlUnsignedShort} fragment from a File. */
   82           public static XmlUnsignedShort parse(java.io.File f, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   83             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( f, type, options ); }
   84           
   85           /** Parses a {@link XmlUnsignedShort} fragment from a URL. */
   86           public static XmlUnsignedShort parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   87             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( u, type, null ); }
   88   
   89           /** Parses a {@link XmlUnsignedShort} fragment from a URL. */
   90           public static XmlUnsignedShort parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   91             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( u, type, options ); }
   92   
   93           /** Parses a {@link XmlUnsignedShort} fragment from an InputStream. */
   94           public static XmlUnsignedShort parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   95             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( is, type, null ); }
   96           
   97           /** Parses a {@link XmlUnsignedShort} fragment from an InputStream. */
   98           public static XmlUnsignedShort parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
   99             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( is, type, options ); }
  100           
  101           /** Parses a {@link XmlUnsignedShort} fragment from a Reader. */
  102           public static XmlUnsignedShort parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
  103             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( r, type, null ); }
  104           
  105           /** Parses a {@link XmlUnsignedShort} fragment from a Reader. */
  106           public static XmlUnsignedShort parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
  107             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( r, type, options ); }
  108           
  109           /** Parses a {@link XmlUnsignedShort} fragment from a DOM Node. */
  110           public static XmlUnsignedShort parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
  111             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( node, type, null ); }
  112           
  113           /** Parses a {@link XmlUnsignedShort} fragment from a DOM Node. */
  114           public static XmlUnsignedShort parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
  115             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( node, type, options ); }
  116           
  117           /** Parses a {@link XmlUnsignedShort} fragment from an XMLInputStream.
  118            * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
  119            */
  120           public static XmlUnsignedShort parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
  121             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
  122           
  123           /** Parses a {@link XmlUnsignedShort} fragment from an XMLInputStream.
  124            * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
  125            */
  126           public static XmlUnsignedShort parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
  127             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
  128           
  129           /** Parses a {@link XmlUnsignedShort} fragment from an XMLStreamReader. */
  130           public static XmlUnsignedShort parse(javax.xml.stream.XMLStreamReader xsr) throws org.apache.xmlbeans.XmlException {
  131             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( xsr, type, null ); }
  132           
  133           /** Parses a {@link XmlUnsignedShort} fragment from an XMLStreamReader. */
  134           public static XmlUnsignedShort parse(javax.xml.stream.XMLStreamReader xsr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException{
  135             return (XmlUnsignedShort) XmlBeans.getContextTypeLoader().parse( xsr, type, options ); }
  136           
  137           /** Returns a validating XMLInputStream.
  138            * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
  139            */
  140           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 {
  141             return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
  142           
  143           /** Returns a validating XMLInputStream.
  144            * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
  145            */
  146           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 {
  147             return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
  148           
  149           private Factory() { } // No instance of this class allowed
  150       }
  151   }
  152   

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