com.flexive.shared.media.impl
Class FxImageMetadataImpl

java.lang.Object
  extended by com.flexive.shared.media.FxMetadata
      extended by com.flexive.shared.media.FxImageMetadata
          extended by com.flexive.shared.media.impl.FxImageMetadataImpl

public class FxImageMetadataImpl
extends FxImageMetadata

Image metadata

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

Nested Class Summary
 
Nested classes/interfaces inherited from class com.flexive.shared.media.FxMetadata
FxMetadata.FxMetadataItem
 
Constructor Summary
FxImageMetadataImpl(java.lang.String mimeType, java.lang.String filename, java.util.List<FxMetadata.FxMetadataItem> metadata, int width, int height, java.lang.String format, java.lang.String formatDescription, java.lang.String compressionAlgorithm, double xResolution, double yResolution, java.lang.String colorType, boolean usePalette, int bpp, boolean progressive, boolean transparent, java.awt.color.ICC_Profile icc)
           
 
Method Summary
 int getBitsPerPixel()
          Get the bits per pixel used (eg "24")
 java.lang.String getColorType()
          Get the used color type (eg "RGB")
 java.lang.String getCompressionAlgorithm()
          Get the compression algorithm used (eg "JPEG")
 java.lang.String getFilename()
          Get the file name, can be null if unknown
 java.lang.String getFormat()
          Get the format (eg "JPEG")
 java.lang.String getFormatDescription()
          Get a more descriptive name of the format (eg "JPEG (Joint Photographic Experts Group) Format")
 int getHeight()
          Get the image height
 java.awt.color.ICC_Profile getICC_Profile()
          Get the ICC profile if one is attached, else null
 FxMediaType getMediaType()
          Get the type of this metadata instance to allow easier upcasts
 java.util.List<FxMetadata.FxMetadataItem> getMetadata()
          Get a list of defined metadata items
 java.lang.String getMimeType()
          Get the mime type
 int getWidth()
          Get the image width
 double getXResolution()
          Get the X-Resolution in DPI
 double getYResolution()
          Get the Y-Resolution in DPI
 boolean hasICC_Profile()
          Is an ICC profile attached to this image?
 boolean isImageMetadata()
          Check if this metadata object is an image metadata instance
 boolean isProgressive()
          Is this image progressive scan?
 boolean isTransparent()
          Does the image use a transparent background?
 boolean usePalette()
          Does the image use its own color palette?
protected  void writeXMLTags(javax.xml.stream.XMLStreamWriter writer)
          Write implementation specific XML tags
 
Methods inherited from class com.flexive.shared.media.FxMetadata
asImageMetadata, isAudioMetadata, isVideoMetadata, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FxImageMetadataImpl

public FxImageMetadataImpl(java.lang.String mimeType,
                           java.lang.String filename,
                           java.util.List<FxMetadata.FxMetadataItem> metadata,
                           int width,
                           int height,
                           java.lang.String format,
                           java.lang.String formatDescription,
                           java.lang.String compressionAlgorithm,
                           double xResolution,
                           double yResolution,
                           java.lang.String colorType,
                           boolean usePalette,
                           int bpp,
                           boolean progressive,
                           boolean transparent,
                           java.awt.color.ICC_Profile icc)
Method Detail

getMediaType

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

Specified by:
getMediaType in class FxMetadata
Returns:
type of this metadata instance

isImageMetadata

public boolean isImageMetadata()
Check if this metadata object is an image metadata instance

Overrides:
isImageMetadata in class FxMetadata
Returns:
this object is an image meta data instance

getMimeType

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

Specified by:
getMimeType in class FxMetadata
Returns:
mime type

getFilename

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

Specified by:
getFilename in class FxMetadata
Returns:
filename or null

getMetadata

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

Specified by:
getMetadata in class FxMetadata
Returns:
list of defined metadata items

getWidth

public int getWidth()
Get the image width

Specified by:
getWidth in class FxImageMetadata
Returns:
image width

getHeight

public int getHeight()
Get the image height

Specified by:
getHeight in class FxImageMetadata
Returns:
image height

getFormat

public java.lang.String getFormat()
Get the format (eg "JPEG")

Specified by:
getFormat in class FxImageMetadata
Returns:
format

getFormatDescription

public java.lang.String getFormatDescription()
Get a more descriptive name of the format (eg "JPEG (Joint Photographic Experts Group) Format")

Specified by:
getFormatDescription in class FxImageMetadata
Returns:
long format

getCompressionAlgorithm

public java.lang.String getCompressionAlgorithm()
Get the compression algorithm used (eg "JPEG")

Specified by:
getCompressionAlgorithm in class FxImageMetadata
Returns:
compression algorithm used

getXResolution

public double getXResolution()
Get the X-Resolution in DPI

Specified by:
getXResolution in class FxImageMetadata
Returns:
X-Resolution in DPI

getYResolution

public double getYResolution()
Get the Y-Resolution in DPI

Specified by:
getYResolution in class FxImageMetadata
Returns:
Y-Resolution in DPI

getColorType

public java.lang.String getColorType()
Get the used color type (eg "RGB")

Specified by:
getColorType in class FxImageMetadata
Returns:
used color type

usePalette

public boolean usePalette()
Does the image use its own color palette?

Specified by:
usePalette in class FxImageMetadata
Returns:
use own color palette?

getBitsPerPixel

public int getBitsPerPixel()
Get the bits per pixel used (eg "24")

Specified by:
getBitsPerPixel in class FxImageMetadata
Returns:
bits per pixel used

isProgressive

public boolean isProgressive()
Is this image progressive scan?

Specified by:
isProgressive in class FxImageMetadata
Returns:
progressive scan?

isTransparent

public boolean isTransparent()
Does the image use a transparent background?

Specified by:
isTransparent in class FxImageMetadata
Returns:
transparency?

hasICC_Profile

public boolean hasICC_Profile()
Is an ICC profile attached to this image?

Specified by:
hasICC_Profile in class FxImageMetadata
Returns:
ICC profile attached?

getICC_Profile

public java.awt.color.ICC_Profile getICC_Profile()
Get the ICC profile if one is attached, else null

Specified by:
getICC_Profile in class FxImageMetadata
Returns:
ICC profile if attached

writeXMLTags

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

Specified by:
writeXMLTags in class FxMetadata
Parameters:
writer - XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException - on errors