Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf

public abstract Class PDStandardAttributeObject

extends PDAttributeObject
Class Inheritance
Known Direct Subclasses
org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf.PDTableAttributeObject, org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf.PDLayoutAttributeObject, org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf.PDListAttributeObject, org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf.PDPrintFieldAttributeObject
Imports
org.apache.pdfbox.cos.COSArray, .COSBase, .COSDictionary, .COSFloat, .COSName, .COSNumber, .COSString, org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject, org.apache.pdfbox.pdmodel.graphics.color.PDGamma

A standard attribute object.
Author
Johannes Koch

Field Summary

Modifier and TypeField and Description
protected static final float
UNSPECIFIED

An "unspecified" default float value.

Constructor Summary

AccessConstructor and Description
public
PDStandardAttributeObject()

Default constructor.

public
PDStandardAttributeObject(COSDictionary
the dictionary
dictionary
)

Creates a new standard attribute object with a given dictionary.

Method Summary

Modifier and TypeMethod and Description
protected String[]

Returns:

the array of strings
getArrayOfString
(String
the attribute name
name
)

Gets an array of strings.

protected PDGamma

Returns:

the colour
getColor
(String
the attribute name
name
)

Gets a colour.

protected Object

Returns:

the single (PDGamma) or a (PDFourColours)
getColorOrFourColors
(String
the attribute name
name
)

Gets a single colour or four colours.

protected int

Returns:

the integer
getInteger
(String
the attribute name
name
,
int
the default value
defaultValue
)

Gets an integer.

protected String

Returns:

the name value
getName
(String
the attribute name
name
)

Gets a name value.

protected String

Returns:

the name value
getName
(String
the attribute name
name
,
String
the default value
defaultValue
)

Gets a name value.

protected Object

Returns:

a String or array of Strings
getNameOrArrayOfName
(String
the attribute name
name
,
String
the default value
defaultValue
)

Gets a name value or array of name values.

protected float

Returns:

the number value
getNumber
(String
the attribute name
name
,
float
the default value
defaultValue
)

Gets a number value.

protected float

Returns:

the number value
getNumber
(String
the attribute name
name
)

Gets a number value.

protected Object

Returns:

a Float or an array of floats
getNumberOrArrayOfNumber
(String
the attribute name
name
,
float
the default value
defaultValue
)

Gets a number or an array of numbers.

protected Object

Returns:

a Float or a String
getNumberOrName
(String
the attribute name
name
,
String
the default name
defaultValue
)

Gets a number or a name value.

protected String

Returns:

the string attribute value
getString
(String
the attribute name
name
)

Gets a string attribute value.

public boolean

Returns:

true if the attribute is specified, false otherwise
isSpecified
(String
the attribute name
name
)

Is the attribute with the given name specified in this attribute object?

protected void
setArrayOfName(String
the attribute name
name
,
String[]
the array of name values
values
)

Sets an array of name values.

protected void
setArrayOfNumber(String
the attribute name
name
,
float[]
the float numbers
values
)

Sets an array of float numbers.

protected void
setArrayOfString(String
the attribute name
name
,
String[]
the array of strings
values
)

Sets an array of strings.

protected void
setColor(String
the attribute name
name
,
PDGamma
the colour
value
)

Sets a colour.

protected void
setFourColors(String
the attribute name
name
,
PDFourColours
the four colours
value
)

Sets four colours.

protected void
setInteger(String
the attribute name
name
,
int
the integer
value
)

Sets an integer.

protected void
setName(String
the attribute name
name
,
String
the name value
value
)

Sets a name value.

protected void
setNumber(String
the attribute name
name
,
float
the float number
value
)

Sets a float number.

protected void
setNumber(String
the attribute name
name
,
int
the integer number
value
)

Sets an integer number.

protected void
setString(String
the attribute name
name
,
String
the string attribute value
value
)

Sets a string attribute value.

Inherited from org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject:
arrayToStringarrayToStringcreategetOwnerisEmptynotifyChangedpotentiallyNotifyChangedsetOwnersetStructureElementtoString

Field Detail

UNSPECIFIEDback to summary
protected static final float UNSPECIFIED

An "unspecified" default float value.

Constructor Detail

PDStandardAttributeObjectback to summary
public PDStandardAttributeObject()

