Class MarshallingContext

    • Constructor Detail

      • MarshallingContext

        public MarshallingContext()
    • Method Detail

      • clear

        public void clear()
        Clear is invoked after each bean object (record or group) is marshalled.
        Overrides:
        clear in class ParsingContext
      • writeRecord

        public void writeRecord()
                         throws java.io.IOException
        Writes the current record object to the record writer. This method will invoke the getRecordObject() method.
        Throws:
        java.io.IOException - if an I/O error occurs
      • getRecordObject

        protected abstract java.lang.Object getRecordObject()
        Returns the record object to pass to the RecordWriter when writeRecord() is called.
        Returns:
        the record object
      • toArray

        public java.lang.String[] toArray​(java.lang.Object record)
        Converts a record object to a String[].
        Parameters:
        record - the record object to convert
        Returns:
        the String array result, or null if not supported
      • toList

        public java.util.List<java.lang.String> toList​(java.lang.Object record)
        Converts a record object to a List.
        Parameters:
        record - the record object to convert
        Returns:
        the List result, or null if not supported
      • toDocument

        public org.w3c.dom.Document toDocument​(java.lang.Object record)
        Converts a record object to a Document.
        Parameters:
        record - the record object to convert
        Returns:
        the Document result, or null if not supported
      • getComponentName

        public java.lang.String getComponentName()
        Returns the component name of the record or group to marshal. May be null if not specified.
        Returns:
        the component name to marshal
      • setComponentName

        public void setComponentName​(java.lang.String componentName)
        Sets the component name of the record or group to marshal.
        Parameters:
        componentName - the component name to marshal
      • getBean

        public java.lang.Object getBean()
        Returns the bean object to marshal.
        Returns:
        the bean object to marshal
      • setBean

        public void setBean​(java.lang.Object bean)
        Sets the bean object to marshal.
        Parameters:
        bean - the bean object