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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhandleUnknownAttribute(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, handleMissingInstancesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gov.nist.secauto.metaschema.databind.io.IProblemHandler
handleMissingInstancesMethods 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:IXmlProblemHandlerCallback used to handle an attribute that is unknown to the model being parsed.- Specified by:
handleUnknownAttributein interfaceIXmlProblemHandler- Parameters:
parentDefinition- the bound class currently describing the data being parsedtargetObject- the Java object for theparentDefinitionattribute- the unknown attributeparsingContext- the XML parsing context used for parsing- Returns:
trueif the attribute was handled by this method, orfalseotherwise
-