Interface OMDataSourceExt

    • Method Detail

      • getObject

        Object getObject()
        Get the object that backs this data source. Application code should in general not call this method directly, but use OMSourcedElement.getObject(Class) instead.

        Data sources that support non destructive read/write should return the object from which the XML is produced. Data sources with destructive read/write should return a non null value only if the backing object has not been consumed yet (even partially).

        Returns:
        the backing object, or null if the data source has no backing object or if the backing object can't be accessed in a safe way
      • 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.
      • hasProperty

        boolean hasProperty​(String name)
        Check if a property with the given name is set on this instance.
        Parameters:
        name - the property name
        Returns:
        true if the property is set
      • getProperty

        Object getProperty​(String name)
        Get the value of a property stored on this instance.
        Parameters:
        name - the property name
        Returns:
        the property value or null
      • setProperty

        Object setProperty​(String name,
                           Object value)
        Set a property on this instance.
        Parameters:
        name - the property name
        value - the property value
        Returns:
        the old property value or null