FormSchema.java
2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.form;
import com.adobe.xfa.Attribute;
import com.adobe.xfa.ChildReln;
import com.adobe.xfa.Element;
import com.adobe.xfa.Node;
import com.adobe.xfa.StringAttr;
import com.adobe.xfa.XFA;
import com.adobe.xfa.form.FormExclGroup;
import com.adobe.xfa.form.FormField;
import com.adobe.xfa.form.FormInstanceManager;
import com.adobe.xfa.form.FormManifest;
import com.adobe.xfa.form.FormSubform;
import com.adobe.xfa.form.FormSubformSet;
import com.adobe.xfa.template.TemplateSchema;
public class FormSchema
extends TemplateSchema {
public FormSchema() {
this.initSchema();
}
@Override
protected void initSchema() {
super.initSchema();
this.putElement(XFA.FORMTAG, XFA.SUBFORMTAG, ChildReln.getZeroOrMore(), 0, 63, 0);
this.putElement(XFA.FORMTAG, XFA.PROTOTAG, ChildReln.getZeroOrMore(), 0, 63, 0);
this.putElement(XFA.FORMTAG, XFA.DESCTAG, ChildReln.getZeroOrOne(), 0, 63, 0);
this.putElement(XFA.FORMTAG, XFA.EXTRASTAG, ChildReln.getZeroOrOne(), 0, 63, 0);
this.putElement(XFA.FORMTAG, XFA.DSIGDATATAG, ChildReln.getZeroOrMore(), 0, 63, 0);
this.putAttribute(XFA.FORMTAG, XFA.CHECKSUMTAG, null, 0, 63, 0);
this.putElement(XFA.SUBFORMTAG, XFA.INSTANCEMANAGERTAG, ChildReln.getZeroOrMore(), 0, 63, 0);
this.putElement(XFA.SUBFORMSETTAG, XFA.INSTANCEMANAGERTAG, ChildReln.getZeroOrMore(), 0, 63, 0);
this.putElement(XFA.PAGEAREATAG, XFA.INSTANCEMANAGERTAG, ChildReln.getZeroOrMore(), 0, 63, 0);
this.putElement(XFA.SUBFORMTAG, XFA.PAGESETTAG, ChildReln.getZeroOrMore(), 0, 63, 0);
this.putAttribute(XFA.INSTANCEMANAGERTAG, XFA.NAMETAG, new StringAttr("name", ""), 0, 63, 0);
this.putElement(XFA.INSTANCEMANAGERTAG, XFA.OCCURTAG, ChildReln.getZeroOrOne(), 0, 63, 0);
}
@Override
protected Element newElement(int eTag, Element parent, Node prevSibling) {
if (eTag == XFA.FIELDTAG) {
return new FormField(parent, prevSibling);
}
if (eTag == XFA.SUBFORMTAG) {
return new FormSubform(parent, prevSibling);
}
if (eTag == XFA.EXCLGROUPTAG) {
return new FormExclGroup(parent, prevSibling);
}
if (eTag == XFA.SUBFORMSETTAG) {
return new FormSubformSet(parent, prevSibling);
}
if (eTag == XFA.INSTANCEMANAGERTAG) {
return new FormInstanceManager(parent, prevSibling);
}
if (eTag == XFA.MANIFESTTAG) {
return new FormManifest(parent, prevSibling);
}
return super.newElement(eTag, parent, prevSibling);
}
}