Class MFLSource

java.lang.Object
com.bea.wli.sb.sources.MFLSource
All Implemented Interfaces:
Source

public class MFLSource extends Object implements Source
This class represents MFL content. MFL data is essentially binary data that has some logical structure imposed on it by an MFL definition. CSV is simple example of MFL data, but the structure can be arbitrarily complex. The logical/in-memory representation of the data is an XML document, but it's serialized representation is the raw "unstructured" binary data.

An MFLSource allows for both views of the MFL data. The content is kept in it's logical form as an XmlObject and this can be obtained from the MFLSource. However, the Source serialization methods writeTo() and getInputStream() will yield the binary form.

  • Field Details

    • MFL_REFERENCE_OPTION

      public static final String MFL_REFERENCE_OPTION
      Transform option used to indicate the MFL resource
      See Also:
  • Constructor Details

    • MFLSource

      public MFLSource(org.apache.xmlbeans.XmlObject xml, Ref mflRef)
  • Method Details

    • getMFLRef

      public Ref getMFLRef()
    • getXmlObject

      public org.apache.xmlbeans.XmlObject getXmlObject()
    • getInputStream

      public InputStream getInputStream(TransformOptions options) throws IOException, TransformException
      Description copied from interface: Source
      Returns streaming byte-baseed representation of the Source's content. The representation of that serialization is entirely up to the Source. Note that this method may involve an internal transformation, although it should not in any way change the underlying content.
      Specified by:
      getInputStream in interface Source
      Parameters:
      options - Options used to affect the serialization
      Returns:
      an InputStream for retrieving the serialized content
      Throws:
      IOException
      TransformException
    • writeTo

      public void writeTo(OutputStream out, TransformOptions options) throws IOException, TransformException
      Description copied from interface: Source
      Serializes the Source's content to a byte-based stream. The representation of that serialization is entirely up to the Source. The Source is forbidden from closing the provided OutputStream, although it is allowed to flush it. However, flushing the stream should be left to the caller, if possible.

      Note that this method may involve an internal transformation, although it should not in any way change the underlying content.

      Specified by:
      writeTo in interface Source
      Parameters:
      out - the OutputStream to which serialized content will be written
      options - TransformOptions used to affect the serialization
      Throws:
      IOException
      TransformException
    • getInstance

      public static MFLSource getInstance(InputStream in, Ref mflRef) throws TransformException
      Throws:
      TransformException
    • getInstance

      public static MFLSource getInstance(org.apache.xmlbeans.XmlObject xml, Ref mflRef)