1 17 18 19 20 package org.apache.fop.fo.extensions.xmp; 21 22 import java.io.Serializable ; 23 24 import org.apache.fop.fo.extensions.ExtensionAttachment; 25 import org.apache.fop.util.XMLizable; 26 import org.apache.xmlgraphics.xmp.Metadata; 27 import org.apache.xmlgraphics.xmp.XMPConstants; 28 import org.xml.sax.ContentHandler ; 29 import org.xml.sax.SAXException ; 30 31 34 public class XMPMetadata implements ExtensionAttachment, Serializable , XMLizable { 35 36 37 public static final String CATEGORY = XMPConstants.XMP_NAMESPACE; 38 39 private Metadata meta; 40 private boolean readOnly = true; 41 42 45 public XMPMetadata() { 46 } 48 49 53 public XMPMetadata(Metadata metadata) { 54 this.meta = metadata; 55 } 56 57 58 public Metadata getMetadata() { 59 return this.meta; 60 } 61 62 66 public void setMetadata(Metadata metadata) { 67 this.meta = metadata; 68 } 69 70 71 public boolean isReadOnly() { 72 return readOnly; 73 } 74 75 79 public void setReadOnly(boolean readOnly) { 80 this.readOnly = readOnly; 81 } 82 83 84 public String getCategory() { 85 return CATEGORY; 86 } 87 88 89 public void toSAX(ContentHandler handler) throws SAXException { 90 getMetadata().toSAX(handler); 91 } 92 93 } 94 | Popular Tags |