org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure
Class PDDefaultAttributeObject

java.lang.Object
  extended by org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper
      extended by org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
          extended by org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDDefaultAttributeObject
All Implemented Interfaces:
COSObjectable

public class PDDefaultAttributeObject
extends PDAttributeObject

A default attribute object.

Version:
$Revision: $
Author:
Johannes Koch

Constructor Summary
PDDefaultAttributeObject()
          Default constructor.
PDDefaultAttributeObject(COSDictionary dictionary)
          Creates a default attribute object with a given dictionary.
 
Method Summary
 List<String> getAttributeNames()
          Gets the attribute names.
 COSBase getAttributeValue(String attrName)
          Gets the attribute value for a given name.
protected  COSBase getAttributeValue(String attrName, COSBase defaultValue)
          Gets the attribute value for a given name.
 void setAttribute(String attrName, COSBase attrValue)
          Sets an attribute.
 String toString()
           
 
Methods inherited from class org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
arrayToString, arrayToString, create, getOwner, isEmpty, notifyChanged, potentiallyNotifyChanged, setOwner, setStructureElement
 
Methods inherited from class org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper
equals, getCOSDictionary, getCOSObject, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PDDefaultAttributeObject

public PDDefaultAttributeObject()
Default constructor.


PDDefaultAttributeObject

public PDDefaultAttributeObject(COSDictionary dictionary)
Creates a default attribute object with a given dictionary.

Parameters:
dictionary - the dictionary
Method Detail

getAttributeNames

public List<String> getAttributeNames()
Gets the attribute names.

Returns:
the attribute names

getAttributeValue

public COSBase getAttributeValue(String attrName)
Gets the attribute value for a given name.

Parameters:
attrName - the given attribute name
Returns:
the attribute value for a given name

getAttributeValue

protected COSBase getAttributeValue(String attrName,
                                    COSBase defaultValue)
Gets the attribute value for a given name.

Parameters:
attrName - the given attribute name
defaultValue - the default value
Returns:
the attribute value for a given name

setAttribute

public void setAttribute(String attrName,
                         COSBase attrValue)
Sets an attribute.

Parameters:
attrName - the attribute name
attrValue - the attribute value

toString

public String toString()
Overrides:
toString in class PDAttributeObject