org.apache.pdfbox.pdmodel.graphics.optionalcontent

## Class PDOptionalContentMembershipDictionary

- java.lang.Object
- - org.apache.pdfbox.pdmodel.documentinterchange.markedcontent.PDPropertyList
  - - org.apache.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentMembershipDictionary

All Implemented Interfaces:
  COSObjectable

    public class PDOptionalContentMembershipDictionary
    extends PDPropertyList

An optional content membership dictionary (OCMD).

Author:
  Tilman Hausherr

### Field Summary

### Fields inherited from class org.apache.pdfbox.pdmodel.documentinterchange.markedcontent.PDPropertyList

`dict`

### Constructor Summary

Constructors
Constructor and Description
`PDOptionalContentMembershipDictionary()` Creates a new optional content membership dictionary (OCMD).
`PDOptionalContentMembershipDictionary(COSDictionary dict)` Creates a new instance based on a given `COSDictionary`.

### Method Summary

All Methods Instance Methods Concrete Methods
`List<PDPropertyList>` `getOCGs()` Get a list of optional content groups.
`COSName` `getVisibilityPolicy()` Get the visibility policy name.
`void` `setOCGs(List<PDPropertyList> ocgs)` Set optional content groups as a list.
`void` `setVisibilityPolicy(COSName visibilityPolicy)` Sets the visibility policy name.

### Methods inherited from class org.apache.pdfbox.pdmodel.documentinterchange.markedcontent.PDPropertyList

`create, getCOSObject`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PDOptionalContentMembershipDictionary

    public PDOptionalContentMembershipDictionary()

Creates a new optional content membership dictionary (OCMD).

#### PDOptionalContentMembershipDictionary

    public PDOptionalContentMembershipDictionary(COSDictionary dict)

Creates a new instance based on a given `COSDictionary`.

Parameters:
  `dict` - the dictionary

### Method Detail

#### getOCGs

    public List<PDPropertyList> getOCGs()

Get a list of optional content groups.

Returns:
  List of optional content groups, never null.

#### setOCGs

    public void setOCGs(List<PDPropertyList> ocgs)

Set optional content groups as a list.

Parameters:
  `ocgs` - list of optional content groups to set.

#### getVisibilityPolicy

    public COSName getVisibilityPolicy()

Get the visibility policy name. Valid names are AllOff, AllOn, AnyOff, AnyOn (default).

Returns:
  the visibility policy, never null.

#### setVisibilityPolicy

    public void setVisibilityPolicy(COSName visibilityPolicy)

Sets the visibility policy name. Valid names are AllOff, AllOn, AnyOff, AnyOn (default).

Parameters:
  `visibilityPolicy` -