Interface IXmlParsingContext
- All Superinterfaces:
IParsingContext<org.codehaus.stax2.XMLEventReader2,IXmlProblemHandler>
- All Known Implementing Classes:
MetaschemaXmlReader
public interface IXmlParsingContext
extends IParsingContext<org.codehaus.stax2.XMLEventReader2,IXmlProblemHandler>
-
Method Summary
Modifier and TypeMethodDescription<CLASS> CLASSread(IBoundDefinitionModelComplex definition) Parses XML into a bound object based on the provideddefinition.<T> booleanreadItems(IBoundInstanceModel<T> instance, IBoundObject parentObject, boolean parseGrouping) Read the data associated with theinstanceand apply it to the providedparentObject.Methods inherited from interface gov.nist.secauto.metaschema.databind.io.IParsingContext
getProblemHandler, getReader, getSource
-
Method Details
-
read
Parses XML into a bound object based on the provideddefinition.Parses the
XMLStreamConstants.START_DOCUMENT, any processing instructions, and the element.- Type Parameters:
CLASS- the returned object type- Parameters:
definition- the definition describing the element data to read- Returns:
- the parsed object
- Throws:
IOException- if an error occurred while parsing the input
-
readItems
<T> boolean readItems(@NonNull IBoundInstanceModel<T> instance, @NonNull IBoundObject parentObject, boolean parseGrouping) throws IOException Read the data associated with theinstanceand apply it to the providedparentObject.- Type Parameters:
T- the item Java type- Parameters:
instance- the instance to parse data forparentObject- the Java object that data parsed by this method will be stored inparseGrouping- iftrueparse the instance's grouping element orfalseotherwise- Returns:
trueif the instance was parsed, orfalseif the data did not contain information for this instance- Throws:
IOException- if an error occurred while parsing the input
-