All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.verapdf.pd.PDNamesDictionary Maven / Gradle / Ivy

There is a newer version: 1.26.1
Show newest version
package org.verapdf.pd;

import org.verapdf.as.ASAtom;
import org.verapdf.cos.COSObjType;
import org.verapdf.cos.COSObject;

/**
 * @author Maksim Bezrukov
 */
public class PDNamesDictionary extends PDObject {

	public PDNamesDictionary(COSObject obj) {
		super(obj);
	}

	public PDNameTreeNode getEmbeddedFiles() {
		return getNameTreeByName(ASAtom.EMBEDDED_FILES);
	}

	public PDNameTreeNode getJavaScript() {
		return getNameTreeByName(ASAtom.JAVA_SCRIPT);
	}

	private PDNameTreeNode getNameTreeByName(ASAtom name) {
		COSObject base = getKey(name);
		if (base != null && base.getType() == COSObjType.COS_DICT) {
			return PDNameTreeNode.create(base);
		}
		return null;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy