1 /* Copyright (C) 2005-2011 Fabio Riccardi */ 2 3 package com.lightcrafts.image.metadata; 4 5 import java.text.SimpleDateFormat; 6 7 import com.lightcrafts.app.Application; 8 9 /** 10 * <code>XMPConstants</code> defines constants for XMP. 11 * 12 * @author Paul J. Lucas [paul@lightcrafts.com] 13 */ 14 public interface XMPConstants { 15 16 /** This is the date format required by XMP. */ 17 SimpleDateFormat ISO_8601_DATE_FORMAT = 18 new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss" ); 19 20 /** The Dublin Core namespace URI. */ 21 String XMP_DC_NS = "http://purl.org/dc/elements/1.1/"; 22 23 /** The Dublin Core namespace prefix. */ 24 String XMP_DC_PREFIX = "dc"; 25 26 /** The EXIF auxiliary namespace URI. */ 27 String XMP_EXIF_AUX_NS = "http://ns.adobe.com/exif/1.0/aux/"; 28 29 /** The EXIF auxiliary namespace prefix. */ 30 String XMP_EXIF_AUX_PREFIX = "aux"; 31 32 /** The EXIF namespace URI. */ 33 String XMP_EXIF_NS = "http://ns.adobe.com/exif/1.0/"; 34 35 /** The EXIF namespace prefix. */ 36 String XMP_EXIF_PREFIX = "exif"; 37 38 /** The IPTC Core namespace URI. */ 39 String XMP_IPTC_NS = "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"; 40 41 /** The IPTC Core namespace prefix. */ 42 String XMP_IPTC_PREFIX = "Iptc4xmpCore"; 43 44 /** The XMP namespace URI. */ 45 String XMP_NS = "adobe:ns:meta/"; 46 47 /** The value for the XMP <code>id</code> attribute. */ 48 String XMP_PACKET_ID = "W5M0MpCehiHzreSzNTczkc9d"; 49 50 /** The RDF namespace URI. */ 51 String XMP_RDF_NS = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 52 53 /** The RDF namespace prefix. */ 54 String XMP_RDF_PREFIX = "rdf"; 55 56 /** The TIFF namespace URI. */ 57 String XMP_TIFF_NS = "http://ns.adobe.com/tiff/1.0/"; 58 59 /** The TIFF namespace prefix. */ 60 String XMP_TIFF_PREFIX = "tiff"; 61 62 /** The XAP namespace URI. */ 63 String XMP_XAP_NS = "http://ns.adobe.com/xap/1.0/"; 64 65 /** The XAP namespace prefix. */ 66 // String XMP_XAP_PREFIX = "xap"; 67 String XMP_XAP_PREFIX = "xmp"; 68 69 /** The XMP XPacket begin processing instruction. */ 70 String XMP_XPACKET_BEGIN = 71 "<?xpacket begin='' id='" + XMP_PACKET_ID + "'?>"; 72 73 /** The XMP XPacket end processing instruction. */ 74 String XMP_XPACKET_END = "<?xpacket end='w'?>"; 75 76 /** 77 * The text for an empty XMP document. 78 * @see XMPUtil#createEmptyXMPDocument(boolean) 79 */ 80 String XMP_EMPTY_DOCUMENT_STRING = 81 "<x:xmpmeta xmlns:x='" + XMP_NS + "'>\n" + 82 " <" + XMP_RDF_PREFIX + ":RDF xmlns:" + XMP_RDF_PREFIX + "='" 83 + XMP_RDF_NS + "'/>\n" + 84 "</x:xmpmeta>\n"; 85 86 /** 87 * The text for an empty LZN XMP document. 88 */ 89 String XMP_EMPTY_LZN_DESCRIPTION_STRING = 90 '<' + XMP_RDF_PREFIX + ":Description " + 91 XMP_RDF_PREFIX + ":about='' xmlns:" + XMP_RDF_PREFIX + "='" 92 + XMP_RDF_NS + "' xmlns:lzn='" + Application.LznNamespace + "'/>"; 93 94 } 95 /* vim:set et sw=4 ts=4: */ 96