Examples of XMPDateTime


Examples of com.adobe.xmp.XMPDateTime

    @Override
    public Date getDate(Property property) {
        Date result = null;

        try {
            XMPDateTime xmpDate = XMPUtils.convertToDate( this.get( property.getName() ) );
            if (xmpDate != null) {
                Calendar cal = xmpDate.getCalendar();
                // TODO Timezone is currently lost
                // need another solution that preserves the timezone
                result = cal.getTime();
            }
        }
View Full Code Here

Examples of com.adobe.xmp.XMPDateTime

      return;
    }
   
    try
    {
      XMPDateTime binGPSStamp;
      XMPDateTime binOtherDate;
     
      binGPSStamp = XMPUtils.convertToDate(gpsDateTime.getValue());
      if (binGPSStamp.getYear() != ||
        binGPSStamp.getMonth() != ||
        binGPSStamp.getDay() != 0)
      {
        return;
      }
     
      XMPNode otherDate = XMPNodeUtils.findChildNode(exifSchema, "exif:DateTimeOriginal",
          false);
      if (otherDate == null)
      {
        otherDate = XMPNodeUtils.findChildNode(exifSchema, "exif:DateTimeDigitized", false);
      }
 
      binOtherDate = XMPUtils.convertToDate(otherDate.getValue());
      Calendar cal = binGPSStamp.getCalendar();
      cal.set(Calendar.YEAR, binOtherDate.getYear());
      cal.set(Calendar.MONTH, binOtherDate.getMonth());
      cal.set(Calendar.DAY_OF_MONTH, binOtherDate.getDay());
      binGPSStamp = new XMPDateTimeImpl(cal);
      gpsDateTime.setValue(XMPUtils.convertFromDate (binGPSStamp));
    }
    catch (XMPException e)
    {
View Full Code Here

Examples of com.adobe.xmp.XMPDateTime

    @Override
    public Date getDate(Property property) {
        Date result = null;

        try {
            XMPDateTime xmpDate = XMPUtils.convertToDate( this.get( property.getName() ) );
            if (xmpDate != null) {
                Calendar cal = xmpDate.getCalendar();
                // TODO Timezone is currently lost
                // need another solution that preserves the timezone
                result = cal.getTime();
            }
        }
View Full Code Here

Examples of com.adobe.xmp.XMPDateTime

    {
      strValue = XMPUtils.convertFromDate((XMPDateTime) value);
    }
    else if (value instanceof GregorianCalendar)
    {
      XMPDateTime dt = XMPDateTimeFactory.createFromCalendar((GregorianCalendar) value);
      strValue = XMPUtils.convertFromDate(dt);
    }
    else if (value instanceof byte[])
    {
      strValue = XMPUtils.encodeBase64((byte[]) value);
View Full Code Here

Examples of com.adobe.xmp.XMPDateTime

      break;
    case VALUE_DATE:
      value = XMPUtils.convertToDate(rawValue);
      break;
    case VALUE_CALENDAR:
      XMPDateTime dt = XMPUtils.convertToDate(rawValue);
      value = dt.getCalendar();
      break;
    case VALUE_BASE64:
      value = XMPUtils.decodeBase64(rawValue);
      break;
    case VALUE_STRING:
View Full Code Here

Examples of com.itextpdf.xmp.XMPDateTime

    {
      strValue = XMPUtils.convertFromDate((XMPDateTime) value);
    }
    else if (value instanceof GregorianCalendar)
    {
      XMPDateTime dt = XMPDateTimeFactory.createFromCalendar((GregorianCalendar) value);
      strValue = XMPUtils.convertFromDate(dt);
    }
    else if (value instanceof byte[])
    {
      strValue = XMPUtils.encodeBase64((byte[]) value);
View Full Code Here

Examples of com.itextpdf.xmp.XMPDateTime

      return;
    }
   
    try
    {
      XMPDateTime binGPSStamp;
      XMPDateTime binOtherDate;
     
      binGPSStamp = XMPUtils.convertToDate(gpsDateTime.getValue());
      if (binGPSStamp.getYear() != ||
        binGPSStamp.getMonth() != ||
        binGPSStamp.getDay() != 0)
      {
        return;
      }
     
      XMPNode otherDate = XMPNodeUtils.findChildNode(exifSchema, "exif:DateTimeOriginal",
          false);
      if (otherDate == null)
      {
        otherDate = XMPNodeUtils.findChildNode(exifSchema, "exif:DateTimeDigitized", false);
      }
 
      binOtherDate = XMPUtils.convertToDate(otherDate.getValue());
      Calendar cal = binGPSStamp.getCalendar();
      cal.set(Calendar.YEAR, binOtherDate.getYear());
      cal.set(Calendar.MONTH, binOtherDate.getMonth());
      cal.set(Calendar.DAY_OF_MONTH, binOtherDate.getDay());
      binGPSStamp = new XMPDateTimeImpl(cal);
      gpsDateTime.setValue(XMPUtils.convertFromDate (binGPSStamp));
    }
    catch (XMPException e)
    {
View Full Code Here

Examples of com.itextpdf.xmp.XMPDateTime

      break;
    case VALUE_DATE:
      value = XMPUtils.convertToDate(rawValue);
      break;
    case VALUE_CALENDAR:
      XMPDateTime dt = XMPUtils.convertToDate(rawValue);
      value = dt.getCalendar();
      break;
    case VALUE_BASE64:
      value = XMPUtils.decodeBase64(rawValue);
      break;
    case VALUE_STRING:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.