Class DefaultXmlProblemHandler
- java.lang.Object
-
- gov.nist.secauto.metaschema.databind.io.AbstractProblemHandler
-
- gov.nist.secauto.metaschema.databind.io.xml.DefaultXmlProblemHandler
-
- All Implemented Interfaces:
IProblemHandler
,IXmlProblemHandler
public class DefaultXmlProblemHandler extends AbstractProblemHandler implements IXmlProblemHandler
Handles problems identified in the parsed XML.The default problem handler will report unknown attributes, and provide empty collections for multi-valued model items and default values for flags and single valued fields.
-
-
Constructor Summary
Constructors Constructor Description DefaultXmlProblemHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
handleUnknownAttribute(IFlagContainer parentDefinition, Object targetObject, Attribute attribute, IXmlParsingContext parsingContext)
Callback used to handle an attribute that is unknown to the model being parsed.-
Methods inherited from class gov.nist.secauto.metaschema.databind.io.AbstractProblemHandler
applyDefaults, handleMissingInstances
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nist.secauto.metaschema.databind.io.IProblemHandler
handleMissingInstances
-
Methods inherited from interface gov.nist.secauto.metaschema.databind.io.xml.IXmlProblemHandler
handleMissingFlagInstances, handleMissingModelInstances, handleUnknownElement
-
-
-
-
Constructor Detail
-
DefaultXmlProblemHandler
public DefaultXmlProblemHandler()
-
-
Method Detail
-
handleUnknownAttribute
public boolean handleUnknownAttribute(IFlagContainer parentDefinition, Object targetObject, Attribute attribute, IXmlParsingContext parsingContext)
Description copied from interface:IXmlProblemHandler
Callback used to handle an attribute that is unknown to the model being parsed.- Specified by:
handleUnknownAttribute
in interfaceIXmlProblemHandler
- Parameters:
parentDefinition
- the bound class currently describing the data being parsedtargetObject
- the Java object for theparentDefinition
attribute
- the unknown attributeparsingContext
- the XML parsing context used for parsing- Returns:
true
if the attribute was handled by this method, orfalse
otherwise
-
-