org.hd.d.pg2k.svrCore.mediahandler
Class mid

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.MIME.AbstractHandler
      extended by org.hd.d.pg2k.svrCore.mediahandler.mid
All Implemented Interfaces:
Handler

public final class mid
extends AbstractHandler

Basic handler for MIDI file (MIME type audio/midi).


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hd.d.pg2k.svrCore.MIME.Handler
Handler.ThumbnailParams
 
Field Summary
 
Fields inherited from interface org.hd.d.pg2k.svrCore.MIME.Handler
TAG_NAME_METADATA_TOP
 
Constructor Summary
mid()
           
 
Method Summary
 ExhibitMIME.ExhibitTypeParameters getExhibitType()
          Get internal type of ExhibitMIME type; never null.
 org.w3c.dom.Node getMetadata(java.io.InputStream is, Name.ExhibitFull exhibitName)
          Gets all available exhibit metadata as a single XML DOM tree; null if none.
protected  javax.sound.midi.Sequence getSequence(java.io.InputStream is)
          Get format of audio data; null if none or format not usable/parseable.
 
Methods inherited from class org.hd.d.pg2k.svrCore.MIME.AbstractHandler
canMakeThumbnails, decodeImage, get2DImageDimensions, getThumbnailParams, makeImageBinary, makeSizeConstrainedEncodedImage, makeThumbnails, makeThumbnails
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

mid

public mid()
Method Detail

getExhibitType

public ExhibitMIME.ExhibitTypeParameters getExhibitType()
Get internal type of ExhibitMIME type; never null.


getSequence

protected javax.sound.midi.Sequence getSequence(java.io.InputStream is)
Get format of audio data; null if none or format not usable/parseable. This may require the stream to be seekable, at least with mark() and reset().


getMetadata

public org.w3c.dom.Node getMetadata(java.io.InputStream is,
                                    Name.ExhibitFull exhibitName)
Gets all available exhibit metadata as a single XML DOM tree; null if none. We do not (yet) have a schema for this and may never do so, since its structure and content will depend on various external sources and parts of (for example) the ImageIO and JAI subsystems.

This implementation synthesises a metadata tree from the AudioFileFormat data, if any.

Specified by:
getMetadata in interface Handler
Overrides:
getMetadata in class AbstractHandler
Parameters:
is - input stream; never null
exhibitName - TODO
Returns:
top-level node "metadata" with captured metadata beneath, else null

DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.