Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 1.5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`XMPStructure()` Main constructor

Method Summary
`XMPProperty` | `getProperty(QName name)` Returns a property.
`XMPProperty` | `getProperty(String uri, String localName)` Returns a property
`int` | `getPropertyCount()` Returns the number of properties.
`Object` | `getSimpleValue()` Returns a normal Java object representing the value if it is available.
`XMPProperty` | `getValueProperty()` Returns the rdf:value property.
`Iterator` | `iterator()` Returns an Iterator over all properties in this structured property.
`XMPProperty` | `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.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### XMPStructure

    public XMPStructure()

  Main constructor

Method Detail

### getSimpleValue

    public Object getSimpleValue()

  Returns a normal Java object representing the value if it is available.

  Specified by:
    `getSimpleValue` in class `XMPComplexValue`
  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:
    `setProperty` in interface `PropertyAccess`
  Parameters:
    `prop` - the property

### getProperty

    public XMPProperty getProperty(String uri,
                                   String localName)

  Returns a property

  Specified by:
    `getProperty` in interface `PropertyAccess`
  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

### getValueProperty

    public XMPProperty getValueProperty()

  Returns the rdf:value property. This is a shortcut for getProperty(XMPConstants.RDF_VALUE).

  Specified by:
    `getValueProperty` in interface `PropertyAccess`
  Returns:
    the rdf:value property or null if it's no available

### getProperty

    public XMPProperty getProperty(QName name)

  Returns a property.

  Specified by:
    `getProperty` in interface `PropertyAccess`
  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:
    `removeProperty` in interface `PropertyAccess`
  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 interface `PropertyAccess`
  Returns:
    the number of properties in this metadata object.

### iterator

    public Iterator iterator()

  Returns an Iterator over all properties in this structured property.

  Specified by:
    `iterator` in interface `PropertyAccess`
  Returns:
    an Iterator over all properties

### toSAX

    public void toSAX(ContentHandler handler)
               throws SAXException

  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:
    `SAXException` - if there's a problem generating the SAX events

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 1.5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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