Top Description Fields Constructors Methods
com.ctc.wstx.api

pack-priv abstract Class CommonConfig

extends Object
implements XMLStreamProperties
Class Inheritance
All Implemented Interfaces
org.codehaus.stax2.XMLStreamProperties
Known Direct Subclasses
com.ctc.wstx.api.ReaderConfig, com.ctc.wstx.api.ValidatorConfig, com.ctc.wstx.api.WriterConfig
Imports
java.util.*, org.codehaus.stax2.XMLStreamProperties, com.ctc.wstx.util.ArgUtil

Shared common base class for variour configuration container implementations for public factories Woodstox uses: implementations of javax.xml.stream.XMLInputFactory, javax.xml.stream.XMLOutputFactory and org.codehaus.stax2.validation.XMLValidationSchemaFactory. Implements basic settings for some shared settings, defined by the shared property interface XMLStreamProperties.

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
protected static final String
protected static final String
IMPL_VERSION

This is "major.minor" version used for purposes of determining the feature set.

protected boolean
mReturnNullForDefaultNamespace

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

pack-priv static final HashMap<String, Integer>
sStdProperties

Map to use for converting from String property ids to enumeration (ints).

Constructor Summary

AccessConstructor and Description
protected
CommonConfig(CommonConfig
Base instance to copy settings from, if any; null for 'root' configuration objects.
base
)

Constructor used by sub-classes

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
protected abstract int

Returns:

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

protected int
public static String
getImplName()

Method used to figure out the official implementation name for input/output/validation factories.

public static String
getImplVersion()

Method used to figure out the official implementation version for input/output/validation factories.

public Object
getProperty(String propName)

protected abstract Object
getProperty(int id)

protected Object
public boolean
protected void
public boolean
public final Object
public boolean

Returns:

True, if the specified property was successfully set to specified value; false if its value was not changed
setProperty
(String propName, Object value)

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

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CPROP_IMPL_NAMEback to summary
pack-priv static final int CPROP_IMPL_NAME
CPROP_IMPL_VERSIONback to summary
pack-priv static final int CPROP_IMPL_VERSION
CPROP_RETURN_NULL_FOR_DEFAULT_NAMESPACEback to summary
pack-priv static final int CPROP_RETURN_NULL_FOR_DEFAULT_NAMESPACE
CPROP_SUPPORT_XMLIDback to summary
pack-priv static final int CPROP_SUPPORT_XMLID
CPROP_SUPPORTS_XML11back to summary
pack-priv static final int CPROP_SUPPORTS_XML11
IMPL_NAMEback to summary
protected static final String IMPL_NAME
IMPL_VERSIONback to summary
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.

mReturnNullForDefaultNamespaceback to summary
protected boolean mReturnNullForDefaultNamespace

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

sStdPropertiesback to summary
pack-priv static final HashMap<String, Integer> sStdProperties

Map to use for converting from String property ids to enumeration (ints). Used for faster dispatching.

Constructor Detail

CommonConfigback to summary
protected CommonConfig(CommonConfig base)

Constructor used by sub-classes

Parameters
base:CommonConfig

Base instance to copy settings from, if any; null for 'root' configuration objects.

Method Detail

doesSupportXml11back to summary
public boolean doesSupportXml11()
doesSupportXmlIdback to summary
public boolean doesSupportXmlId()
findPropertyIdback to summary
protected abstract int findPropertyId(String propName)
Returns:int

Internal enumerated int matching the String name of the property, if one found: -1 to indicate no match was found.

findStdPropertyIdback to summary
protected int findStdPropertyId(String propName)
getImplNameback to summary
public static String getImplName()

Method used to figure out the official implementation name for input/output/validation factories.

getImplVersionback to summary
public static String getImplVersion()

Method used to figure out the official implementation version for input/output/validation factories.

getPropertyback to summary
public Object getProperty(String propName)
getPropertyback to summary
protected abstract Object getProperty(int id)
getStdPropertyback to summary
protected Object getStdProperty(int id)
isPropertySupportedback to summary
public boolean isPropertySupported(String propName)
reportUnknownPropertyback to summary
protected void reportUnknownProperty(String propName)
returnNullForDefaultNamespaceback to summary
public boolean returnNullForDefaultNamespace()
safeGetPropertyback to summary
public final Object safeGetProperty(String propName)
setPropertyback to summary
public boolean setProperty(String propName, Object value)
Returns:boolean

True, if the specified property was successfully set to specified value; false if its value was not changed

setPropertyback to summary
protected abstract boolean setProperty(String propName, int id, Object value)
setStdPropertyback to summary
protected boolean setStdProperty(String propName, int id, Object value)
Parameters
propName:String

Name of standard property to set

id:int

Internal id matching the name

value:Object

Value to set the standard property to