org.apache.xmpbox.type

## Class ComplexPropertyContainer

- java.lang.Object
- - org.apache.xmpbox.type.ComplexPropertyContainer

    public class ComplexPropertyContainer
    extends Object

Object representation for arrays content This Class could be used to define directly a property with more than one field (structure) and also schemas

Author:
  a183132

### Constructor Summary

Constructors
Constructor and Description
`ComplexPropertyContainer()` Complex Property type constructor (namespaceURI is given)

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addProperty(AbstractField obj)` Add a property to the current structure
`boolean` `containsProperty(AbstractField property)` Check if a XMPFieldObject is in the complex property
`List<AbstractField>` `getAllProperties()` Return all children associated to this property
`protected AbstractField` `getFirstEquivalentProperty(String localName, Class<? extends AbstractField> type)` Give the first property found in this container with type and localname expected
`List<AbstractField>` `getPropertiesByLocalName(String localName)` Return all properties with this specified localName.
`boolean` `isSameProperty(AbstractField prop1, AbstractField prop2)` Check if two properties are equal.
`void` `removePropertiesByName(String localName)` Remove all properties with a specified LocalName.
`void` `removeProperty(AbstractField property)` Remove a property

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ComplexPropertyContainer

    public ComplexPropertyContainer()

Complex Property type constructor (namespaceURI is given)

### Method Detail

#### getFirstEquivalentProperty

    protected AbstractField getFirstEquivalentProperty(String localName,
                                                       Class<? extends AbstractField> type)

Give the first property found in this container with type and localname expected

Parameters:
  `localName` - the localname of property wanted
  `type` - the property type of property wanted
Returns:
  the property wanted

#### addProperty

    public void addProperty(AbstractField obj)

Add a property to the current structure

Parameters:
  `obj` - the property to add

#### getAllProperties

    public List<AbstractField> getAllProperties()

Return all children associated to this property

Returns:
  All Properties contained in this container, never null.

#### getPropertiesByLocalName

    public List<AbstractField> getPropertiesByLocalName(String localName)

Return all properties with this specified localName.

Parameters:
  `localName` - the local name wanted
Returns:
  All properties with local name which match with localName given, or null if there are none.

#### isSameProperty

    public boolean isSameProperty(AbstractField prop1,
                                  AbstractField prop2)

Check if two properties are equal.

Parameters:
  `prop1` - First property
  `prop2` - Second property
Returns:
  True if these properties are equal.

#### containsProperty

    public boolean containsProperty(AbstractField property)

Check if a XMPFieldObject is in the complex property

Parameters:
  `property` - The property to check
Returns:
  True if property is present in this container

#### removeProperty

    public void removeProperty(AbstractField property)

Remove a property

Parameters:
  `property` - The property to remove

#### removePropertiesByName

    public void removePropertiesByName(String localName)

Remove all properties with a specified LocalName.

Parameters:
  `localName` - The name for which to remove all.