Class MetaschemaXmlWriter
java.lang.Object
gov.nist.secauto.metaschema.databind.io.xml.MetaschemaXmlWriter
- All Implemented Interfaces:
IWritingContext<org.codehaus.stax2.XMLStreamWriter2>
,IXmlWritingContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface gov.nist.secauto.metaschema.databind.io.IWritingContext
IWritingContext.ObjectWriter<T extends IFeatureComplexItemValueHandler>
-
Constructor Summary
ConstructorDescriptionMetaschemaXmlWriter
(org.codehaus.stax2.XMLStreamWriter2 writer) Construct a new Module-aware JSON writer. -
Method Summary
Modifier and TypeMethodDescriptionorg.codehaus.stax2.XMLStreamWriter2
Get the writer associated with the writing context.void
write
(IBoundDefinitionModelComplex definition, IBoundObject item) Write the data described by the providedtargetObject
as an XML element.void
writeRoot
(IBoundDefinitionModelAssembly definition, IBoundObject item)
-
Constructor Details
-
MetaschemaXmlWriter
Construct a new Module-aware JSON writer.- Parameters:
writer
- the XML stream writer to write with- See Also:
-
-
Method Details
-
getWriter
Description copied from interface:IWritingContext
Get the writer associated with the writing context.- Specified by:
getWriter
in interfaceIWritingContext<org.codehaus.stax2.XMLStreamWriter2>
- Returns:
- the writer
-
write
public void write(@NonNull IBoundDefinitionModelComplex definition, @NonNull IBoundObject item) throws IOException Description copied from interface:IWritingContext
Write the data described by the providedtargetObject
as an XML element.- Specified by:
write
in interfaceIWritingContext<org.codehaus.stax2.XMLStreamWriter2>
- Parameters:
definition
- the bound Module definition describing the data to writeitem
- the Java object data to write- Throws:
IOException
- if an error occurred while writing
-
writeRoot
public void writeRoot(@NonNull IBoundDefinitionModelAssembly definition, @NonNull IBoundObject item) throws IOException - Specified by:
writeRoot
in interfaceIXmlWritingContext
- Throws:
IOException
-