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 org.apache.xmlbeans.xml.stream.XMLInputStream;
   19   
   20   import java.io.InputStream;
   21   import java.io.Reader;
   22   import java.io.File;
   23   import java.io.IOException;
   24   import java.io.OutputStream;
   25   import java.io.Writer;
   26   import java.math.BigInteger;
   27   import java.math.BigDecimal;
   28   import java.util.Calendar;
   29   import java.util.Date;
   30   import java.util.List;
   31   
   32   import org.w3c.dom.Node;
   33   import org.xml.sax.ContentHandler;
   34   import org.xml.sax.SAXException;
   35   import org.xml.sax.ext.LexicalHandler;
   36   
   37   import javax.xml.namespace.QName;
   38   import javax.xml.stream.XMLStreamReader;
   39   
   40   /**
   41    * A FilterXmlObject delegates to some other XmlObject, which it can use as
   42    * its basic source of data, possibly transforming the data along the way or
   43    * providing additional functionality. The class FilterXmlObject itself
   44    * simply overrides all methods of XmlObject with versions that pass all
   45    * requests to the underlying XmlObject. Subclasses of FilterXmlObject may
   46    * further override some of these methods and may also provide additional
   47    * methods and fields.
   48    * <p>
   49    * Note: it is important that FilterXmlObject has no storage (i.e., no
   50    * non-transient fields), because subclasses may be serializable and
   51    * adding storage would break the serialization format.
   52    */
   53   public abstract class FilterXmlObject implements XmlObject, SimpleValue, DelegateXmlObject
   54   {
   55       public SchemaType schemaType()
   56       {
   57           return underlyingXmlObject().schemaType();
   58       }
   59   
   60       public boolean validate()
   61       {
   62           return underlyingXmlObject().validate();
   63       }
   64   
   65       public boolean validate(XmlOptions options)
   66       {
   67           return underlyingXmlObject().validate(options);
   68       }
   69   
   70       public XmlObject[] selectPath(String path)
   71       {
   72           return underlyingXmlObject().selectPath(path);
   73       }
   74   
   75       public XmlObject[] selectPath(String path, XmlOptions options)
   76       {
   77           return underlyingXmlObject().selectPath(path, options);
   78       }
   79   
   80       public XmlObject[] execQuery(String query)
   81       {
   82           return underlyingXmlObject().execQuery(query);
   83       }
   84   
   85       public XmlObject[] execQuery(String query, XmlOptions options)
   86       {
   87           return underlyingXmlObject().execQuery(query, options);
   88       }
   89   
   90       public XmlObject changeType(SchemaType newType)
   91       {
   92           return underlyingXmlObject().changeType(newType);
   93       }
   94   
   95       public boolean isNil()
   96       {
   97           return underlyingXmlObject().isNil();
   98       }
   99   
  100       public void setNil()
  101       {
  102           underlyingXmlObject().setNil();
  103       }
  104   
  105       public boolean isImmutable()
  106       {
  107           return underlyingXmlObject().isImmutable();
  108       }
  109   
  110       public XmlObject set(XmlObject srcObj)
  111       {
  112           return underlyingXmlObject().set(srcObj);
  113       }
  114   
  115       public XmlObject copy()
  116       {
  117           return underlyingXmlObject().copy();
  118       }
  119   
  120       public boolean valueEquals(XmlObject obj)
  121       {
  122           return underlyingXmlObject().valueEquals(obj);
  123       }
  124   
  125       public int valueHashCode()
  126       {
  127           return underlyingXmlObject().valueHashCode();
  128       }
  129   
  130       public int compareTo(Object obj)
  131       {
  132           return underlyingXmlObject().compareTo(obj);
  133       }
  134   
  135       public int compareValue(XmlObject obj)
  136       {
  137           return underlyingXmlObject().compareValue(obj);
  138       }
  139   
  140       public Object monitor()
  141       {
  142           return underlyingXmlObject().monitor();
  143       }
  144   
  145       public XmlDocumentProperties documentProperties()
  146       {
  147           return underlyingXmlObject().documentProperties();
  148       }
  149   
  150       public XmlCursor newCursor()
  151       {
  152           return underlyingXmlObject().newCursor();
  153       }
  154   
  155       /**
  156        * @deprecated Deprecated by XMLStreamReader from STaX - jsr173 API.
  157        */
  158       public XMLInputStream newXMLInputStream()
  159       {
  160           return underlyingXmlObject().newXMLInputStream();
  161       }
  162   
  163       public XMLStreamReader newXMLStreamReader()
  164       {
  165           return underlyingXmlObject().newXMLStreamReader();
  166       }
  167   
  168       public String xmlText()
  169       {
  170           return underlyingXmlObject().xmlText();
  171       }
  172   
  173       public InputStream newInputStream()
  174       {
  175           return underlyingXmlObject().newInputStream();
  176       }
  177   
  178       public Reader newReader()
  179       {
  180           return underlyingXmlObject().newReader();
  181       }
  182   
  183       public Node newDomNode()
  184       {
  185           return underlyingXmlObject().newDomNode();
  186       }
  187   
  188       public Node getDomNode()
  189       {
  190           return underlyingXmlObject().getDomNode();
  191       }
  192   
  193       public void save(ContentHandler ch, LexicalHandler lh) throws SAXException
  194       {
  195           underlyingXmlObject().save(ch, lh);
  196       }
  197   
  198       public void save(File file) throws IOException
  199       {
  200           underlyingXmlObject().save(file);
  201       }
  202   
  203       public void save(OutputStream os) throws IOException
  204       {
  205           underlyingXmlObject().save(os);
  206       }
  207   
  208       public void save(Writer w) throws IOException
  209       {
  210           underlyingXmlObject().save(w);
  211       }
  212   
  213       /**
  214        * @deprecated Deprecated by XMLStreamReader from STaX - jsr173 API.
  215        */
  216       public XMLInputStream newXMLInputStream(XmlOptions options)
  217       {
  218           return underlyingXmlObject().newXMLInputStream(options);
  219       }
  220   
  221       public XMLStreamReader newXMLStreamReader(XmlOptions options)
  222       {
  223           return underlyingXmlObject().newXMLStreamReader(options);
  224       }
  225   
  226       public String xmlText(XmlOptions options)
  227       {
  228           return underlyingXmlObject().xmlText(options);
  229       }
  230   
  231       public InputStream newInputStream(XmlOptions options)
  232       {
  233           return underlyingXmlObject().newInputStream(options);
  234       }
  235   
  236       public Reader newReader(XmlOptions options)
  237       {
  238           return underlyingXmlObject().newReader(options);
  239       }
  240   
  241       public Node newDomNode(XmlOptions options)
  242       {
  243           return underlyingXmlObject().newDomNode(options);
  244       }
  245   
  246       public void save(ContentHandler ch, LexicalHandler lh, XmlOptions options) throws SAXException
  247       {
  248           underlyingXmlObject().save(ch, lh, options);
  249       }
  250   
  251       public void save(File file, XmlOptions options) throws IOException
  252       {
  253           underlyingXmlObject().save(file, options);
  254       }
  255   
  256       public void save(OutputStream os, XmlOptions options) throws IOException
  257       {
  258           underlyingXmlObject().save(os, options);
  259       }
  260   
  261       public void save(Writer w, XmlOptions options) throws IOException
  262       {
  263           underlyingXmlObject().save(w, options);
  264       }
  265   
  266       public SchemaType instanceType()
  267       {
  268           return ((SimpleValue)underlyingXmlObject()).instanceType();
  269       }
  270   
  271       /**
  272        * @deprecated replaced with {@link #getStringValue}
  273        */
  274       public String stringValue()
  275       {
  276           return ((SimpleValue)underlyingXmlObject()).stringValue();
  277       }
  278   
  279       /**
  280        * @deprecated replaced with {@link #getBooleanValue}
  281        */
  282       public boolean booleanValue()
  283       {
  284           return ((SimpleValue)underlyingXmlObject()).booleanValue();
  285       }
  286   
  287       /**
  288        * @deprecated replaced with {@link #getByteValue}
  289        */
  290       public byte byteValue()
  291       {
  292           return ((SimpleValue)underlyingXmlObject()).byteValue();
  293       }
  294   
  295       /**
  296        * @deprecated replaced with {@link #getShortValue}
  297        */
  298       public short shortValue()
  299       {
  300           return ((SimpleValue)underlyingXmlObject()).shortValue();
  301       }
  302   
  303       /**
  304        * @deprecated replaced with {@link #getIntValue}
  305        */
  306       public int intValue()
  307       {
  308           return ((SimpleValue)underlyingXmlObject()).intValue();
  309       }
  310   
  311       /**
  312        * @deprecated replaced with {@link #getLongValue}
  313        */
  314       public long longValue()
  315       {
  316           return ((SimpleValue)underlyingXmlObject()).longValue();
  317       }
  318   
  319       /**
  320        * @deprecated replaced with {@link #getBigIntegerValue}
  321        */
  322       public BigInteger bigIntegerValue()
  323       {
  324           return ((SimpleValue)underlyingXmlObject()).bigIntegerValue();
  325       }
  326   
  327       /**
  328        * @deprecated replaced with {@link #getBigDecimalValue}
  329        */
  330       public BigDecimal bigDecimalValue()
  331       {
  332           return ((SimpleValue)underlyingXmlObject()).bigDecimalValue();
  333       }
  334   
  335       /**
  336        * @deprecated replaced with {@link #getFloatValue}
  337        */
  338       public float floatValue()
  339       {
  340           return ((SimpleValue)underlyingXmlObject()).floatValue();
  341       }
  342   
  343       /**
  344        * @deprecated replaced with {@link #getDoubleValue}
  345        */
  346       public double doubleValue()
  347       {
  348           return ((SimpleValue)underlyingXmlObject()).doubleValue();
  349       }
  350   
  351       /**
  352        * @deprecated replaced with {@link #getByteArrayValue}
  353        */
  354       public byte[] byteArrayValue()
  355       {
  356           return ((SimpleValue)underlyingXmlObject()).byteArrayValue();
  357       }
  358   
  359       /**
  360        * @deprecated replaced with {@link #getEnumValue}
  361        */
  362       public StringEnumAbstractBase enumValue()
  363       {
  364           return ((SimpleValue)underlyingXmlObject()).enumValue();
  365       }
  366   
  367       /**
  368        * @deprecated replaced with {@link #getCalendarValue}
  369        */
  370       public Calendar calendarValue()
  371       {
  372           return ((SimpleValue)underlyingXmlObject()).calendarValue();
  373       }
  374   
  375       /**
  376        * @deprecated replaced with {@link #getDateValue}
  377        */
  378       public Date dateValue()
  379       {
  380           return ((SimpleValue)underlyingXmlObject()).dateValue();
  381       }
  382   
  383       /**
  384        * @deprecated replaced with {@link #getGDateValue}
  385        */
  386       public GDate gDateValue()
  387       {
  388           return ((SimpleValue)underlyingXmlObject()).gDateValue();
  389       }
  390   
  391       /**
  392        * @deprecated replaced with {@link #getGDurationValue}
  393        */
  394       public GDuration gDurationValue()
  395       {
  396           return ((SimpleValue)underlyingXmlObject()).gDurationValue();
  397       }
  398   
  399       /**
  400        * @deprecated replaced with {@link #getQNameValue}
  401        */
  402       public QName qNameValue()
  403       {
  404           return ((SimpleValue)underlyingXmlObject()).qNameValue();
  405       }
  406   
  407       /**
  408        * @deprecated replaced with {@link #getListValue}
  409        */
  410       public List listValue()
  411       {
  412           return ((SimpleValue)underlyingXmlObject()).listValue();
  413       }
  414   
  415       /**
  416        * @deprecated replaced with {@link #getListValue}
  417        */
  418       public List xlistValue()
  419       {
  420           return ((SimpleValue)underlyingXmlObject()).xlistValue();
  421       }
  422   
  423       /**
  424        * @deprecated replaced with {@link #getObjectValue}
  425        */
  426       public Object objectValue()
  427       {
  428           return ((SimpleValue)underlyingXmlObject()).objectValue();
  429       }
  430   
  431       /**
  432        * @deprecated replaced with {@link #setStringValue}
  433        */
  434       public void set(String obj)
  435       {
  436           ((SimpleValue)underlyingXmlObject()).set(obj);
  437       }
  438   
  439       /**
  440        * @deprecated replaced with {@link #setBooleanValue}
  441        */
  442       public void set(boolean v)
  443       {
  444           ((SimpleValue)underlyingXmlObject()).set(v);
  445       }
  446   
  447       /**
  448        * @deprecated replaced with {@link #setByteValue}
  449        */
  450       public void set(byte v)
  451       {
  452           ((SimpleValue)underlyingXmlObject()).set(v);
  453       }
  454   
  455       /**
  456        * @deprecated replaced with {@link #setShortValue}
  457        */
  458       public void set(short v)
  459       {
  460           ((SimpleValue)underlyingXmlObject()).set(v);
  461       }
  462   
  463       /**
  464        * @deprecated replaced with {@link #setIntValue}
  465        */
  466       public void set(int v)
  467       {
  468           ((SimpleValue)underlyingXmlObject()).set(v);
  469       }
  470   
  471       /**
  472        * @deprecated replaced with {@link #setLongValue}
  473        */
  474       public void set(long v)
  475       {
  476           ((SimpleValue)underlyingXmlObject()).set(v);
  477       }
  478   
  479       /**
  480        * @deprecated replaced with {@link #setBigIntegerValue}
  481        */
  482       public void set(BigInteger obj)
  483       {
  484           ((SimpleValue)underlyingXmlObject()).set(obj);
  485       }
  486   
  487       /**
  488        * @deprecated replaced with {@link #setBigDecimalValue}
  489        */
  490       public void set(BigDecimal obj)
  491       {
  492           ((SimpleValue)underlyingXmlObject()).set(obj);
  493       }
  494   
  495       /**
  496        * @deprecated replaced with {@link #setFloatValue}
  497        */
  498       public void set(float v)
  499       {
  500           ((SimpleValue)underlyingXmlObject()).set(v);
  501       }
  502   
  503       /**
  504        * @deprecated replaced with {@link #setDoubleValue}
  505        */
  506       public void set(double v)
  507       {
  508           ((SimpleValue)underlyingXmlObject()).set(v);
  509       }
  510   
  511       /**
  512        * @deprecated replaced with {@link #setByteArrayValue}
  513        */
  514       public void set(byte[] obj)
  515       {
  516           ((SimpleValue)underlyingXmlObject()).set(obj);
  517       }
  518   
  519       /**
  520        * @deprecated replaced with {@link #setEnumValue}
  521        */
  522       public void set(StringEnumAbstractBase obj)
  523       {
  524           ((SimpleValue)underlyingXmlObject()).set(obj);
  525       }
  526   
  527       /**
  528        * @deprecated replaced with {@link #setCalendarValue}
  529        */
  530       public void set(Calendar obj)
  531       {
  532           ((SimpleValue)underlyingXmlObject()).set(obj);
  533       }
  534   
  535       /**
  536        * @deprecated replaced with {@link #setDateValue}
  537        */
  538       public void set(Date obj)
  539       {
  540           ((SimpleValue)underlyingXmlObject()).set(obj);
  541       }
  542   
  543       /**
  544        * @deprecated replaced with {@link #setGDateValue}
  545        */
  546       public void set(GDateSpecification obj)
  547       {
  548           ((SimpleValue)underlyingXmlObject()).set(obj);
  549       }
  550   
  551       /**
  552        * @deprecated replaced with {@link #setGDurationValue}
  553        */
  554       public void set(GDurationSpecification obj)
  555       {
  556           ((SimpleValue)underlyingXmlObject()).set(obj);
  557       }
  558   
  559       /**
  560        * @deprecated replaced with {@link #setQNameValue}
  561        */
  562       public void set(QName obj)
  563       {
  564           ((SimpleValue)underlyingXmlObject()).set(obj);
  565       }
  566   
  567       /**
  568        * @deprecated replaced with {@link #setListValue}
  569        */
  570       public void set(List obj)
  571       {
  572           ((SimpleValue)underlyingXmlObject()).set(obj);
  573       }
  574   
  575       public String getStringValue()
  576       {
  577           return ((SimpleValue)underlyingXmlObject()).getStringValue();
  578       }
  579   
  580       public boolean getBooleanValue()
  581       {
  582           return ((SimpleValue)underlyingXmlObject()).getBooleanValue();
  583       }
  584   
  585       public byte getByteValue()
  586       {
  587           return ((SimpleValue)underlyingXmlObject()).getByteValue();
  588       }
  589   
  590       public short getShortValue()
  591       {
  592           return ((SimpleValue)underlyingXmlObject()).getShortValue();
  593       }
  594   
  595       public int getIntValue()
  596       {
  597           return ((SimpleValue)underlyingXmlObject()).getIntValue();
  598       }
  599   
  600       public long getLongValue()
  601       {
  602           return ((SimpleValue)underlyingXmlObject()).getLongValue();
  603       }
  604   
  605       public BigInteger getBigIntegerValue()
  606       {
  607           return ((SimpleValue)underlyingXmlObject()).getBigIntegerValue();
  608       }
  609   
  610       public BigDecimal getBigDecimalValue()
  611       {
  612           return ((SimpleValue)underlyingXmlObject()).getBigDecimalValue();
  613       }
  614   
  615       public float getFloatValue()
  616       {
  617           return ((SimpleValue)underlyingXmlObject()).getFloatValue();
  618       }
  619   
  620       public double getDoubleValue()
  621       {
  622           return ((SimpleValue)underlyingXmlObject()).getDoubleValue();
  623       }
  624   
  625       public byte[] getByteArrayValue()
  626       {
  627           return ((SimpleValue)underlyingXmlObject()).getByteArrayValue();
  628       }
  629   
  630       public StringEnumAbstractBase getEnumValue()
  631       {
  632           return ((SimpleValue)underlyingXmlObject()).getEnumValue();
  633       }
  634   
  635       public Calendar getCalendarValue()
  636       {
  637           return ((SimpleValue)underlyingXmlObject()).getCalendarValue();
  638       }
  639   
  640       public Date getDateValue()
  641       {
  642           return ((SimpleValue)underlyingXmlObject()).getDateValue();
  643       }
  644   
  645       public GDate getGDateValue()
  646       {
  647           return ((SimpleValue)underlyingXmlObject()).getGDateValue();
  648       }
  649   
  650       public GDuration getGDurationValue()
  651       {
  652           return ((SimpleValue)underlyingXmlObject()).getGDurationValue();
  653       }
  654   
  655       public QName getQNameValue()
  656       {
  657           return ((SimpleValue)underlyingXmlObject()).getQNameValue();
  658       }
  659   
  660       public List getListValue()
  661       {
  662           return ((SimpleValue)underlyingXmlObject()).getListValue();
  663       }
  664   
  665       public List xgetListValue()
  666       {
  667           return ((SimpleValue)underlyingXmlObject()).xgetListValue();
  668       }
  669   
  670       public Object getObjectValue()
  671       {
  672           return ((SimpleValue)underlyingXmlObject()).getObjectValue();
  673       }
  674   
  675       public void setStringValue(String obj)
  676       {
  677           ((SimpleValue)underlyingXmlObject()).setStringValue(obj);
  678       }
  679   
  680       public void setBooleanValue(boolean v)
  681       {
  682           ((SimpleValue)underlyingXmlObject()).setBooleanValue(v);
  683       }
  684   
  685       public void setByteValue(byte v)
  686       {
  687           ((SimpleValue)underlyingXmlObject()).setByteValue(v);
  688       }
  689   
  690       public void setShortValue(short v)
  691       {
  692           ((SimpleValue)underlyingXmlObject()).setShortValue(v);
  693       }
  694   
  695       public void setIntValue(int v)
  696       {
  697           ((SimpleValue)underlyingXmlObject()).setIntValue(v);
  698       }
  699   
  700       public void setLongValue(long v)
  701       {
  702           ((SimpleValue)underlyingXmlObject()).setLongValue(v);
  703       }
  704   
  705       public void setBigIntegerValue(BigInteger obj)
  706       {
  707           ((SimpleValue)underlyingXmlObject()).setBigIntegerValue(obj);
  708       }
  709   
  710       public void setBigDecimalValue(BigDecimal obj)
  711       {
  712           ((SimpleValue)underlyingXmlObject()).setBigDecimalValue(obj);
  713       }
  714   
  715       public void setFloatValue(float v)
  716       {
  717           ((SimpleValue)underlyingXmlObject()).setFloatValue(v);
  718       }
  719   
  720       public void setDoubleValue(double v)
  721       {
  722           ((SimpleValue)underlyingXmlObject()).setDoubleValue(v);
  723       }
  724   
  725       public void setByteArrayValue(byte[] obj)
  726       {
  727           ((SimpleValue)underlyingXmlObject()).setByteArrayValue(obj);
  728       }
  729   
  730       public void setEnumValue(StringEnumAbstractBase obj)
  731       {
  732           ((SimpleValue)underlyingXmlObject()).setEnumValue(obj);
  733       }
  734   
  735       public void setCalendarValue(Calendar obj)
  736       {
  737           ((SimpleValue)underlyingXmlObject()).setCalendarValue(obj);
  738       }
  739   
  740       public void setDateValue(Date obj)
  741       {
  742           ((SimpleValue)underlyingXmlObject()).setDateValue(obj);
  743       }
  744   
  745       public void setGDateValue(GDate obj)
  746       {
  747           ((SimpleValue)underlyingXmlObject()).setGDateValue(obj);
  748       }
  749   
  750       public void setGDurationValue(GDuration obj)
  751       {
  752           ((SimpleValue)underlyingXmlObject()).setGDurationValue(obj);
  753       }
  754   
  755       public void setQNameValue(QName obj)
  756       {
  757           ((SimpleValue)underlyingXmlObject()).setQNameValue(obj);
  758       }
  759   
  760       public void setListValue(List obj)
  761       {
  762           ((SimpleValue)underlyingXmlObject()).setListValue(obj);
  763       }
  764   
  765       public void setObjectValue(Object obj)
  766       {
  767           ((SimpleValue)underlyingXmlObject()).setObjectValue(obj);
  768       }
  769   
  770       /**
  771        * @deprecated replaced with {@link #setObjectValue}
  772        **/
  773       public void objectSet(Object obj)
  774       {
  775           ((SimpleValue)underlyingXmlObject()).objectSet(obj);
  776       }
  777   
  778       public XmlObject[] selectChildren(QName elementName)
  779       {
  780           return underlyingXmlObject().selectChildren(elementName);
  781       }
  782   
  783       public XmlObject[] selectChildren(String elementUri, String elementLocalName)
  784       {
  785           return underlyingXmlObject().selectChildren(elementUri, elementLocalName);
  786       }
  787   
  788       public XmlObject[] selectChildren(QNameSet elementNameSet)
  789       {
  790           return underlyingXmlObject().selectChildren(elementNameSet);
  791       }
  792   
  793       public XmlObject selectAttribute(QName attributeName)
  794       {
  795           return underlyingXmlObject().selectAttribute(attributeName);
  796       }
  797   
  798       public XmlObject selectAttribute(String attributeUri, String attributeLocalName)
  799       {
  800           return underlyingXmlObject().selectAttribute(attributeUri, attributeLocalName);
  801       }
  802   
  803       public XmlObject[] selectAttributes(QNameSet attributeNameSet)
  804       {
  805           return underlyingXmlObject().selectAttributes(attributeNameSet);
  806       }
  807   }

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