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

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