org.icepdf.core.pobjects
Class OptionalContentMembership

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.OptionalContentMembership
All Implemented Interfaces:
OptionalContents

public class OptionalContentMembership
extends Dictionary
implements OptionalContents

As mentioned above, content may belong to a single optional content group and shall be visible when the group is ON and invisible when it is OFF. To express more complex visibility policies, content shall not declare itself to belong directly to an optional content group but rather to an optional content membership dictionary.

Note: currently no support for the visibility expression (VE) array.

Since:
5.0

Nested Class Summary
static class OptionalContentMembership.VisibilityPolicy
           
 
Field Summary
static Name ALL_OFF_KEY
           
static Name ALL_ON_KEY
           
static Name ANY_OFF_KEY
           
static Name ANY_ON_KEY
           
static Name OCGs_KEY
           
static Name P_KEY
           
static Name TYPE
           
static Name VE_KEY
           
 
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
OptionalContentMembership(Library library, java.util.HashMap entries)
           
 
Method Summary
 java.util.List<OptionalContentGroup> getOcgs()
           
 OptionalContentMembership.VisibilityPolicy getPolicy()
           
 void init()
          Initiate the Dictionary.
 boolean isOCG()
           
 boolean isVisible()
           
 
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

TYPE

public static final Name TYPE

OCGs_KEY

public static final Name OCGs_KEY

P_KEY

public static final Name P_KEY

VE_KEY

public static final Name VE_KEY

ALL_ON_KEY

public static final Name ALL_ON_KEY

ALL_OFF_KEY

public static final Name ALL_OFF_KEY

ANY_ON_KEY

public static final Name ANY_ON_KEY

ANY_OFF_KEY

public static final Name ANY_OFF_KEY
Constructor Detail

OptionalContentMembership

public OptionalContentMembership(Library library,
                                 java.util.HashMap entries)
Method Detail

init

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

Specified by:
init in interface OptionalContents
Overrides:
init in class Dictionary

isOCG

public boolean isOCG()
Specified by:
isOCG in interface OptionalContents

getPolicy

public OptionalContentMembership.VisibilityPolicy getPolicy()

getOcgs

public java.util.List<OptionalContentGroup> getOcgs()

isVisible

public boolean isVisible()
Specified by:
isVisible in interface OptionalContents