public abstract class AXmlAdapterString extends XmlAdapter<String,String>
The maximum and minimum string lengths are identified in the constructor.
Sx is a character string of x characters maximum, USx is a Uppercase character string of x characters maximum (the attribute accepts only upper case characters).
This abstract adapter converts between a String
and a
String
.
Constructor and Description |
---|
AXmlAdapterString(Integer minLength,
Integer maxLength) |
AXmlAdapterString(Integer minLength,
Integer maxLength,
boolean upperCase,
String pattern) |
AXmlAdapterString(Integer minLength,
Integer maxLength,
String pattern) |
Modifier and Type | Method and Description |
---|---|
Integer |
getMaxLength()
Get the maximum string length.
|
Integer |
getMinLength()
Get the minimum string length.
|
String |
marshal(String v)
Convert a bound type to a value type.
|
String |
unmarshal(String v)
Convert a value type to a bound type.
|
public String marshal(String v) throws Exception
This is called when converting an object to XML.
marshal
in class XmlAdapter<String,String>
v
- The value to be converted. Can be null.Exception
- if there's an error during the conversion. The caller is
responsible for reporting the error to the user through
ValidationEventHandler.public String unmarshal(String v) throws Exception
This is called with converting XML to an object.
unmarshal
in class XmlAdapter<String,String>
v
- The value to be converted. Can be null.Exception
- if there's an error during the conversion. The caller is
responsible for reporting the error to the user through
ValidationEventHandler.public Integer getMaxLength()
public Integer getMinLength()
Copyright © 2016 OpenSSRF.org. All rights reserved.