Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.harvard.hul.ois.jhove.module.pdf
Class StructureTree

    java.lang.Object
      edu.harvard.hul.ois.jhove.module.pdf.StructureTree

    public class StructureTree

extends java.lang.Object

Class for PDF document structure tree. See section 9.6, "Logical Structure," of PDF Reference, Version 1.4, for an explanation of the document structure.

See Also:
  `StructureElement`

Field Summary
`protected java.util.logging.Logger` | `_logger` Logger for this class.

Constructor Summary
`StructureTree(PdfModule module, java.io.RandomAccessFile raf, Parser parser)` Constructor.
`StructureTree(PdfModule module, java.io.RandomAccessFile raf, Parser parser, boolean tranzhent)` Constructor with transient flag.

Method Summary
`java.lang.String` | `dereferenceStructType(java.lang.String st)` Dereference a name in the role map.
`PdfModule` | `getModule()` Returns the module associated with this object.
`boolean` | `isPresent()` Returns `true` if and only if the document structure exists.
`protected boolean` | `isTransient()`
`boolean` | `isValid()` Returns `true` if and only if no errors were detected.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _logger

    protected java.util.logging.Logger _logger

  Logger for this class.

Constructor Detail

### StructureTree

    public StructureTree(PdfModule module,
                         java.io.RandomAccessFile raf,
                         Parser parser)
                  throws PdfException

  Constructor. If there is a document structure tree, this fills in the appropriate information. If there isn't, it does nothing. Call isPresent() to determine whether there is a document structure tree. A PdfInvalidException may be thrown if there is a structure tree but it is invalid.

  Parameters:
    `module` - The PdfModule under which we're operating
    `raf` - The document file object
    `parser` - The Parser being used
  Throws:
    `PdfException`

### StructureTree

    public StructureTree(PdfModule module,
                         java.io.RandomAccessFile raf,
                         Parser parser,
                         boolean tranzhent)
                  throws PdfException

  Constructor with transient flag. Calling this can save a lot of memory if the tree is being validated as it's built (which happens to be the only case, but I don't want to throw out the more general code).

  Throws:
    `PdfException`

Method Detail

### isPresent

    public boolean isPresent()

  Returns `true` if and only if the document structure exists.

### isValid

    public boolean isValid()

  Returns `true` if and only if no errors were detected.

### getModule

    public PdfModule getModule()

  Returns the module associated with this object.

### isTransient

    protected boolean isTransient()

### dereferenceStructType

    public java.lang.String dereferenceStructType(java.lang.String st)

  Dereference a name in the role map. If there is no role map, or if the parameter is not mapped by the role map, the original parameter will be returned. The string will be looked up through multiple levels in the role map. The maximum number of levels is limited to 50, in case of circular mappings. The value returned will be null if the role map contains invalid data or the limit of 50 lookups is reached.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD