Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4411020

Provide concrete implementations of get*MetadataFormat in metadata, spis

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • beta
    • generic
    • solaris_7

        Currently, plug-ins must provide implementations of the methods:

      IIOMetadata.getMetadataFormat
      ImageReaderWriterSpi.getStreamMetadataFormat
      ImageReaderWriterSpi.getImageMetadataFormat

      This requires each plug-in writer to be responsible for maintaining tedious and
      redundant code, which is likely to lead to bugs.

        A better solution is to require each metadata format to be described by
      a different implementation class, and to require a 'public static getInstance'
      method on each implementation, in the manner of the 'singleton' pattern.
      Then, by providing the class names of the implementation classes to the
      spi and metadata objects, a library implementation may use reflection to
      do the work.

        To implement this approach, additional arguments specifying whether the
      plug-in supports the standard metadata format for stream and/or image metadata,
      and the names of any IIOMetadataFormat implementation classes in addition
      to those describing the native and standard formats must be supplied to the
      constructors of ImageReaderWriterSpi, ImageReaderSpi, ImageWriterSpi, and
      IIOMetadata, and the instance variables on these classes must be altered to
      hold the new information.


            dricesunw Daniel Rice (Inactive)
            dricesunw Daniel Rice (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: