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

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