Interface IWritingContext<WRITER>

Type Parameters:
WRITER - the type of writer used for output
All Known Subinterfaces:
IJsonWritingContext, IXmlWritingContext
All Known Implementing Classes:
MetaschemaJsonWriter, MetaschemaXmlWriter

public interface IWritingContext<WRITER>
Provides the context for writing bound objects to a specific output format.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A functional interface for writing object properties.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the writer associated with the writing context.
    void
    write(IBoundDefinitionModelComplex definition, dev.metaschema.core.model.IBoundObject targetObject)
    Write the data described by the provided targetObject as an XML element.
  • Method Details

    • getWriter

      @NonNull WRITER getWriter()
      Get the writer associated with the writing context.
      Returns:
      the writer
    • write

      void write(@NonNull IBoundDefinitionModelComplex definition, @NonNull dev.metaschema.core.model.IBoundObject targetObject) throws IOException
      Write the data described by the provided targetObject as an XML element.
      Parameters:
      definition - the bound Module definition describing the data to write
      targetObject - the Java object data to write
      Throws:
      IOException - if an error occurred while writing