com.flexive.shared.media
Class FxMetadata

java.lang.Object
  extended by com.flexive.shared.media.FxMetadata
Direct Known Subclasses:
FxImageMetadata, FxUnknownMetadataImpl

public abstract class FxMetadata
extends java.lang.Object

Generic media metadata

Version:
$Rev: 462 $
Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Nested Class Summary
static class FxMetadata.FxMetadataItem
          An item holding metadata
 
Constructor Summary
FxMetadata()
           
 
Method Summary
 FxImageMetadata asImageMetadata()
          Get this metadata object as an FxImageMetadata instance
abstract  java.lang.String getFilename()
          Get the file name, can be null if unknown
abstract  FxMediaType getMediaType()
          Get the type of this metadata instance to allow easier upcasts
abstract  java.util.List<FxMetadata.FxMetadataItem> getMetadata()
          Get a list of defined metadata items
abstract  java.lang.String getMimeType()
          Get the mime type
 java.lang.String toXML()
          Get this metadata object as XML document
protected abstract  void writeXMLTags(javax.xml.stream.XMLStreamWriter writer)
          Write implementation specific XML tags
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FxMetadata

public FxMetadata()
Method Detail

getMediaType

public abstract FxMediaType getMediaType()
Get the type of this metadata instance to allow easier upcasts

Returns:
type of this metadata instance

getMimeType

public abstract java.lang.String getMimeType()
Get the mime type

Returns:
mime type

getFilename

public abstract java.lang.String getFilename()
Get the file name, can be null if unknown

Returns:
filename or null

getMetadata

public abstract java.util.List<FxMetadata.FxMetadataItem> getMetadata()
Get a list of defined metadata items

Returns:
list of defined metadata items

asImageMetadata

public FxImageMetadata asImageMetadata()
                                throws FxApplicationException
Get this metadata object as an FxImageMetadata instance

Returns:
FxImageMetadata instance
Throws:
FxApplicationException - on errors

toXML

public java.lang.String toXML()
                       throws FxApplicationException
Get this metadata object as XML document

Returns:
XML document
Throws:
FxApplicationException - on errors

writeXMLTags

protected abstract void writeXMLTags(javax.xml.stream.XMLStreamWriter writer)
                              throws javax.xml.stream.XMLStreamException
Write implementation specific XML tags

Parameters:
writer - XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException - on errors