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
ConstructorsConstructorDescriptionMetaschemaXmlWriter(org.codehaus.stax2.XMLStreamWriter2 writer) Construct a new Module-aware JSON writer. -
Method Summary
Modifier and TypeMethodDescriptionorg.codehaus.stax2.XMLStreamWriter2Get the writer associated with the writing context.voidwrite(IBoundDefinitionModelComplex definition, IBoundObject item) Write the data described by the providedtargetObjectas an XML element.voidwriteRoot(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:IWritingContextGet the writer associated with the writing context.- Specified by:
getWriterin interfaceIWritingContext<org.codehaus.stax2.XMLStreamWriter2>- Returns:
- the writer
-
write
public void write(@NonNull IBoundDefinitionModelComplex definition, @NonNull IBoundObject item) throws IOException Description copied from interface:IWritingContextWrite the data described by the providedtargetObjectas an XML element.- Specified by:
writein 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:
writeRootin interfaceIXmlWritingContext- Throws:
IOException
-