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

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