org.icepdf.core.pobjects
Class OptionalContent

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.OptionalContent

public class OptionalContent
extends Dictionary

The optional OCProperties entry in the document catalog (see 7.7.2, "Document Catalog") shall contain, when present, the optional content properties dictionary, which contains a list of all the optional content groups in the document, as well as information about the default and alternate configurations for optional content. This dictionary shall be present if the file contains any optional content; if it is missing, a conforming reader shall ignore any optional content structures in the document.

Since:
5.0

Field Summary
static Name AS_KEY
           
static Name BASE_STATE_KEY
           
static Name D_KEY
           
static Name DESIGN_VALUE
           
static Name INTENT_KEY
           
static Name LIST_MODE_KEY
           
static Name LOCKED_KEY
           
static Name NONE_OC_FLAG
           
static Name OC_KEY
           
static Name OCGs_KEY
           
static Name OFF_VALUE
           
static Name ON_vALUE
           
static Name ORDER_KEY
           
static Name RBGROUPS_KEY
           
static Name UNCHANGED_KEY
           
static Name VIEW_VALUE
           
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
OptionalContent(Library l, java.util.HashMap h)
           
 
Method Summary
 int getGroupsSize()
           
 java.util.List<Name> getIntent()
           
 OptionalContentGroup getOCGs(Reference reference)
           
 java.util.List<java.lang.Object> getOrder()
           
 java.util.List<java.lang.Object> getRbGroups()
           
 void init()
          Initiate the Dictionary.
 boolean isVisible(java.lang.Object object)
          Test if an xForm object image or content is visible.
 boolean isVisible(OptionalContentGroup ocg)
           
 boolean isVisible(OptionalContentMembership ocmd)
           
 boolean isVisible(Reference ocgRef)
           
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OCGs_KEY

public static final Name OCGs_KEY

OC_KEY

public static final Name OC_KEY

D_KEY

public static final Name D_KEY

BASE_STATE_KEY

public static final Name BASE_STATE_KEY

INTENT_KEY

public static final Name INTENT_KEY

AS_KEY

public static final Name AS_KEY

ORDER_KEY

public static final Name ORDER_KEY

LIST_MODE_KEY

public static final Name LIST_MODE_KEY

RBGROUPS_KEY

public static final Name RBGROUPS_KEY

LOCKED_KEY

public static final Name LOCKED_KEY

OFF_VALUE

public static final Name OFF_VALUE

ON_vALUE

public static final Name ON_vALUE

UNCHANGED_KEY

public static final Name UNCHANGED_KEY

VIEW_VALUE

public static final Name VIEW_VALUE

DESIGN_VALUE

public static final Name DESIGN_VALUE

NONE_OC_FLAG

public static final Name NONE_OC_FLAG
Constructor Detail

OptionalContent

public OptionalContent(Library l,
                       java.util.HashMap h)
Method Detail

init

public void init()
Description copied from class: Dictionary
Initiate the Dictionary. Retrieve any needed attributes.

Overrides:
init in class Dictionary

isVisible

public boolean isVisible(Reference ocgRef)

isVisible

public boolean isVisible(OptionalContentGroup ocg)

isVisible

public boolean isVisible(OptionalContentMembership ocmd)

isVisible

public boolean isVisible(java.lang.Object object)
Test if an xForm object image or content is visible.

Parameters:
object - content to check visibility.
Returns:
optional content groups currently visibility state, returns true if no state can be found, better to show then to hide by default.

getOrder

public java.util.List<java.lang.Object> getOrder()

getIntent

public java.util.List<Name> getIntent()

getGroupsSize

public int getGroupsSize()

getRbGroups

public java.util.List<java.lang.Object> getRbGroups()

getOCGs

public OptionalContentGroup getOCGs(Reference reference)