ConfigurationModelFactory.java
1.36 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.configuration;
import com.adobe.xfa.AppModel;
import com.adobe.xfa.Element;
import com.adobe.xfa.Model;
import com.adobe.xfa.ModelFactory;
import com.adobe.xfa.ModelPeer;
import com.adobe.xfa.Node;
import com.adobe.xfa.XFA;
import com.adobe.xfa.configuration.ConfigurationModel;
import org.xml.sax.Attributes;
public final class ConfigurationModelFactory
extends ModelFactory {
public ConfigurationModelFactory() {
super(XFA.CONFIGTAG, "config", "$config");
}
@Override
protected Model newModel(AppModel parent, Node prevSibling, String uri, String localName, String qName, Attributes attrs) {
ConfigurationModel cm = new ConfigurationModel(parent, prevSibling);
cm.setXmlPeer(new ModelPeer((Element)parent.getXmlPeer(), null, uri, localName, qName, attrs, cm));
cm.setDOMProperties(uri, localName, qName, attrs);
return cm;
}
@Override
public Model createDOM(Element parent) {
ConfigurationModel cm = new ConfigurationModel(parent.getAppModel(), null);
ModelPeer modelPeer = new ModelPeer(parent, null, ConfigurationModel.configurationNS(), "config", "config", null, cm);
cm.setXmlPeer(modelPeer);
cm.connectPeerToDocument();
return cm;
}
@Override
public boolean getAllowAdd() {
return true;
}
}