xmlgraphics-commons 1.2

org.apache.xmlgraphics.xmp
Class Metadata

java.lang.Object
  extended by org.apache.xmlgraphics.xmp.Metadata
All Implemented Interfaces:
XMLizable

public class Metadata
extends java.lang.Object
implements XMLizable

This class represents the root of an XMP metadata tree. It's more or less equivalent to the x:xmpmeta element together with its nested rdf:RDF element.


Constructor Summary
Metadata()
           
 
Method Summary
 XMPProperty getProperty(QName name)
          Returns a property.
 XMPProperty getProperty(java.lang.String uri, java.lang.String localName)
          Returns a property
 int getPropertyCount()
           
 void mergeInto(Metadata target)
          Merges this metadata object into a given target metadata object.
 void setProperty(XMPProperty prop)
          Sets a property.
 void toSAX(org.xml.sax.ContentHandler handler)
          Generates SAX events representing the object's state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Metadata

public Metadata()
Method Detail

setProperty

public void setProperty(XMPProperty prop)
Sets a property.

Parameters:
prop - the property

getProperty

public XMPProperty getProperty(java.lang.String uri,
                               java.lang.String localName)
Returns a property

Parameters:
uri - the namespace URI of the property
localName - the local name of the property
Returns:
the requested property or null if it's not available

getProperty

public XMPProperty getProperty(QName name)
Returns a property.

Parameters:
name - the name of the property
Returns:
the requested property or null if it's not available

getPropertyCount

public int getPropertyCount()
Returns:
the number of properties in this metadata object.

mergeInto

public void mergeInto(Metadata target)
Merges this metadata object into a given target metadata object. The merge rule set provided by each schema is used for the merge.

Parameters:
target - the target metadata to merge the local metadata into

toSAX

public void toSAX(org.xml.sax.ContentHandler handler)
           throws org.xml.sax.SAXException
Description copied from interface: XMLizable
Generates SAX events representing the object's state.

Specified by:
toSAX in interface XMLizable
Parameters:
handler - ContentHandler instance to send the SAX events to
Throws:
org.xml.sax.SAXException - if there's a problem generating the SAX events
See Also:
XMLizable.toSAX(org.xml.sax.ContentHandler)

xmlgraphics-commons 1.2

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.