Class SimpleContext

  • All Implemented Interfaces:
    Context

    public class SimpleContext
    extends java.lang.Object
    implements Context
    Simple context that remembers all metadata and thumbnail images found.
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleContext()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addException​(ProcessorException e)
      Add an exception that occurred while processing an asset.
      void addMetadata​(java.io.InputStream meta)
      Add metadata.
      void addThumbnail​(java.awt.image.BufferedImage image)
      Add thumbnail image.
      ProcessorException[] getExceptions()
      Return all exceptions found during processing.
      java.io.InputStream[] getMetadata()
      Return all metadata found, as an array.
      java.awt.image.BufferedImage[] getThumbnails()
      Return all images found, as an array.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleContext

        public SimpleContext()
    • Method Detail

      • getMetadata

        public java.io.InputStream[] getMetadata()
        Return all metadata found, as an array.
        Returns:
        metadata or null
      • getThumbnails

        public java.awt.image.BufferedImage[] getThumbnails()
        Return all images found, as an array.
        Returns:
        images or null
      • getExceptions

        public ProcessorException[] getExceptions()
        Return all exceptions found during processing.
        Returns:
        exceptions or null
      • addException

        public void addException​(ProcessorException e)
        Add an exception that occurred while processing an asset.
        Specified by:
        addException in interface Context
        Parameters:
        e - exception to add
      • addMetadata

        public void addMetadata​(java.io.InputStream meta)
        Add metadata.
        Specified by:
        addMetadata in interface Context
        Parameters:
        meta - metadata
      • addThumbnail

        public void addThumbnail​(java.awt.image.BufferedImage image)
        Add thumbnail image.
        Specified by:
        addThumbnail in interface Context
        Parameters:
        image - buffered image