|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| package org.apache.xindice.xml.dom; |
|
21 |
| |
|
22 |
| import org.w3c.dom.DOMConfiguration; |
|
23 |
| import org.w3c.dom.DOMException; |
|
24 |
| import org.w3c.dom.DOMStringList; |
|
25 |
| |
|
26 |
| import java.util.HashMap; |
|
27 |
| import java.util.Collections; |
|
28 |
| import java.util.Map; |
|
29 |
| |
|
30 |
| |
|
31 |
| |
|
32 |
| |
|
33 |
| |
|
34 |
| public class DOMConfigurationImpl implements DOMConfiguration { |
|
35 |
| |
|
36 |
| private static final DOMStringList NAMES = new DOMStringListImpl(); |
|
37 |
| |
|
38 |
| private Map config = Collections.synchronizedMap(new HashMap()); |
|
39 |
| |
|
40 |
74024
| DOMConfigurationImpl() {
|
|
41 |
74024
| config.put("canonical-form", null);
|
|
42 |
74024
| config.put("cdata-sections", null);
|
|
43 |
74024
| config.put("check-character-normalization", null);
|
|
44 |
74024
| config.put("comments", null);
|
|
45 |
74024
| config.put("datatype-normalization", null);
|
|
46 |
74024
| config.put("element-content-whitespace", null);
|
|
47 |
74024
| config.put("entities", null);
|
|
48 |
74024
| config.put("error-handler", null);
|
|
49 |
74024
| config.put("infoset", null);
|
|
50 |
74024
| config.put("namespaces", null);
|
|
51 |
74024
| config.put("namespace-declarations", null);
|
|
52 |
74024
| config.put("normalize-characters", null);
|
|
53 |
74024
| config.put("schema-location", null);
|
|
54 |
74024
| config.put("schema-type", null);
|
|
55 |
74024
| config.put("split-cdata-sections", null);
|
|
56 |
74024
| config.put("validate", null);
|
|
57 |
74024
| config.put("validate-if-schema", null);
|
|
58 |
74024
| config.put("well-formed", null);
|
|
59 |
| } |
|
60 |
| |
|
61 |
0
| public void setParameter(String name, Object value) throws DOMException {
|
|
62 |
0
| if (!config.containsKey(name)) {
|
|
63 |
0
| throw new DOMException(DOMException.NOT_FOUND_ERR, "Parameter " + name + " is not recognized");
|
|
64 |
| } |
|
65 |
| } |
|
66 |
| |
|
67 |
0
| public Object getParameter(String name) throws DOMException {
|
|
68 |
0
| if (!config.containsKey(name)) {
|
|
69 |
0
| throw new DOMException(DOMException.NOT_FOUND_ERR, "Parameter " + name + " is not recognized");
|
|
70 |
| } |
|
71 |
| |
|
72 |
0
| return config.get(name);
|
|
73 |
| } |
|
74 |
| |
|
75 |
0
| public boolean canSetParameter(String name, Object value) {
|
|
76 |
0
| return false;
|
|
77 |
| } |
|
78 |
| |
|
79 |
0
| public DOMStringList getParameterNames() {
|
|
80 |
0
| return NAMES;
|
|
81 |
| } |
|
82 |
| } |