java.lang.Object
org.apache.xmlgraphics.xmp.Metadata
- All Implemented Interfaces:
XMLizable,PropertyAccess
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProperty(String uri, String localName) Returns a propertygetProperty(QName name) Returns a property.intReturns the number of properties.Returns the rdf:value property.iterator()Returns an Iterator over all properties in this structured property.voidMerges this metadata object into a given target metadata object.removeProperty(QName name) Removes a property and returns it if it was found.voidsetProperty(XMPProperty prop) Sets a property.voidtoSAX(ContentHandler handler) Generates SAX events representing the object's state.
-
Constructor Details
-
Metadata
public Metadata()
-
-
Method Details
-
setProperty
Sets a property.- Specified by:
setPropertyin interfacePropertyAccess- Parameters:
prop- the property
-
getProperty
Returns a property- Specified by:
getPropertyin interfacePropertyAccess- Parameters:
uri- the namespace URI of the propertylocalName- the local name of the property- Returns:
- the requested property or null if it's not available
-
getProperty
Returns a property.- Specified by:
getPropertyin interfacePropertyAccess- Parameters:
name- the name of the property- Returns:
- the requested property or null if it's not available
-
removeProperty
Removes a property and returns it if it was found.- Specified by:
removePropertyin interfacePropertyAccess- Parameters:
name- the name of the property- Returns:
- the removed property or null if it was not found
-
getValueProperty
Returns the rdf:value property. This is a shortcut for getProperty(XMPConstants.RDF_VALUE).- Specified by:
getValuePropertyin interfacePropertyAccess- Returns:
- the rdf:value property or null if it's no available
-
getPropertyCount
public int getPropertyCount()Returns the number of properties.- Specified by:
getPropertyCountin interfacePropertyAccess- Returns:
- the number of properties in this metadata object.
-
iterator
Returns an Iterator over all properties in this structured property.- Specified by:
iteratorin interfacePropertyAccess- Returns:
- an Iterator over all properties
-
mergeInto
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
Generates SAX events representing the object's state.- Specified by:
toSAXin interfaceXMLizable- Parameters:
handler- ContentHandler instance to send the SAX events to- Throws:
SAXException- if there's a problem generating the SAX events
-