Module org.sejda.sambox
Class PDStructureElement
java.lang.Object
org.sejda.sambox.pdmodel.documentinterchange.logicalstructure.PDStructureNode
org.sejda.sambox.pdmodel.documentinterchange.logicalstructure.PDStructureElement
- All Implemented Interfaces:
COSObjectable
A structure element.
- Author:
- Ben Litchfield, Johannes Koch
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPDStructureElement(String structureType, PDStructureNode parent) Constructor with required values.Constructor for an existing structure element. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(PDAttributeObject attributeObject) Adds an attribute object.voidaddClassName(String className) Adds a class name.voidappendKid(PDMarkedContentReference markedContentReference) Appends a marked-content reference kid.voidappendKid(PDObjectReference objectReference) Appends an object reference kid.voidappendKid(PDMarkedContent markedContent) Appends a marked-content sequence kid.voidattributeChanged(PDAttributeObject attributeObject) Updates the revision number for the given attribute object.Returns the actual text (ActualText).Returns the alternate description (Alt).Returns the attributes together with their revision numbers (A).Returns the class names together with their revision numbers (C).Returns the element identifier (ID).Returns the expanded form (E).Returns the language (Lang).getPage()Returns the page on which some or all of the content items designated by the K entry shall be rendered (Pg).Returns the parent in the structure hierarchy (P).intReturns the revision number (R).Returns the standard structure type, the actual structure type is mapped to in the role map.Returns the structure type (S).getTitle()Returns the title (T).voidIncrements th revision number.voidinsertBefore(COSInteger markedContentIdentifier, Object refKid) Inserts a marked-content identifier kid before a reference kid.voidinsertBefore(PDMarkedContentReference markedContentReference, Object refKid) Inserts a marked-content reference kid before a reference kid.voidinsertBefore(PDObjectReference objectReference, Object refKid) Inserts an object reference kid before a reference kid.voidremoveAttribute(PDAttributeObject attributeObject) Removes an attribute object.voidremoveClassName(String className) Removes a class name.voidremoveKid(COSInteger markedContentIdentifier) Removes a marked-content identifier kid.voidremoveKid(PDMarkedContentReference markedContentReference) Removes a marked-content reference kid.voidremoveKid(PDObjectReference objectReference) Removes an object reference kid.voidsetActualText(String actualText) Sets the actual text (ActualText).voidsetAlternateDescription(String alternateDescription) Sets the alternate description (Alt).voidsetAttributes(Revisions<PDAttributeObject> attributes) Sets the attributes together with their revision numbers (A).voidsetClassNames(Revisions<String> classNames) Sets the class names together with their revision numbers (C).voidSets the element identifier (ID).voidsetExpandedForm(String expandedForm) Sets the expanded form (E).voidsetLanguage(String language) Sets the language (Lang).voidSets the page on which some or all of the content items designated by the K entry shall be rendered (Pg).final voidsetParent(PDStructureNode structureNode) Sets the parent in the structure hierarchy (P).voidsetRevisionNumber(int revisionNumber) Sets the revision number (R).final voidsetStructureType(String structureType) Sets the structure type (S).voidSets the title (T).Methods inherited from class org.sejda.sambox.pdmodel.documentinterchange.logicalstructure.PDStructureNode
appendKid, appendKid, appendObjectableKid, create, createObject, getCOSObject, getKids, getType, insertBefore, insertBefore, insertObjectableBefore, removeKid, removeKid, removeObjectableKid, setKids
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
PDStructureElement
Constructor with required values.- Parameters:
structureType- the structure typeparent- the parent structure node
-
PDStructureElement
Constructor for an existing structure element.- Parameters:
dic- The existing dictionary.
-
-
Method Details
-
getStructureType
Returns the structure type (S).- Returns:
- the structure type
-
setStructureType
Sets the structure type (S).- Parameters:
structureType- the structure type
-
getParent
Returns the parent in the structure hierarchy (P).- Returns:
- the parent in the structure hierarchy
-
setParent
Sets the parent in the structure hierarchy (P).- Parameters:
structureNode- the parent in the structure hierarchy
-
getElementIdentifier
Returns the element identifier (ID).- Returns:
- the element identifier
-
setElementIdentifier
Sets the element identifier (ID).- Parameters:
id- the element identifier
-
getPage
Returns the page on which some or all of the content items designated by the K entry shall be rendered (Pg).- Returns:
- the page on which some or all of the content items designated by the K entry shall be rendered
-
setPage
Sets the page on which some or all of the content items designated by the K entry shall be rendered (Pg).- Parameters:
page- the page on which some or all of the content items designated by the K entry shall be rendered.
-
getAttributes
Returns the attributes together with their revision numbers (A).- Returns:
- the attributes
-
setAttributes
Sets the attributes together with their revision numbers (A).- Parameters:
attributes- the attributes
-
addAttribute
Adds an attribute object.- Parameters:
attributeObject- the attribute object
-
removeAttribute
Removes an attribute object.- Parameters:
attributeObject- the attribute object
-
attributeChanged
Updates the revision number for the given attribute object.- Parameters:
attributeObject- the attribute object
-
getClassNames
Returns the class names together with their revision numbers (C).- Returns:
- the class names
-
setClassNames
Sets the class names together with their revision numbers (C).- Parameters:
classNames- the class names
-
addClassName
Adds a class name.- Parameters:
className- the class name
-
removeClassName
Removes a class name.- Parameters:
className- the class name
-
getRevisionNumber
public int getRevisionNumber()Returns the revision number (R).- Returns:
- the revision number
-
setRevisionNumber
public void setRevisionNumber(int revisionNumber) Sets the revision number (R).- Parameters:
revisionNumber- the revision number
-
incrementRevisionNumber
public void incrementRevisionNumber()Increments th revision number. -
getTitle
Returns the title (T).- Returns:
- the title
-
setTitle
Sets the title (T).- Parameters:
title- the title
-
getLanguage
Returns the language (Lang).- Returns:
- the language
-
setLanguage
Sets the language (Lang).- Parameters:
language- the language
-
getAlternateDescription
Returns the alternate description (Alt).- Returns:
- the alternate description
-
setAlternateDescription
Sets the alternate description (Alt).- Parameters:
alternateDescription- the alternate description
-
getExpandedForm
Returns the expanded form (E).- Returns:
- the expanded form
-
setExpandedForm
Sets the expanded form (E).- Parameters:
expandedForm- the expanded form
-
getActualText
Returns the actual text (ActualText).- Returns:
- the actual text
-
setActualText
Sets the actual text (ActualText).- Parameters:
actualText- the actual text
-
getStandardStructureType
Returns the standard structure type, the actual structure type is mapped to in the role map.- Returns:
- the standard structure type
-
appendKid
Appends a marked-content sequence kid.- Parameters:
markedContent- the marked-content sequence
-
appendKid
Appends a marked-content reference kid.- Parameters:
markedContentReference- the marked-content reference
-
appendKid
Appends an object reference kid.- Parameters:
objectReference- the object reference
-
insertBefore
Inserts a marked-content identifier kid before a reference kid.- Parameters:
markedContentIdentifier- the marked-content identifierrefKid- the reference kid
-
insertBefore
Inserts a marked-content reference kid before a reference kid.- Parameters:
markedContentReference- the marked-content referencerefKid- the reference kid
-
insertBefore
Inserts an object reference kid before a reference kid.- Parameters:
objectReference- the object referencerefKid- the reference kid
-
removeKid
Removes a marked-content identifier kid.- Parameters:
markedContentIdentifier- the marked-content identifier
-
removeKid
Removes a marked-content reference kid.- Parameters:
markedContentReference- the marked-content reference
-
removeKid
Removes an object reference kid.- Parameters:
objectReference- the object reference
-