Class PDDefaultAttributeObject
java.lang.Object
org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper
org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDDefaultAttributeObject
- All Implemented Interfaces:
COSObjectable
A default attribute object.
- Version:
- $Revision: $
- Author:
- Johannes Koch
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PDDefaultAttributeObject
(COSDictionary dictionary) Creates a default attribute object with a given dictionary. -
Method Summary
Modifier and TypeMethodDescriptionGets the attribute names.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.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
-
Constructor Details
-
PDDefaultAttributeObject
public PDDefaultAttributeObject()Default constructor. -
PDDefaultAttributeObject
Creates a default attribute object with a given dictionary.- Parameters:
dictionary
- the dictionary
-
-
Method Details
-
getAttributeNames
Gets the attribute names.- Returns:
- the attribute names
-
getAttributeValue
Gets the attribute value for a given name.- Parameters:
attrName
- the given attribute name- Returns:
- the attribute value for a given name
-
getAttributeValue
Gets the attribute value for a given name.- Parameters:
attrName
- the given attribute namedefaultValue
- the default value- Returns:
- the attribute value for a given name
-
setAttribute
Sets an attribute.- Parameters:
attrName
- the attribute nameattrValue
- the attribute value
-
toString
- Overrides:
toString
in classPDAttributeObject
-