ModelFactory.java
1.62 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa;
import com.adobe.xfa.AppModel;
import com.adobe.xfa.Element;
import com.adobe.xfa.Model;
import com.adobe.xfa.Node;
import com.adobe.xfa.ut.ExFull;
import com.adobe.xfa.ut.ResId;
import org.xml.sax.Attributes;
public abstract class ModelFactory {
protected final int meClassTag;
protected final String maRootName;
protected final String maShortCutName;
public ModelFactory(int eClassTag, String aRootName, String aShortCutName) {
this.meClassTag = eClassTag;
this.maRootName = aRootName;
this.maShortCutName = aShortCutName;
}
public final String rootName() {
return this.maRootName;
}
public void setOption(String optionName, String optionValue, boolean bCritical) {
throw new ExFull(ResId.InvalidOptionException, optionName);
}
protected boolean isRootNode(AppModel parent, String uri, String localName) {
return localName == this.rootName();
}
protected abstract Model newModel(AppModel var1, Node var2, String var3, String var4, String var5, Attributes var6);
protected Model findModel(Node parent) {
for (Node oChild = parent.getFirstXFAChild(); oChild != null; oChild = oChild.getNextXFASibling()) {
if (!this.isRootName(oChild.getName()) || !(oChild instanceof Model)) continue;
return (Model)oChild;
}
return null;
}
public boolean getAllowAdd() {
return false;
}
public abstract Model createDOM(Element var1);
public boolean isRootName(String name) {
return this.rootName() == name;
}
}