Project Wonder 5.0

er.attachment.metadata
Class ERMetadataDirectorySet

java.lang.Object
  extended by er.attachment.metadata.ERMetadataDirectorySet

public class ERMetadataDirectorySet
extends java.lang.Object

An ERMetadataDirectorySet contains generic metadata (like width/height) as well a set of metadata directories (like EXIF or IPTC).

Author:
mschrag

Constructor Summary
ERMetadataDirectorySet()
           
 
Method Summary
 IERMetadataDirectory _getDirectoryNamed(java.lang.String directoryName)
          Returns the metadata directory of the given type (IERMetadataDirectory.EXIF, IERMetadataDirectory.IPTC, etc).
 void add(ERMetadataDirectorySet rawAssetMetadata)
          Adds the given raw directory set to this directory set.
 void addMetadata(IERMetadataDirectory metadata)
          Adds a metadata directory to this set.
 java.lang.String getCaption()
          Returns the caption for the image.
 ERParsedMetadataDirectory getDirectoryNamed(java.lang.String directoryName)
          Returns the metadata directory of the given type (IERMetadataDirectory.EXIF, IERMetadataDirectory.IPTC, etc) and casts to an ERParsedMetadataDirectory.
 int getHeight()
          Returns the height of the image.
 java.util.List<IERMetadataDirectory> getMetadataDirectories()
          Returns the metadata directories from this set.
 int getWidth()
          Returns the width of the image.
 boolean isEmpty()
           
 boolean isRotated()
          Returns whether or not the image was rotated.
protected  void parseUnparsedDirectoriesWith(IERMetadataDirectoryParser metadataDirectoryParser)
           
protected  java.util.List<IERMetadataDirectory> removeUnparsedDirectories()
           
protected  void replaceUnparsedWithParsed(ERUnparsedMetadataDirectory oldMetadata, ERParsedMetadataDirectory newMetadata)
           
 void setCaption(java.lang.String caption)
          Sets the caption for the image.
 void setHeight(int height)
          Sets the height of the image.
 void setRotated(boolean rotated)
          Sets whether or not the given image was rotated.
 void setWidth(int width)
          Sets the width of the image.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ERMetadataDirectorySet

public ERMetadataDirectorySet()
Method Detail

isEmpty

public boolean isEmpty()

setWidth

public void setWidth(int width)
Sets the width of the image.

Parameters:
width - the width of the image

getWidth

public int getWidth()
Returns the width of the image.


setHeight

public void setHeight(int height)
Sets the height of the image.

Parameters:
height - the height of the image

getHeight

public int getHeight()
Returns the height of the image.


setRotated

public void setRotated(boolean rotated)
Sets whether or not the given image was rotated.

Parameters:
rotated - whether or not the given image was rotated

isRotated

public boolean isRotated()
Returns whether or not the image was rotated.


getCaption

public java.lang.String getCaption()
Returns the caption for the image.

Returns:
the caption for the image

setCaption

public void setCaption(java.lang.String caption)
Sets the caption for the image.


_getDirectoryNamed

public IERMetadataDirectory _getDirectoryNamed(java.lang.String directoryName)
Returns the metadata directory of the given type (IERMetadataDirectory.EXIF, IERMetadataDirectory.IPTC, etc).

Parameters:
directoryName - the metadata directory name
Returns:
the matching meatdata directory, or null if one does not exist

getDirectoryNamed

public ERParsedMetadataDirectory getDirectoryNamed(java.lang.String directoryName)
Returns the metadata directory of the given type (IERMetadataDirectory.EXIF, IERMetadataDirectory.IPTC, etc) and casts to an ERParsedMetadataDirectory.

Parameters:
directoryName - the metadata directory name
Returns:
the matching meatdata directory, or null if one does not exist

addMetadata

public void addMetadata(IERMetadataDirectory metadata)
Adds a metadata directory to this set.

Parameters:
metadata - the metadata directory to add

getMetadataDirectories

public java.util.List<IERMetadataDirectory> getMetadataDirectories()
Returns the metadata directories from this set.


add

public void add(ERMetadataDirectorySet rawAssetMetadata)
Adds the given raw directory set to this directory set.

Parameters:
rawAssetMetadata - a raw directory set

removeUnparsedDirectories

protected java.util.List<IERMetadataDirectory> removeUnparsedDirectories()

parseUnparsedDirectoriesWith

protected void parseUnparsedDirectoriesWith(IERMetadataDirectoryParser metadataDirectoryParser)

replaceUnparsedWithParsed

protected void replaceUnparsedWithParsed(ERUnparsedMetadataDirectory oldMetadata,
                                         ERParsedMetadataDirectory newMetadata)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.