Package com.emc.documentum.rest.binding
Annotation Interface SerializableField4XmlMap
The annotation defined on a Java Map field for custom marshalling and unmarshalling. This annotation is applicable
only when the field is explicitly marked by annotation
SerializableField or
set as visible by SerializableType.FieldVisibility.- Since:
- 7.3
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanSpecifies the map entries to be marshalled as property bag or not.Specified the XML element attribute name for each map entry's key whenasPropBag()istrue.
-
Element Details
-
asPropBag
boolean asPropBagSpecifies the map entries to be marshalled as property bag or not. For example, below code marshals the map entries as property bag.
will be marshalled as XML representation:{@literal @}SerializableField4XmlMap(asPropBag=true) Map<String, String> fruits = Collections.singletonMap("apple", "red");<fruits> <entry key="apple">red</entry> </fruits>For example, below code marshals the map entries as plain simple xml.
will be marshalled as XML representation:{@literal @}SerializableField4XmlMap(asPropBag=false) Map<String, String> fruits = Collections.singletonMap("apple", "red");<fruits> <apple>red</apple> </fruits>- Returns:
trueif the map field is to be marshalled as property bag.
- Default:
- false
-
propBagEleName
String propBagEleNameSpecifies the XML element name for each map entry whenasPropBag()istrue.
The default is 'entry'. For example, below code marshals the map entries as property bag and specifies the XML element name.
will be marshalled as XML representation:{@literal @}SerializableField4XmlMap(asPropBag=true, propBagEleName="fruit") Map<String, String> fruits = Collections.singletonMap("apple", "red");<fruits> <fruit key="apple">red</fruit> </fruits>- Returns:
- the XML element name for the map entry when it is marshalled as the property bag.
- Default:
- "entry"
-
propBagKeyName
String propBagKeyNameSpecified the XML element attribute name for each map entry's key whenasPropBag()istrue. The value of the XML element attribute is the entry value.
The default is 'key'. For example, below code marshals the map entries as property bag and specifies the XML element name.
will be marshalled as XML representation:{@literal @}SerializableField4XmlMap(asPropBag=true, propBagEleName="fruit", propBagKeyName="type") Map<String, String> fruits = Collections.singletonMap("apple", "red");<fruits> <fruit type="apple">red</fruit> </fruits>- Returns:
- the XML element attribute name for the map entry's key when the entry is marshalled as the property bag.
- Default:
- "key"
-