org.apache.xmpbox.type

## Class AbstractField

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

Direct Known Subclasses:
  AbstractComplexProperty, AbstractSimpleProperty

    public abstract class AbstractField
    extends Object

Abstract Object representation of a XMP 'field' (-> Properties and specific Schemas)

Author:
  a183132

### Constructor Summary

Constructors
Constructor and Description
`AbstractField(XMPMetadata metadata, String propertyName)` Constructor of a XMP Field

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`boolean` `containsAttribute(String qualifiedName)` Check if an attribute is declared for this entity
`List<Attribute>` `getAllAttributes()` Get attributes list defined for this entity
`Attribute` `getAttribute(String qualifiedName)` Get an attribute with its name in this entity
`XMPMetadata` `getMetadata()`
`abstract String` `getNamespace()`
`abstract String` `getPrefix()` Get the prefix of this entity
`String` `getPropertyName()` Get the propertyName (or localName)
`void` `removeAttribute(String qualifiedName)` Remove an attribute of this entity
`void` `setAttribute(Attribute value)` Set a new attribute for this entity
`void` `setPropertyName(String value)`

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

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

### Constructor Detail

#### AbstractField

    public AbstractField(XMPMetadata metadata,
                         String propertyName)

Constructor of a XMP Field

Parameters:
  `metadata` - The metadata to attach to this field
  `propertyName` - the local name to set for this field

### Method Detail

#### getPropertyName

    public final String getPropertyName()

Get the propertyName (or localName)

Returns:
  the local Name

#### setPropertyName

    public final void setPropertyName(String value)

#### setAttribute

    public final void setAttribute(Attribute value)

Set a new attribute for this entity

Parameters:
  `value` - The Attribute property to add

#### containsAttribute

    public final boolean containsAttribute(String qualifiedName)

Check if an attribute is declared for this entity

Parameters:
  `qualifiedName` - the full qualified name of the attribute concerned
Returns:
  true if attribute is present

#### getAttribute

    public final Attribute getAttribute(String qualifiedName)

Get an attribute with its name in this entity

Parameters:
  `qualifiedName` - the full qualified name of the attribute wanted
Returns:
  The attribute property

#### getAllAttributes

    public final List<Attribute> getAllAttributes()

Get attributes list defined for this entity

Returns:
  Attributes list

#### removeAttribute

    public final void removeAttribute(String qualifiedName)

Remove an attribute of this entity

Parameters:
  `qualifiedName` - the full qualified name of the attribute wanted

#### getMetadata

    public final XMPMetadata getMetadata()

#### getNamespace

    public abstract String getNamespace()

#### getPrefix

    public abstract String getPrefix()

Get the prefix of this entity

Returns:
  the prefix specified