public abstract class AbstractBinaryElementType extends AbstractElementType<Binary> implements Configurable
Modifier and Type | Field and Description |
---|---|
protected String |
_binaryType
Type of the binary
|
Constructor and Description |
---|
AbstractBinaryElementType() |
Modifier and Type | Method and Description |
---|---|
Binary |
castValue(String value)
Cast an untyped value (string) to an object of the corresponding type
|
void |
configure(Configuration configuration) |
Object |
fromJSONForClient(Object json)
Convert the given client side JSON object to the types value
|
boolean |
isSimple()
Determines if this type is simple or not.
|
Binary |
parseConfiguration(Configuration configuration)
Parses the given configuration to get the typed value
|
String |
toString(Binary value)
Cast a typed value to a String
|
_singleValueToJSON, _singleValueToSAX, getManagedClass, getManagedClassArray, isCompatible, valueToJSONForClient, valueToSAX
getId, setPluginInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId
setPluginInfo
protected String _binaryType
public AbstractBinaryElementType()
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public Object fromJSONForClient(Object json)
ElementType
fromJSONForClient
in interface ElementType<Binary>
json
- the JSON object to convertpublic boolean isSimple()
ElementType
isSimple
in interface ElementType<Binary>
true
if the type is simple, false
otherwisepublic Binary castValue(String value) throws BadItemTypeException
ElementType
castValue
in interface ElementType<Binary>
value
- the value to castBadItemTypeException
- if the String value can't be cast to the typepublic String toString(Binary value)
ElementType
toString
in interface ElementType<Binary>
toString
in class AbstractElementType<Binary>
value
- the value to castpublic Binary parseConfiguration(Configuration configuration) throws ConfigurationException
ElementType
parseConfiguration
in interface ElementType<Binary>
parseConfiguration
in class AbstractElementType<Binary>
configuration
- the configuration to parseConfigurationException
- if an error occurs while parsing the configuration