Manifest.java 1.58 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.xfa;

import com.adobe.xfa.*;

public class Manifest
extends ProtoableNode {
    public Manifest(Element parent, Node prevSibling) {
        super(parent, prevSibling, null, "manifest", "manifest", null, XFA.MANIFESTTAG, "manifest");
    }

    public NodeList doEvaluate() {
        ArrayNodeList ret = new ArrayNodeList();
        Node child = this.getFirstXFAChild();
        int i = 0;
        while (child != null) {
            NodeList items = this.getItems(i);
            int nItems = items.length();
            for (int j = 0; j < nItems; ++j) {
                Node oItem = (Node)items.item(j);
                assert (oItem instanceof Element);
                if (!(oItem instanceof Element)) continue;
                Element oElement = (Element)oItem;
                ret.append(oElement);
            }
            child = child.getNextXFASibling();
            ++i;
        }
        return ret;
    }

    NodeList getItems(int nIndex) {
        Node oChild = this.getXFAChild(nIndex);
        if (oChild.getClassTag() != XFA.REFTAG) {
            return new ArrayNodeList();
        }
        TextNode oRef = (TextNode)oChild.getProperty(XFA.TEXTNODETAG, 0);
        String sRef = oRef.getValue();
        return this.getXFAParent().resolveNodes(sRef, true, false, false);
    }

    @Override
    public ScriptTable getScriptTable() {
        return ManifestScript.getScriptTable();
    }

    public boolean doExecValidate() {
        return false;
    }

    public void doExecCalculate() {
    }

    public void doExecInitialize() {
    }
}