Class XmpManager

java.lang.Object
se.datadosen.jalbum.XmpManager

public class XmpManager extends Object
Interface to get and set XMP properties bound to an AlbumObject
Since:
10.0
  • Field Details

  • Constructor Details

    • XmpManager

      public XmpManager(AlbumObject ao) throws com.adobe.internal.xmp.XMPException, IOException, org.apache.commons.imaging.ImageReadException
      Throws:
      com.adobe.internal.xmp.XMPException
      IOException
      org.apache.commons.imaging.ImageReadException
    • XmpManager

      public XmpManager(File f) throws com.adobe.internal.xmp.XMPException, IOException, org.apache.commons.imaging.ImageReadException
      Throws:
      com.adobe.internal.xmp.XMPException
      IOException
      org.apache.commons.imaging.ImageReadException
  • Method Details

    • getXMPMeta

      public com.adobe.internal.xmp.XMPMeta getXMPMeta()
      Get access to the underlying Adobe XMPMeta object
      Returns:
    • save

      public void save(boolean restoreLastModifiedDate) throws IOException
      Throws:
      IOException
    • save

      public void save() throws IOException
      Throws:
      IOException
    • save

      public void save(byte[] jpegBytes, File dest) throws IOException
      Throws:
      IOException
    • saveThumb

      public void saveThumb(byte[] jpegBytes, String imageSettingsHash, File dest) throws IOException
      Throws:
      IOException
    • save

      public void save(byte[] bytes, OutputStream os) throws IOException
      Throws:
      IOException
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getRating

      public Integer getRating()
    • setRating

      public void setRating(Integer rating) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getCreator

      public String getCreator() throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • setCreator

      public void setCreator(String creator) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getRights

      public String getRights() throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • setRights

      public void setRights(String rights) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getRightsURL

      public String getRightsURL() throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • setRightsURL

      public void setRightsURL(String rightsURL) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getKeywordSet

      public Set<String> getKeywordSet() throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getKeywords

      public String getKeywords() throws com.adobe.internal.xmp.XMPException
      Get a comma separated list of keywords or null if keywords are missing
      Returns:
      Throws:
      com.adobe.internal.xmp.XMPException
    • setKeywords

      public void setKeywords(String keywords) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • setKeywords

      public void setKeywords(String[] keyArray) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getFlag

      public Flag getFlag() throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • setFlag

      public void setFlag(Flag flag) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • setGpsLatitude

      public void setGpsLatitude(double latitude) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • setGpsLongitude

      public void setGpsLongitude(double longitude) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getGpsLatitude

      public Double getGpsLatitude() throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getGpsLongitude

      public Double getGpsLongitude() throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getGpsLocation

      public String getGpsLocation() throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • setGpsLocation

      public void setGpsLocation(String loc) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • toGpsLocation

      public static String toGpsLocation(double latitude, double longitude)
      Return Google Maps formatted GPS location, based on latitude and longitude
    • getJAlbumProperty

      public String getJAlbumProperty(String key) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • getJAlbumProperty

      public String getJAlbumProperty(String key, String def) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • setJAlbumProperty

      public void setJAlbumProperty(String key, String value) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • deleteJAlbumProperty

      public void deleteJAlbumProperty(String key) throws com.adobe.internal.xmp.XMPException
      Throws:
      com.adobe.internal.xmp.XMPException
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a PropertyChangeListener from the listener list. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.

      If listener is null, no exception is thrown and no action is performed.

      Parameters:
      listener - the PropertyChangeListener to be removed
      See Also:
    • addPropertyChangeListener

      public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
    • firePropertyChange

      protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
      Support for reporting bound property changes for Object properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.
      Parameters:
      propertyName - the property whose value has changed
      oldValue - the property's previous value
      newValue - the property's new value