Class CommonConfig

java.lang.Object
com.ctc.wstx.api.CommonConfig
All Implemented Interfaces:
org.codehaus.stax2.XMLStreamProperties
Direct Known Subclasses:
ReaderConfig, ValidatorConfig, WriterConfig

abstract class CommonConfig extends Object implements org.codehaus.stax2.XMLStreamProperties
Shared common base class for variour configuration container implementations for public factories Woodstox uses: implementations of XMLInputFactory, XMLOutputFactory and XMLValidationSchemaFactory. Implements basic settings for some shared settings, defined by the shared property interface XMLStreamProperties.
  • Field Details

    • IMPL_NAME

      protected static final String IMPL_NAME
      See Also:
    • IMPL_VERSION

      protected static final String IMPL_VERSION
      This is "major.minor" version used for purposes of determining the feature set. Patch level is not included, since those should not affect API or feature set. Using applications should be prepared to take additional levels, however, just not depend on those being available.
      See Also:
    • CPROP_IMPL_NAME

      static final int CPROP_IMPL_NAME
      See Also:
    • CPROP_IMPL_VERSION

      static final int CPROP_IMPL_VERSION
      See Also:
    • CPROP_SUPPORTS_XML11

      static final int CPROP_SUPPORTS_XML11
      See Also:
    • CPROP_SUPPORT_XMLID

      static final int CPROP_SUPPORT_XMLID
      See Also:
    • CPROP_RETURN_NULL_FOR_DEFAULT_NAMESPACE

      static final int CPROP_RETURN_NULL_FOR_DEFAULT_NAMESPACE
      See Also:
    • sStdProperties

      static final HashMap<String,Integer> sStdProperties
      Map to use for converting from String property ids to enumeration (ints). Used for faster dispatching.
    • mReturnNullForDefaultNamespace

      protected boolean mReturnNullForDefaultNamespace
      As per [WSTX-277], can specify whether prefix for the "default namespace" is return as null (true) or empty String (false)
  • Constructor Details

    • CommonConfig

      protected CommonConfig(CommonConfig base)
      Constructor used by sub-classes
      Parameters:
      base - Base instance to copy settings from, if any; null for 'root' configuration objects.
  • Method Details

    • getProperty

      public Object getProperty(String propName)
    • isPropertySupported

      public boolean isPropertySupported(String propName)
    • setProperty

      public boolean setProperty(String propName, Object value)
      Returns:
      True, if the specified property was successfully set to specified value; false if its value was not changed
    • reportUnknownProperty

      protected void reportUnknownProperty(String propName)
    • safeGetProperty

      public final Object safeGetProperty(String propName)
    • getImplName

      public static String getImplName()
      Method used to figure out the official implementation name for input/output/validation factories.
    • getImplVersion

      public static String getImplVersion()
      Method used to figure out the official implementation version for input/output/validation factories.
    • findPropertyId

      protected abstract int findPropertyId(String propName)
      Returns:
      Internal enumerated int matching the String name of the property, if one found: -1 to indicate no match was found.
    • doesSupportXml11

      public boolean doesSupportXml11()
    • doesSupportXmlId

      public boolean doesSupportXmlId()
    • returnNullForDefaultNamespace

      public boolean returnNullForDefaultNamespace()
    • getProperty

      protected abstract Object getProperty(int id)
    • setProperty

      protected abstract boolean setProperty(String propName, int id, Object value)
    • findStdPropertyId

      protected int findStdPropertyId(String propName)
    • setStdProperty

      protected boolean setStdProperty(String propName, int id, Object value)
      Parameters:
      propName - Name of standard property to set
      id - Internal id matching the name
      value - Value to set the standard property to
    • getStdProperty

      protected Object getStdProperty(int id)