2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 package org.apache.pdfbox.pdmodel.interactive.annotation;
19 import org.apache.pdfbox.cos.COSBase;
20 import org.apache.pdfbox.cos.COSDictionary;
21 import org.apache.pdfbox.cos.COSName;
22 import org.apache.pdfbox.pdmodel.common.COSObjectable;
25 * This class represents an external data dictionary.
27 * @version $Revision: 1.0 $
30 public class PDExternalDataDictionary implements COSObjectable
33 private COSDictionary dataDictionary;
38 public PDExternalDataDictionary()
40 this.dataDictionary = new COSDictionary();
41 this.dataDictionary.setName(COSName.TYPE, "ExData");
47 * @param dictionary Dictionary
49 public PDExternalDataDictionary(COSDictionary dictionary)
51 this.dataDictionary = dictionary;
57 public COSBase getCOSObject()
59 return this.dataDictionary;
63 * returns the dictionary.
65 * @return the dictionary
67 public COSDictionary getDictionary()
69 return this.dataDictionary;
73 * returns the type of the external data dictionary.
74 * It must be "ExData", if present
75 * @return the type of the external data dictionary
77 public String getType()
79 return this.getDictionary().getNameAsString(COSName.TYPE, "ExData");
83 * returns the subtype of the external data dictionary.
84 * @return the subtype of the external data dictionary
86 public String getSubtype()
88 return this.getDictionary().getNameAsString(COSName.SUBTYPE);
92 * This will set the subtype of the external data dictionary.
93 * @param subtype the subtype of the external data dictionary
95 public void setSubtype(String subtype)
97 this.getDictionary().setName(COSName.SUBTYPE, subtype);