Class PdfObjectTree

java.lang.Object
eu.europa.esig.dss.pdf.modifications.PdfObjectTree

public class PdfObjectTree extends Object
Represents a PDF object chain from a root to the current object
  • Constructor Details

    • PdfObjectTree

      public PdfObjectTree()
      Constructor without starting key
    • PdfObjectTree

      public PdfObjectTree(String key)
      Default constructor
      Parameters:
      key - String root key
  • Method Details

    • copy

      public PdfObjectTree copy()
      Creates a copy of the object (changes within a copy will not affect the original object)
      Returns:
      PdfObjectTree copy
    • addKey

      public void addKey(String key)
      Adds a key
      Parameters:
      key - String
    • addReference

      public void addReference(Number objectNumber)
      Adds a numeric reference number
      Parameters:
      objectNumber - Number
    • setStream

      public void setStream()
      This method allows to specify that a stream have been processed
    • getKeyChain

      public List<String> getKeyChain()
      Gets a complete key chain
      Returns:
      a list of Strings
    • getChainDeepness

      public int getChainDeepness()
      Returns the deepness of the current objects chain
      Returns:
      chain deepness
    • getLastKey

      public String getLastKey()
      Returns a last key
      Returns:
      String
    • isProcessedReference

      public boolean isProcessedReference(Number objectNumber)
      Checks whether a reference to the given object by number has been already processed in this tree
      Parameters:
      objectNumber - Number reference number to an object
      Returns:
      TRUE if the reference has been already processed, FALSE otherwise
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object