Package org.apache.xmlgraphics.xmp
Class XMPStructure
java.lang.Object
org.apache.xmlgraphics.xmp.XMPComplexValue
org.apache.xmlgraphics.xmp.XMPStructure
- All Implemented Interfaces:
XMLizable
,PropertyAccess
- Direct Known Subclasses:
XMPThinStructure
Represents an XMP structure as defined by the XMP specification.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProperty
(String uri, String localName) Returns a propertygetProperty
(QName name) Returns a property.int
Returns the number of properties.Returns a normal Java object representing the value if it is available.Returns the rdf:value property.iterator()
Returns an Iterator over all properties in this structured property.removeProperty
(QName name) Removes a property and returns it if it was found.void
setProperty
(XMPProperty prop) Sets a property.void
toSAX
(ContentHandler handler) Generates SAX events representing the object's state.toString()
-
Field Details
-
properties
-
-
Constructor Details
-
XMPStructure
public XMPStructure()Main constructor
-
-
Method Details
-
getSimpleValue
Returns a normal Java object representing the value if it is available.- Specified by:
getSimpleValue
in classXMPComplexValue
- Returns:
- a simple object value or null if no such value can be returned (for example, because the value is an array and has multiple entries.
-
setProperty
Sets a property.- Specified by:
setProperty
in interfacePropertyAccess
- Parameters:
prop
- the property
-
getProperty
Returns a property- Specified by:
getProperty
in 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
-
getValueProperty
Returns the rdf:value property. This is a shortcut for getProperty(XMPConstants.RDF_VALUE).- Specified by:
getValueProperty
in interfacePropertyAccess
- Returns:
- the rdf:value property or null if it's no available
-
getProperty
Returns a property.- Specified by:
getProperty
in 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:
removeProperty
in interfacePropertyAccess
- Parameters:
name
- the name of the property- Returns:
- the removed property or null if it was not found
-
getPropertyCount
public int getPropertyCount()Returns the number of properties.- Specified by:
getPropertyCount
in interfacePropertyAccess
- Returns:
- the number of properties in this metadata object.
-
iterator
Returns an Iterator over all properties in this structured property.- Specified by:
iterator
in interfacePropertyAccess
- Returns:
- an Iterator over all properties
-
toSAX
Generates SAX events representing the object's state.- Specified by:
toSAX
in interfaceXMLizable
- Parameters:
handler
- ContentHandler instance to send the SAX events to- Throws:
SAXException
- if there's a problem generating the SAX events
-
toString
-