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

    1   package org.apache.xmlbeans;
    2   
    3   import org.xml.sax.XMLReader;
    4   import org.xml.sax.EntityResolver;
    5   
    6   import javax.xml.namespace.QName;
    7   import java.util.Map;
    8   import java.util.Set;
    9   
   10   /**
   11    * Same as {@link XmlOptions} but adhering to JavaBean conventions
   12    */
   13   public class XmlOptionsBean extends XmlOptions
   14   {
   15       /**
   16        * Construct a new blank XmlOptions.
   17        */
   18       public XmlOptionsBean ( ) { }
   19   
   20       /**
   21        * Construct a new XmlOptions, copying the options.
   22        * @param other the source <code>XmlOptions</code> object
   23        */
   24       public XmlOptionsBean (XmlOptions other) {
   25           super( other );
   26       }
   27   
   28   
   29       public void setSaveNamespacesFirst(boolean b)
   30       {
   31           if (b)
   32               super.setSaveNamespacesFirst();
   33           else
   34               remove( SAVE_NAMESPACES_FIRST );
   35       }
   36   
   37       public boolean isSaveNamespacesFirst()
   38       {
   39           return hasOption( SAVE_NAMESPACES_FIRST );
   40       }
   41   
   42       public void setSavePrettyPrint(boolean b)
   43       {
   44           if (b)
   45               super.setSavePrettyPrint();
   46           else
   47               remove( SAVE_PRETTY_PRINT );
   48       }
   49   
   50       public boolean isSavePrettyPrint()
   51       {
   52           return hasOption( SAVE_PRETTY_PRINT );
   53       }
   54   
   55       public Integer getSavePrettyPrintIndent()
   56       {
   57           return (Integer) get( SAVE_PRETTY_PRINT_INDENT );
   58       }
   59   
   60       public Integer getSavePrettyPrintOffset()
   61       {
   62           return (Integer) get( SAVE_PRETTY_PRINT_OFFSET );
   63       }
   64   
   65       public String getCharacterEncoding()
   66       {
   67           return (String) get( CHARACTER_ENCODING );
   68       }
   69   
   70       public SchemaType getDocumentType()
   71       {
   72           return (SchemaType) get ( DOCUMENT_TYPE );
   73       }
   74   
   75       public void setSaveAggressiveNamespaces(boolean b)
   76       {
   77           if (b)
   78               super.setSaveAggressiveNamespaces();
   79           else
   80               remove( SAVE_AGGRESSIVE_NAMESPACES );
   81       }
   82   
   83       public boolean isSaveAggressiveNamespaces()
   84       {
   85           return hasOption( SAVE_AGGRESSIVE_NAMESPACES );
   86       }
   87   
   88       public QName getSaveSyntheticDocumentElement()
   89       {
   90           return (QName) get( SAVE_SYNTHETIC_DOCUMENT_ELEMENT );
   91       }
   92   
   93       public void setUseDefaultNamespace(boolean b)
   94       {
   95           if (b)
   96               super.setUseDefaultNamespace();
   97           else
   98               remove( SAVE_USE_DEFAULT_NAMESPACE );
   99       }
  100   
  101       public boolean isUseDefaultNamespace()
  102       {
  103           return hasOption( SAVE_USE_DEFAULT_NAMESPACE );
  104       }
  105   
  106       public Map getSaveImplicitNamespaces()
  107       {
  108           return (Map) get( SAVE_IMPLICIT_NAMESPACES );
  109       }
  110   
  111       public Map getSaveSuggestedPrefixes()
  112       {
  113           return (Map) get( SAVE_SUGGESTED_PREFIXES );
  114       }
  115   
  116       public String getSaveFilterProcinst()
  117       {
  118           return (String) get( SAVE_FILTER_PROCINST );
  119       }
  120   
  121       public XmlOptionCharEscapeMap getSaveSubstituteCharacters()
  122       {
  123           return (XmlOptionCharEscapeMap) get( SAVE_SUBSTITUTE_CHARACTERS );
  124       }
  125   
  126       public void setSaveUseOpenFrag(boolean b)
  127       {
  128           if (b)
  129               super.setSaveUseOpenFrag();
  130           else
  131               remove( SAVE_USE_OPEN_FRAGMENT );
  132       }
  133   
  134       public boolean isSaveUseOpenFrag()
  135       {
  136           return hasOption( SAVE_USE_OPEN_FRAGMENT );
  137       }
  138   
  139       public void setSaveOuter(boolean b)
  140       {
  141           if (b)
  142               super.setSaveOuter();
  143           else
  144               remove( SAVE_OUTER );
  145       }
  146   
  147       public boolean isSaveOuter()
  148       {
  149           return hasOption( SAVE_OUTER );
  150       }
  151   
  152       public void setSaveInner(boolean b)
  153       {
  154           if (b)
  155               super.setSaveInner();
  156           else
  157               remove( SAVE_INNER );
  158       }
  159   
  160       public boolean isSaveInner()
  161       {
  162           return hasOption( SAVE_INNER );
  163       }
  164   
  165       public void setSaveNoXmlDecl(boolean b)
  166       {
  167           if (b)
  168               super.setSaveNoXmlDecl();
  169           else
  170               remove( SAVE_NO_XML_DECL );
  171       }
  172   
  173       public boolean isSaveNoXmlDecl()
  174       {
  175           return hasOption( SAVE_NO_XML_DECL );
  176       }
  177   
  178       public Integer getSaveCDataLengthThreshold()
  179       {
  180           return (Integer) get( SAVE_CDATA_LENGTH_THRESHOLD );
  181       }
  182   
  183       public Integer getSaveCDataEntityCountThreshold()
  184       {
  185           return (Integer) get( SAVE_CDATA_ENTITY_COUNT_THRESHOLD );
  186       }
  187   
  188       public void setSaveSaxNoNSDeclsInAttributes(boolean b)
  189       {
  190           if (b)
  191               super.setSaveSaxNoNSDeclsInAttributes();
  192           else
  193               remove( SAVE_SAX_NO_NSDECLS_IN_ATTRIBUTES );
  194       }
  195   
  196       public boolean isSaveSaxNoNSDeclsInAttributes()
  197       {
  198           return hasOption( SAVE_SAX_NO_NSDECLS_IN_ATTRIBUTES );
  199       }
  200   
  201       public QName getLoadReplaceDocumentElement()
  202       {
  203           return (QName) get( LOAD_REPLACE_DOCUMENT_ELEMENT );
  204       }
  205   
  206       public void setLoadStripWhitespace(boolean b)
  207       {
  208           if (b)
  209               super.setLoadStripWhitespace();
  210           else
  211               remove( LOAD_STRIP_WHITESPACE );
  212       }
  213   
  214       public boolean isSetLoadStripWhitespace()
  215       {
  216           return hasOption( LOAD_STRIP_WHITESPACE );
  217       }
  218   
  219       public void setLoadStripComments(boolean b)
  220       {
  221           if (b)
  222               super.setLoadStripComments();
  223           else
  224               remove( LOAD_STRIP_COMMENTS );
  225       }
  226   
  227       public boolean isLoadStripComments()
  228       {
  229           return hasOption( LOAD_STRIP_COMMENTS );
  230       }
  231   
  232       public void setLoadStripProcinsts(boolean b)
  233       {
  234           if (b)
  235               super.setLoadStripProcinsts();
  236           else
  237               remove( LOAD_STRIP_PROCINSTS );
  238       }
  239   
  240       public boolean isLoadStripProcinsts()
  241       {
  242           return hasOption( LOAD_STRIP_PROCINSTS );
  243       }
  244   
  245       public void setLoadLineNumbers(boolean b)
  246       {
  247           if (b)
  248               super.setLoadLineNumbers();
  249           else
  250               remove( LOAD_LINE_NUMBERS );
  251       }
  252   
  253       public boolean isLoadLineNumbers()
  254       {
  255           return hasOption( LOAD_LINE_NUMBERS );
  256       }
  257   
  258       public Map getLoadSubstituteNamespaces()
  259       {
  260           return (Map) get( LOAD_SUBSTITUTE_NAMESPACES );
  261       }
  262   
  263       public void setLoadTrimTextBuffer(boolean b)
  264       {
  265           if (b)
  266               super.setLoadTrimTextBuffer();
  267           else
  268               remove( LOAD_TRIM_TEXT_BUFFER );
  269       }
  270   
  271       public boolean isLoadTrimTextBuffer()
  272       {
  273           return hasOption( LOAD_TRIM_TEXT_BUFFER );
  274       }
  275   
  276       public Map getLoadAdditionalNamespaces()
  277       {
  278           return (Map) get( LOAD_ADDITIONAL_NAMESPACES );
  279       }
  280   
  281       public void setLoadMessageDigest(boolean b)
  282       {
  283           if (b)
  284               super.setLoadMessageDigest();
  285           else
  286               remove( LOAD_MESSAGE_DIGEST );
  287       }
  288   
  289       public boolean isLoadMessageDigest()
  290       {
  291           return hasOption( LOAD_MESSAGE_DIGEST );
  292       }
  293   
  294       public void setLoadUseDefaultResolver(boolean b)
  295       {
  296           if (b)
  297               super.setLoadUseDefaultResolver();
  298           else
  299               remove( LOAD_USE_DEFAULT_RESOLVER );
  300       }
  301   
  302       public boolean isLoadUseDefaultResolver()
  303       {
  304           return hasOption( LOAD_USE_DEFAULT_RESOLVER );
  305       }
  306   
  307       public String getXqueryCurrentNodeVar()
  308       {
  309           return (String) get( XQUERY_CURRENT_NODE_VAR );
  310       }
  311   
  312       public Map getXqueryVariables()
  313       {
  314           return (Map) get( XQUERY_VARIABLE_MAP );
  315       }
  316   
  317       public String getDocumentSourceName()
  318       {
  319           return (String) get( DOCUMENT_SOURCE_NAME );
  320       }
  321   
  322       public Map getCompileSubstituteNames()
  323       {
  324           return (Map) get( COMPILE_SUBSTITUTE_NAMES );
  325       }
  326   
  327       public void setCompileNoUpaRule(boolean b)
  328       {
  329           if (b)
  330               super.setCompileNoUpaRule();
  331           else
  332               remove( COMPILE_NO_UPA_RULE );
  333       }
  334   
  335       public boolean isCompileNoUpaRule()
  336       {
  337           return hasOption( COMPILE_NO_UPA_RULE );
  338       }
  339   
  340       public void setCompileNoPvrRule(boolean b)
  341       {
  342           if (b)
  343               super.setCompileNoPvrRule();
  344           else
  345               remove( COMPILE_NO_PVR_RULE );
  346       }
  347   
  348       public boolean isCompileNoPvrRule()
  349       {
  350           return hasOption( COMPILE_NO_PVR_RULE );
  351       }
  352   
  353       public void setCompileNoAnnotations(boolean b)
  354       {
  355           if (b)
  356               super.setCompileNoAnnotations();
  357           else
  358               remove( COMPILE_NO_ANNOTATIONS );
  359       }
  360   
  361       public boolean isCompileNoAnnotations()
  362       {
  363           return hasOption( COMPILE_NO_ANNOTATIONS );
  364       }
  365   
  366       public void setCompileDownloadUrls(boolean b)
  367       {
  368           if (b)
  369               super.setCompileDownloadUrls();
  370           else
  371               remove( COMPILE_DOWNLOAD_URLS );
  372       }
  373   
  374       public boolean isCompileDownloadUrls()
  375       {
  376           return hasOption( COMPILE_DOWNLOAD_URLS );
  377       }
  378   
  379       public Set getCompileMdefNamespaces()
  380       {
  381           return (Set) get( COMPILE_MDEF_NAMESPACES );
  382       }
  383   
  384       public void setValidateOnSet(boolean b)
  385       {
  386           if (b)
  387               super.setValidateOnSet();
  388           else
  389               remove( VALIDATE_ON_SET );
  390       }
  391   
  392       public boolean isValidateOnSet()
  393       {
  394           return hasOption( VALIDATE_ON_SET );
  395       }
  396   
  397       public void setValidateTreatLaxAsSkip(boolean b)
  398       {
  399           if (b)
  400               super.setValidateTreatLaxAsSkip();
  401           else
  402               remove( VALIDATE_TREAT_LAX_AS_SKIP );
  403       }
  404   
  405       public boolean isValidateTreatLaxAsSkip()
  406       {
  407           return hasOption( VALIDATE_TREAT_LAX_AS_SKIP );
  408       }
  409   
  410       public void setValidateStrict(boolean b)
  411       {
  412           if (b)
  413               super.setValidateStrict();
  414           else
  415               remove( VALIDATE_STRICT );
  416       }
  417   
  418       public boolean isValidateStrict()
  419       {
  420           return hasOption( VALIDATE_STRICT );
  421       }
  422   
  423       public void setUnsynchronized(boolean b)
  424       {
  425           if (b)
  426               super.setUnsynchronized();
  427           else
  428               remove( UNSYNCHRONIZED );
  429       }
  430   
  431       public boolean isUnsynchronized()
  432       {
  433           return hasOption( UNSYNCHRONIZED );
  434       }
  435   
  436       public EntityResolver getEntityResolver()
  437       {
  438           return (EntityResolver) get( ENTITY_RESOLVER );
  439       }
  440   
  441       public String getGenerateJavaVersion()
  442       {
  443           return (String) get( GENERATE_JAVA_VERSION );
  444       }
  445   }

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