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
public class XMPStructure extends XMPComplexValue implements PropertyAccess
Represents an XMP structure as defined by the XMP specification.
-
-
Constructor Summary
Constructors Constructor Description XMPStructure()Main constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XMPPropertygetProperty(java.lang.String uri, java.lang.String localName)Returns a propertyXMPPropertygetProperty(QName name)Returns a property.intgetPropertyCount()Returns the number of properties.java.lang.ObjectgetSimpleValue()Returns a normal Java object representing the value if it is available.XMPPropertygetValueProperty()Returns the rdf:value property.java.util.Iteratoriterator()Returns an Iterator over all properties in this structured property.XMPPropertyremoveProperty(QName name)Removes a property and returns it if it was found.voidsetProperty(XMPProperty prop)Sets a property.voidtoSAX(org.xml.sax.ContentHandler handler)Generates SAX events representing the object's state.java.lang.StringtoString()
-
-
-
Method Detail
-
getSimpleValue
public java.lang.Object getSimpleValue()
Returns a normal Java object representing the value if it is available.- Specified by:
getSimpleValuein 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
public void setProperty(XMPProperty prop)
Sets a property.- Specified by:
setPropertyin interfacePropertyAccess- Parameters:
prop- the property
-
getProperty
public XMPProperty getProperty(java.lang.String uri, java.lang.String localName)
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
-
getValueProperty
public XMPProperty 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
-
getProperty
public XMPProperty getProperty(QName name)
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
public XMPProperty removeProperty(QName name)
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
-
getPropertyCount
public int getPropertyCount()
Returns the number of properties.- Specified by:
getPropertyCountin interfacePropertyAccess- Returns:
- the number of properties in this metadata object.
-
iterator
public java.util.Iterator iterator()
Returns an Iterator over all properties in this structured property.- Specified by:
iteratorin interfacePropertyAccess- Returns:
- an Iterator over all properties
-
toSAX
public void toSAX(org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXExceptionGenerates SAX events representing the object's state.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-