ca.infoway.messagebuilder.marshalling.hl7.parser
Class AbstractSingleElementParser<V>
java.lang.Object
ca.infoway.messagebuilder.marshalling.hl7.parser.AbstractElementParser
ca.infoway.messagebuilder.marshalling.hl7.parser.AbstractSingleElementParser<V>
- All Implemented Interfaces:
- ElementParser
- Direct Known Subclasses:
- AbstractCodeTypeElementParser, AbstractPivlElementParser, AbstractRtoElementParser, AnyElementParser, BlElementParser
public abstract class AbstractSingleElementParser<V>
- extends AbstractElementParser
Method Summary |
protected abstract BareANY |
doCreateDataTypeInstance(String typeName)
|
protected String |
getMandatoryAttributeValue(Node node,
String attributeName,
XmlToModelResult parsingResult)
|
protected Node |
getNamedChildNode(Node node,
String childNodeName)
|
protected
|
getNamePartType(Class<S> type,
String value)
|
protected boolean |
hasValidNullFlavorAttribute(ParseContext context,
Node node,
XmlToModelResult xmlToModelResult)
|
BareANY |
parse(ParseContext context,
List<Node> nodes,
XmlToModelResult xmlToModelResult)
|
BareANY |
parse(ParseContext context,
Node node,
XmlToModelResult xmlToModelResult)
|
protected abstract V |
parseNonNullNode(ParseContext context,
Node node,
BareANY result,
Type returnType,
XmlToModelResult xmlToModelResult)
|
protected NullFlavor |
parseNullNode(ParseContext context,
Node node,
XmlToModelResult xmlToModelResult)
|
protected void |
setDataType(String dataTypeName,
BareANY dataTypeInstance)
|
protected void |
validateMaxChildCount(ParseContext context,
Node node,
int maxChildren)
|
protected void |
validateNoChildren(ParseContext context,
Node node)
|
protected void |
validateUnallowedAttributes(String type,
Element node,
XmlToModelResult result,
String attribute)
|
protected void |
validateUnallowedChildNode(String type,
Element node,
XmlToModelResult result,
String childNodeName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_STRING
protected static final String EMPTY_STRING
- See Also:
- Constant Field Values
AbstractSingleElementParser
public AbstractSingleElementParser()
doCreateDataTypeInstance
protected abstract BareANY doCreateDataTypeInstance(String typeName)
parse
public BareANY parse(ParseContext context,
List<Node> nodes,
XmlToModelResult xmlToModelResult)
throws XmlToModelTransformationException
- Specified by:
parse
in interface ElementParser
- Specified by:
parse
in class AbstractElementParser
- Throws:
XmlToModelTransformationException
parse
public BareANY parse(ParseContext context,
Node node,
XmlToModelResult xmlToModelResult)
throws XmlToModelTransformationException
- Throws:
XmlToModelTransformationException
parseNonNullNode
protected abstract V parseNonNullNode(ParseContext context,
Node node,
BareANY result,
Type returnType,
XmlToModelResult xmlToModelResult)
throws XmlToModelTransformationException
- Throws:
XmlToModelTransformationException
setDataType
protected void setDataType(String dataTypeName,
BareANY dataTypeInstance)
hasValidNullFlavorAttribute
protected boolean hasValidNullFlavorAttribute(ParseContext context,
Node node,
XmlToModelResult xmlToModelResult)
parseNullNode
protected NullFlavor parseNullNode(ParseContext context,
Node node,
XmlToModelResult xmlToModelResult)
throws XmlToModelTransformationException
- Throws:
XmlToModelTransformationException
getNamedChildNode
protected Node getNamedChildNode(Node node,
String childNodeName)
getMandatoryAttributeValue
protected String getMandatoryAttributeValue(Node node,
String attributeName,
XmlToModelResult parsingResult)
throws XmlToModelTransformationException
- Throws:
XmlToModelTransformationException
getNamePartType
protected <S extends NamePartType> S getNamePartType(Class<S> type,
String value)
throws XmlToModelTransformationException
- Throws:
XmlToModelTransformationException
validateUnallowedAttributes
protected void validateUnallowedAttributes(String type,
Element node,
XmlToModelResult result,
String attribute)
validateUnallowedChildNode
protected void validateUnallowedChildNode(String type,
Element node,
XmlToModelResult result,
String childNodeName)
validateNoChildren
protected void validateNoChildren(ParseContext context,
Node node)
throws XmlToModelTransformationException
- Throws:
XmlToModelTransformationException
validateMaxChildCount
protected void validateMaxChildCount(ParseContext context,
Node node,
int maxChildren)
throws XmlToModelTransformationException
- Throws:
XmlToModelTransformationException
Copyright © 2013. All Rights Reserved.