Default constructor.

PDStandardAttributeObjectback to summary
public PDStandardAttributeObject(COSDictionary dictionary)

Creates a new standard attribute object with a given dictionary.

Parameters
dictionary:COSDictionary

the dictionary

Method Detail

getArrayOfStringback to summary
protected String[] getArrayOfString(String name)

Gets an array of strings.

Parameters
name:String

the attribute name

Returns:String[]

the array of strings

getColorback to summary
protected PDGamma getColor(String name)

Gets a colour.

Parameters
name:String

the attribute name

Returns:PDGamma

the colour

getColorOrFourColorsback to summary
protected Object getColorOrFourColors(String name)

Gets a single colour or four colours.

Parameters
name:String

the attribute name

Returns:Object

the single (PDGamma) or a (PDFourColours)

getIntegerback to summary
protected int getInteger(String name, int defaultValue)

Gets an integer.

Parameters
name:String

the attribute name

defaultValue:int

the default value

Returns:int

the integer

getNameback to summary
protected String getName(String name)

Gets a name value.

Parameters
name:String

the attribute name

Returns:String

the name value

getNameback to summary
protected String getName(String name, String defaultValue)

Gets a name value.

Parameters
name:String

the attribute name

defaultValue:String

the default value

Returns:String

the name value

getNameOrArrayOfNameback to summary
protected Object getNameOrArrayOfName(String name, String defaultValue)

Gets a name value or array of name values.

Parameters
name:String

the attribute name

defaultValue:String

the default value

Returns:Object

a String or array of Strings

getNumberback to summary
protected float getNumber(String name, float defaultValue)

Gets a number value.

Parameters
name:String

the attribute name

defaultValue:float

the default value

Returns:float

the number value

getNumberback to summary
protected float getNumber(String name)

Gets a number value.

Parameters
name:String

the attribute name

Returns:float

the number value

getNumberOrArrayOfNumberback to summary
protected Object getNumberOrArrayOfNumber(String name, float defaultValue)

Gets a number or an array of numbers.

Parameters
name:String

the attribute name

defaultValue:float

the default value

Returns:Object

a Float or an array of floats

getNumberOrNameback to summary
protected Object getNumberOrName(String name, String defaultValue)

Gets a number or a name value.

Parameters
name:String

the attribute name

defaultValue:String

the default name

Returns:Object

a Float or a String

getStringback to summary
protected String getString(String name)

Gets a string attribute value.

Parameters
name:String

the attribute name

Returns:String

the string attribute value

isSpecifiedback to summary
public boolean isSpecified(String name)

Is the attribute with the given name specified in this attribute object?

Parameters
name:String

the attribute name

Returns:boolean

true if the attribute is specified, false otherwise

setArrayOfNameback to summary
protected void setArrayOfName(String name, String[] values)

Sets an array of name values.

Parameters
name:String

the attribute name

values:String[]

the array of name values

setArrayOfNumberback to summary
protected void setArrayOfNumber(String name, float[] values)

Sets an array of float numbers.

Parameters
name:String

the attribute name

values:float[]

the float numbers

setArrayOfStringback to summary
protected void setArrayOfString(String name, String[] values)

Sets an array of strings.

Parameters
name:String

the attribute name

values:String[]

the array of strings

setColorback to summary
protected void setColor(String name, PDGamma value)

Sets a colour.

Parameters
name:String

the attribute name

value:PDGamma

the colour

setFourColorsback to summary
protected void setFourColors(String name, PDFourColours value)

Sets four colours.

Parameters
name:String

the attribute name

value:PDFourColours

the four colours

setIntegerback to summary
protected void setInteger(String name, int value)

Sets an integer.

Parameters
name:String

the attribute name

value:int

the integer

setNameback to summary
protected void setName(String name, String value)

Sets a name value.

Parameters
name:String

the attribute name

value:String

the name value

setNumberback to summary
protected void setNumber(String name, float value)

Sets a float number.

Parameters
name:String

the attribute name

value:float

the float number

setNumberback to summary
protected void setNumber(String name, int value)

Sets an integer number.

Parameters
name:String

the attribute name

value:int

the integer number

setStringback to summary
protected void setString(String name, String value)

Sets a string attribute value.

Parameters
name:String

the attribute name

value:String

the string attribute value