Package org.jibx.binding.model
Class StringAttributes
java.lang.Object
org.jibx.binding.model.AttributeBase
org.jibx.binding.model.StringAttributes
Model component for string attribute group in binding definition.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
private static final String[]
private static final String
private FormatElement
Base format for conversions.private Object
Default value object.private String
Default value text.private IClassItem
Deserializer method (or constructor from string) information.private String
Deserializer fully qualified class and method name.private IClassItem
Method used to get text representation of an enum.private String
Enum value method name.private String
Referenced format name.private QName
Format qualified name.private IClassItem
Serializer method (or toString equivalent) information.private String
Serializer fully qualified class and method name.private IClass
Value type class.private int
Actual selected whitespace handling.private String
Whitespace handling name.static final int
static final int
static final StringArray
Enumeration of allowed attribute namesstatic final EnumSet
private static final String[]
private static final Class[]
private static final String
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet base format information.Get default value.Get whitespace handling type name.Get default value text.Get deserializer method information.Get deserializer name.Get enum value method information.Get enum value method name.Get base format name.Get format qualified name.private String
JiBX access method to get format label as qualified name.Get serializer method information.Get serializer name.getType()
Get value type.void
prevalidate
(ValidationContext vctx) Prevalidate attribute information.void
setDefaultName
(String name) Set whitespace handling type name.void
setDefaultText
(String value) Set default value text.void
setDeserializerName
(String name) Set deserializer method name.void
setEnumValueName
(String name) Set enum value method name.void
setFormatName
(String name) Set base format name.void
setFormatQName
(QName qname) Set format qualified name.private void
setQualifiedFormat
(String label, IUnmarshallingContext ictx) JiBX access method to set format label as qualified name.void
setSerializerName
(String name) Set serializer method name.void
Set value type.Methods inherited from class org.jibx.binding.model.AttributeBase
validate
-
Field Details
-
s_allowedAttributes
Enumeration of allowed attribute names -
SERIALIZER_SIGNATURE_VARIANTS
-
DESERIALIZER_SIGNATURES
-
ENUM_VALUE_METHOD_SIGNATURE
- See Also:
-
STRING_CONSTRUCTOR_SIGNATURE
- See Also:
-
STRING_CONSTRUCTOR_ARGUMENT_CLASSES
-
PRESERVE_WHITESPACE
public static final int PRESERVE_WHITESPACE- See Also:
-
REPLACE_WHITESPACE
public static final int REPLACE_WHITESPACE- See Also:
-
COLLAPSE_WHITESPACE
public static final int COLLAPSE_WHITESPACE- See Also:
-
TRIM_WHITESPACE
public static final int TRIM_WHITESPACE- See Also:
-
s_whitespaceEnum
-
m_formatName
Referenced format name. -
m_formatQName
Format qualified name. -
m_defaultText
Default value text. -
m_serializerName
Serializer fully qualified class and method name. -
m_whitespaceName
Whitespace handling name. -
m_whitespaceIndex
private int m_whitespaceIndexActual selected whitespace handling. -
m_deserializerName
Deserializer fully qualified class and method name. -
m_enumValueName
Enum value method name. -
m_baseFormat
Base format for conversions. -
m_typeClass
Value type class. -
m_default
Default value object. -
m_serializerItem
Serializer method (or toString equivalent) information. -
m_deserializerItem
Deserializer method (or constructor from string) information. -
m_enumValueItem
Method used to get text representation of an enum.
-
-
Constructor Details
-
StringAttributes
public StringAttributes()Default constructor.
-
-
Method Details
-
setType
Set value type. This needs to be set by the owning element prior to validation. Even though the type is an important part of the string information, it's treated as a separate item of information because it needs to be used as part of the property attributes.- Parameters:
type
- value type
-
getType
Get value type.- Returns:
- value type
-
getFormatName
Get base format name.- Returns:
- referenced base format
-
setFormatName
Set base format name.- Parameters:
name
- referenced base format
-
getFormatQName
Get format qualified name.- Returns:
- format qualified name (
null
if none)
-
setFormatQName
Set format qualified name. This method changes the label value to match the qualified name.- Parameters:
qname
- format qualified name (null
if none)
-
getDefaultText
Get default value text.- Returns:
- default value text
-
getDefault
Get default value. This method is only usable after a call toAttributeBase.validate(ValidationContext)
.- Returns:
- default value object
-
setDefaultText
Set default value text.- Parameters:
value
- default value text
-
getSerializerName
Get serializer name.- Returns:
- fully qualified class and method name for serializer (or
null
if none)
-
getSerializer
Get serializer method information. This method is only usable after a call toAttributeBase.validate(ValidationContext)
.- Returns:
- serializer information (or
null
if none)
-
setSerializerName
Set serializer method name.- Parameters:
name
- fully qualified class and method name for serializer
-
setDefaultName
Set whitespace handling type name.- Parameters:
name
- whitespace handling type
-
getDefaultName
Get whitespace handling type name.- Returns:
- whitespace handling type
-
getDeserializerName
Get deserializer name.- Returns:
- fully qualified class and method name for deserializer (or
null
if none)
-
getDeserializer
Get deserializer method information. This method is only usable after a call toAttributeBase.validate(ValidationContext)
.- Returns:
- deserializer information (or
null
if none)
-
setDeserializerName
Set deserializer method name.- Parameters:
name
- fully qualified class and method name for deserializer
-
getEnumValueName
Get enum value method name.- Returns:
- enum value method name (or
null
if none)
-
getEnumValue
Get enum value method information. This method is only usable after a call toAttributeBase.validate(ValidationContext)
.- Returns:
- enum value method information (or
null
if none)
-
setEnumValueName
Set enum value method name.- Parameters:
name
- enum value method name (null
if none)
-
getBaseFormat
Get base format information. This method is only usable after a call toAttributeBase.validate(ValidationContext)
.- Returns:
- base format element (or
null
if none)
-
setQualifiedFormat
JiBX access method to set format label as qualified name.- Parameters:
label
- format label text (null
if none)ictx
- unmarshalling context- Throws:
JiBXException
- on deserialization error
-
getQualifiedFormat
JiBX access method to get format label as qualified name.- Parameters:
ictx
- marshalling context- Returns:
- format label text (
null
if none) - Throws:
JiBXException
- on deserialization error
-
prevalidate
Description copied from class:AttributeBase
Prevalidate attribute information. The prevalidation step is used to check attribute values in isolation, such as the settings for enumerated values and class file information. This empty base class implementation should be overridden by each subclass that requires prevalidation handling.- Overrides:
prevalidate
in classAttributeBase
- Parameters:
vctx
- validation context
-