ca.infoway.messagebuilder.marshalling.hl7.formatter
Class AbstractNullFlavorPropertyFormatter<V>
java.lang.Object
ca.infoway.messagebuilder.marshalling.hl7.formatter.AbstractPropertyFormatter
ca.infoway.messagebuilder.marshalling.hl7.formatter.AbstractNullFlavorPropertyFormatter<V>
- All Implemented Interfaces:
- PropertyFormatter
- Direct Known Subclasses:
- AbstractAdPropertyFormatter, AbstractAttributePropertyFormatter, AbstractEntityNamePropertyFormatter, AbstractRtoPropertyFormatter, BaseCollectionPropertyFormatter, EdPropertyFormatter
public abstract class AbstractNullFlavorPropertyFormatter<V>
- extends AbstractPropertyFormatter
If an object is null, value is replaced by a nullFlavor. So the element would look
like this:
<element-name nullFlavor="something" />
Otherwise this class hands the formatting off to the formatNonNull method.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractNullFlavorPropertyFormatter
protected AbstractNullFlavorPropertyFormatter()
format
public String format(FormatContext context,
BareANY hl7Value,
int indentLevel)
- Specified by:
format
in interface PropertyFormatter
- Specified by:
format
in class AbstractPropertyFormatter
extractBareValue
protected V extractBareValue(BareANY hl7Value)
isEmptyCollection
protected boolean isEmptyCollection(V value)
createNullFlavorAttributes
protected Map<String,String> createNullFlavorAttributes(NullFlavor nullFlavor)
createMissingMandatoryWarning
protected void createMissingMandatoryWarning(FormatContext context)
isMandatoryOrPopulated
protected boolean isMandatoryOrPopulated(FormatContext context)
toStringMap
protected Map<String,String> toStringMap(String... string)
Copyright © 2013. All Rights Reserved.