Package org.apache.xmpbox.type
Class AbstractField
- java.lang.Object
-
- org.apache.xmpbox.type.AbstractField
-
- Direct Known Subclasses:
AbstractComplexProperty
,AbstractSimpleProperty
public abstract class AbstractField extends java.lang.Object
Abstract Object representation of a XMP 'field' (-> Properties and specific Schemas)
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,Attribute>
attributes
private XMPMetadata
metadata
private java.lang.String
propertyName
-
Constructor Summary
Constructors Constructor Description AbstractField(XMPMetadata metadata, java.lang.String propertyName)
Constructor of a XMP Field
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
containsAttribute(java.lang.String qualifiedName)
Check if an attribute is declared for this entityjava.util.List<Attribute>
getAllAttributes()
Get attributes list defined for this entityAttribute
getAttribute(java.lang.String qualifiedName)
Get an attribute with its name in this entityXMPMetadata
getMetadata()
abstract java.lang.String
getNamespace()
abstract java.lang.String
getPrefix()
Get the prefix of this entityjava.lang.String
getPropertyName()
Get the propertyName (or localName)void
removeAttribute(java.lang.String qualifiedName)
Remove an attribute of this entityvoid
setAttribute(Attribute value)
Set a new attribute for this entityvoid
setPropertyName(java.lang.String value)
-
-
-
Field Detail
-
metadata
private final XMPMetadata metadata
-
propertyName
private java.lang.String propertyName
-
attributes
private final java.util.Map<java.lang.String,Attribute> attributes
-
-
Constructor Detail
-
AbstractField
public AbstractField(XMPMetadata metadata, java.lang.String propertyName)
Constructor of a XMP Field- Parameters:
metadata
- The metadata to attach to this fieldpropertyName
- the local name to set for this field
-
-
Method Detail
-
getPropertyName
public final java.lang.String getPropertyName()
Get the propertyName (or localName)- Returns:
- the local Name
-
setPropertyName
public final void setPropertyName(java.lang.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(java.lang.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(java.lang.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 java.util.List<Attribute> getAllAttributes()
Get attributes list defined for this entity- Returns:
- Attributes list
-
removeAttribute
public final void removeAttribute(java.lang.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 java.lang.String getNamespace()
-
getPrefix
public abstract java.lang.String getPrefix()
Get the prefix of this entity- Returns:
- the prefix specified
-
-