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
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
handleUnknownAttribute
(IBoundDefinitionModelComplex parentDefinition, IBoundObject 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 Details
-
DefaultXmlProblemHandler
public DefaultXmlProblemHandler()
-
-
Method Details
-
handleUnknownAttribute
public boolean handleUnknownAttribute(IBoundDefinitionModelComplex parentDefinition, IBoundObject 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
-