Interface OMDataSourceExt

    • Method Detail

      • serialize

        void serialize​(OutputStream output,
                       OMOutputFormat format)
                throws XMLStreamException
        Serializes element data directly to stream. Assumes that the backing object is destroyed during serialization if isDestructiveWrite
        Specified by:
        serialize in interface OMDataSource
        Parameters:
        output - destination stream for element XML text
        format - Output format information. The implementation must use this information to choose the correct character set encoding when writing to the output stream. This parameter must not be null.
        Throws:
        XMLStreamException
        See Also:
        OMDataSourceExt
      • serialize

        void serialize​(Writer writer,
                       OMOutputFormat format)
                throws XMLStreamException
        Serializes element data directly to writer. Assumes that the backing object is destroyed during serialization isDestructiveWrite
        Specified by:
        serialize in interface OMDataSource
        Parameters:
        writer - destination writer for element XML text
        format - output format information (null if none; may be ignored if not supported by data binding even if supplied)
        Throws:
        XMLStreamException
        See Also:
        OMDataSourceExt
      • getObject

        Object getObject()
        Returns the backing Object.
        Returns:
        Object
      • isDestructiveRead

        boolean isDestructiveRead()
        Returns true if reading the backing object is destructive. An example of an object with a destructive read is an InputSteam. The owning OMSourcedElement uses this information to detemine if OM tree expansion is needed when reading the OMDataSourceExt.
        Returns:
        boolean
      • isDestructiveWrite

        boolean isDestructiveWrite()
        Returns true if writing the backing object is destructive. An example of an object with a destructive write is an InputStream. The owning OMSourcedElement uses this information to detemine if OM tree expansion is needed when writing the OMDataSourceExt.
        Returns:
        boolean
      • close

        void close()
        Close the DataSource and free its resources.
      • copy

        OMDataSourceExt copy()
        Create a copy of the OMDataSourceExt
        Returns:
        OMDataSourceExt
      • hasProperty

        boolean hasProperty​(String key)
        Returns true if property is set
        Parameters:
        key -
        Returns:
        TODO
      • getProperty

        Object getProperty​(String key)
        Query a property stored on the OMDataSource
        Parameters:
        key -
        Returns:
        value or null
      • setProperty

        Object setProperty​(String key,
                           Object value)
        Set a property on the OMDataSource
        Parameters:
        key -
        value -
        Returns:
        old property object or null