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

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