Mercurial > dive4elements > gnv-client
annotate gnv/src/main/java/de/intevation/gnv/util/XMLUtils.java @ 964:3549253ecd7b
Fixed some warnings which were displaied during the javadoc-generation
gnv/trunk@1108 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 18 May 2010 11:14:09 +0000 |
parents | e7fda0ae8b92 |
children | 28a0628b11b0 |
rev | line source |
---|---|
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.util; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
3 import java.io.IOException; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 import java.io.InputStream; |
670
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
5 import java.io.OutputStream; |
11
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
6 import java.io.StringBufferInputStream; |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 import java.io.StringWriter; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
8 |
35 | 9 import javax.xml.namespace.NamespaceContext; |
10 import javax.xml.namespace.QName; | |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 import javax.xml.parsers.DocumentBuilder; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 import javax.xml.parsers.DocumentBuilderFactory; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 import javax.xml.parsers.ParserConfigurationException; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 import javax.xml.transform.Transformer; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 import javax.xml.transform.TransformerConfigurationException; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 import javax.xml.transform.TransformerException; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 import javax.xml.transform.TransformerFactory; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 import javax.xml.transform.TransformerFactoryConfigurationError; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 import javax.xml.transform.dom.DOMSource; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 import javax.xml.transform.stream.StreamResult; |
35 | 21 import javax.xml.xpath.XPath; |
22 import javax.xml.xpath.XPathConstants; | |
23 import javax.xml.xpath.XPathExpressionException; | |
24 import javax.xml.xpath.XPathFactory; | |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 import org.apache.log4j.Logger; |
35 | 27 import org.w3c.dom.Attr; |
28 import org.w3c.dom.Document; | |
29 import org.w3c.dom.Element; | |
30 import org.w3c.dom.Node; | |
31 import org.w3c.dom.NodeList; | |
32 import org.xml.sax.SAXException; | |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 /** |
962 | 35 * This class provides many helper-Methods for handling different kinds of |
36 * XML-stuff. | |
37 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> | |
38 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> | |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 */ |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
40 public class XMLUtils { |
962 | 41 |
42 /** | |
43 * the logger, used to log exceptions and additonaly information | |
44 */ | |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 private static Logger logger = Logger.getLogger(XMLUtils.class); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 |
962 | 47 /** |
48 * Constructor | |
49 */ | |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 public XMLUtils() { |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
52 |
962 | 53 /** |
54 * Class which could be used to create XML-Elements | |
55 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> | |
56 * | |
57 */ | |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
58 public static class ElementCreator { |
962 | 59 |
60 /** | |
61 * The document the elements should be placed in. | |
62 */ | |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
63 protected Document document; |
962 | 64 |
65 /** | |
66 * The namespace that should be used. | |
67 */ | |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
68 protected String ns; |
962 | 69 |
70 /** | |
71 * The prefix of the namespace that should be used. | |
72 */ | |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
73 protected String prefix; |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
74 |
962 | 75 /** |
76 * Constructor | |
77 * @param document the document the elements should be placed in | |
78 * @param ns the namespace that should be used | |
79 * @param prefix the prefix of the namespace that should be used | |
80 */ | |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
81 public ElementCreator(Document document, String ns, String prefix) { |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
82 this.document = document; |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
83 this.ns = ns; |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
84 this.prefix = prefix; |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
85 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
86 |
962 | 87 /** |
88 * Creates a new element using the given name. | |
89 * @param name the name of the new element. | |
90 * @return the new element | |
91 */ | |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
92 public Element create(String name) { |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
93 Element element = document.createElementNS(ns, name); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
94 element.setPrefix(prefix); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
95 return element; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
96 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
97 |
962 | 98 /** |
99 * Adds a new attribute to the given element. | |
100 * @param element the element where the attribute should be placed in. | |
101 * @param name the name of the attribute | |
102 * @param value the value of the attribute | |
103 */ | |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
104 public void addAttr(Element element, String name, String value) { |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
105 Attr attr = document.createAttributeNS(ns, name); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
106 attr.setValue(value); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
107 attr.setPrefix(prefix); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
108 element.setAttributeNode(attr); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
109 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
110 } // class ElementCreator |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
111 |
962 | 112 /** |
113 * Creates a new document. | |
114 * @return the new document | |
115 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
116 public static Document newDocument() { |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
117 try { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
118 return DocumentBuilderFactory.newInstance().newDocumentBuilder() |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
119 .newDocument(); |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
120 } catch (ParserConfigurationException pce) { |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
121 logger.error(pce.getLocalizedMessage(), pce); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
122 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
123 return null; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
124 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
125 |
962 | 126 /** |
127 * Creates a new <code>XPath</code>-expression | |
128 * @return the new <code>XPath</code>-expression | |
129 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
130 public static XPath newXPath() { |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
131 return newXPath(null); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
132 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
133 |
962 | 134 /** |
135 * Creates a new <code>XPath</code>-expression | |
136 * @param namespaceContext the namespacecontext that should be used. | |
137 * @return the new <code>XPath</code>-expression | |
138 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
139 public static XPath newXPath(NamespaceContext namespaceContext) { |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
140 XPathFactory factory = XPathFactory.newInstance(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
141 XPath xpath = factory.newXPath(); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
142 if (namespaceContext != null) { |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
143 xpath.setNamespaceContext(namespaceContext); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
144 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
145 return xpath; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
146 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
147 |
962 | 148 /** |
149 * Fetch the value of an element or attribute from the given resource | |
150 * using the query. | |
151 * @param root the source where the value should be fetch from | |
152 * @param query the query that should be used to fetch the value | |
153 * @param namespaceContext the namespacecontext that must match to | |
154 * fetch the value. | |
155 * @return the value | |
156 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
157 public static final String xpathString(Object root, String query, |
38
fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
158 NamespaceContext namespaceContext) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
159 return (String) xpath(root, query, XPathConstants.STRING, |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
160 namespaceContext); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
161 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
162 |
962 | 163 /** |
164 * Fetch the object rom the given resource using the query. | |
165 * @param root the source where the value should be fetch from | |
166 * @param query the query that should be used to fetch the object | |
167 * @param returnType the Type that must be used to return the object, | |
168 * @param namespaceContext the namespacecontext that must match to | |
169 * fetch the object. | |
170 * @return the value | |
171 */ | |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
172 public static final Object xpath(Object root, String query, |
38
fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
173 QName returnType, |
fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
174 NamespaceContext namespaceContext) { |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
175 if (root == null) { |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
176 return null; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
177 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
178 try { |
962 | 179 XPath xpath = XMLUtils.newXPath(namespaceContext); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
180 if (xpath != null) { |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
181 return xpath.evaluate(query, root, returnType); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
182 } |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
183 } catch (XPathExpressionException xpee) { |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
184 logger.error(xpee.getLocalizedMessage(), xpee); |
35 | 185 } |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
186 return null; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
187 } |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
188 |
962 | 189 /** |
190 * Fetch the object rom the given resource using the query | |
191 * and the default <code>ArtifactNamespaceContext</code> | |
192 * @param root the source where the value should be fetch from | |
193 * @param query the query that should be used to fetch the object | |
194 * @param returnType the Type that must be used to return the object | |
195 * @return the value | |
196 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
197 public static Object getXPath(Object root, String query, QName returnType) { |
389
416ff31f6273
Removed local-name() method from xsl stylesheet and adjusted xpathes while reading xml documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
198 return getXPath(root,query,returnType,ArtifactNamespaceContext.INSTANCE); |
416ff31f6273
Removed local-name() method from xsl stylesheet and adjusted xpathes while reading xml documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
199 } |
416ff31f6273
Removed local-name() method from xsl stylesheet and adjusted xpathes while reading xml documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
200 |
962 | 201 /** |
202 * Fetch the object rom the given resource using the query | |
203 * and the default <code>ArtifactNamespaceContext</code> | |
204 * @param root the source where the value should be fetch from | |
205 * @param query the query that should be used to fetch the object | |
206 * @param returnType the Type that must be used to return the object. | |
964
3549253ecd7b
Fixed some warnings which were displaied during the javadoc-generation
Tim Englich <tim.englich@intevation.de>
parents:
962
diff
changeset
|
207 * @param context the namespacecontext that must match to |
962 | 208 * fetch the object. |
209 * @return the value | |
210 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
211 public static Object getXPath( |
389
416ff31f6273
Removed local-name() method from xsl stylesheet and adjusted xpathes while reading xml documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
212 Object root, String query, QName returnType, NamespaceContext context |
416ff31f6273
Removed local-name() method from xsl stylesheet and adjusted xpathes while reading xml documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
213 ) { |
416ff31f6273
Removed local-name() method from xsl stylesheet and adjusted xpathes while reading xml documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
214 return xpath(root, query, returnType, context); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
215 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
216 |
962 | 217 /** |
218 * Fetch a Nodeset value from a XML-Fragment or XML-Document using the | |
219 * given query. | |
220 * @param root the source where the String should be fetched from | |
221 * @param query the query that should be used, | |
222 * @return the Nodeset fetched from the source | |
223 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
224 public static NodeList getNodeSetXPath(Object root, String query) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
225 return (NodeList) getXPath(root, query, XPathConstants.NODESET); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
226 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
227 |
962 | 228 /** |
229 * Fetch a Node from a XML-Fragment or XML-Document using the | |
230 * given query. | |
231 * @param root the source where the Node should be fetched from | |
232 * @param query the query that should be used, | |
233 * @return the Node fetched from the source | |
234 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
235 public static Node getNodeXPath(Object root, String query) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
236 return (Node) getXPath(root, query, XPathConstants.NODE); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
237 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
238 |
962 | 239 /** |
240 * Fetch a String value from a XML-Fragment or XML-Document using the | |
241 * given query. | |
242 * @param root the source where the String should be fetched from | |
243 * @param xpath the query that should be used, | |
244 * @return the String fetched from the source | |
245 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
246 public static String getStringXPath(Object root, String xpath) { |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
247 return getStringXPath(root, xpath, null); |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
248 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
249 |
962 | 250 /** |
251 * Fetch a String value from a XML-Fragment or XML-Document using the | |
252 * given query. | |
253 * @param root the source where the String should be fetched from | |
254 * @param query the query that should be used, | |
255 * @param def the default-value that will be returned id no value was found | |
256 * @return the String fetched from the source | |
257 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
258 public static String getStringXPath(Object root, String query, String def) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
259 String s = (String) getXPath(root, query, XPathConstants.STRING); |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
260 return s == null || s.length() == 0 ? def : s; |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
261 } |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
262 |
962 | 263 /** |
264 * Reads an XML-document from a given <code>InputStream</code> | |
265 * @param inputStream the <code>InputStream</code> where the document | |
266 * should be read from | |
267 * @return the document that could be read. | |
268 */ | |
570
cbd397712ecf
Render an OpenLayers map with the layer even published after triggering shapefile and mapfile creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
389
diff
changeset
|
269 public static Document readDocument(InputStream inputStream) { |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
270 Document returnValue = null; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
271 try { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
272 DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
273 .newInstance(); |
389
416ff31f6273
Removed local-name() method from xsl stylesheet and adjusted xpathes while reading xml documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
274 docBuilderFactory.setNamespaceAware(true); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
275 DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
276 returnValue = docBuilder.parse(inputStream); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
277 } catch (ParserConfigurationException e) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
278 logger.error(e, e); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
279 } catch (SAXException e) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
280 logger.error(e, e); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
281 } catch (IOException e) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
282 logger.error(e, e); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
283 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
284 return returnValue; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
285 } |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
286 |
962 | 287 /** |
288 * Writes an single <code>XML-Node</code> to a string | |
289 * @param node the <code>XML-Node</code> that should be written | |
290 * @return the encoded <code>XML-Node</code> | |
291 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
292 public static String writeNode2String(Node node) { |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
293 try { |
11
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
294 DOMSource source = new DOMSource(node); |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
295 return writeDOMSource2String(source); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
296 } catch (TransformerConfigurationException e) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
297 logger.error(e, e); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
298 } catch (TransformerFactoryConfigurationError e) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
299 logger.error(e, e); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
300 } catch (TransformerException e) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
301 logger.error(e, e); |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
302 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
303 return null; |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
304 } |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
305 |
962 | 306 /** |
307 * Reinitialize the doument. | |
308 * This is neccessary because the namespace sometimes is invalid | |
309 * using a document which was created and used in the same step. | |
310 * @param document the document which should be reinitialize | |
311 * @return the document | |
312 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
313 public static Document reInitDocument(Document document) { |
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
314 StringBufferInputStream inputStream = new StringBufferInputStream( |
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
315 writeDocument2String(document)); |
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
316 return readDocument(inputStream); |
11
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
317 } |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
318 |
962 | 319 /** |
320 * Writes the given Document into a String. | |
321 * This is very helpful for debugging. | |
322 * @param document the document which should be written to the string. | |
323 * @return the encoded xml-document. | |
324 */ | |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
325 public static String writeDocument2String(Document document) { |
11
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
326 try { |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
327 DOMSource source = new DOMSource(document); |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
328 return writeDOMSource2String(source); |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
329 } catch (TransformerConfigurationException e) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
330 logger.error(e, e); |
11
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
331 } catch (TransformerFactoryConfigurationError e) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
332 logger.error(e, e); |
11
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
333 } catch (TransformerException e) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
334 logger.error(e, e); |
11
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
335 } |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
336 return null; |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
337 } |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
338 |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
339 /** |
962 | 340 * Writes a given <code>DOMSource</code> into a String |
341 * @param source the source that should be written to string | |
342 * @return the encoded <code>DOMSource</code> | |
11
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
343 * @throws TransformerFactoryConfigurationError |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
344 * @throws TransformerConfigurationException |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
345 * @throws TransformerException |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
346 */ |
585
2e690cb2247c
Show information about MapServer path and layer name after publishing calculated shapefiles as wms. Use MapServer settings configured in conf.xml to feed OpenLayers client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
570
diff
changeset
|
347 private static String writeDOMSource2String(DOMSource source) |
38
fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
348 throws TransformerFactoryConfigurationError, |
fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
349 TransformerConfigurationException, |
fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
350 TransformerException { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
351 TransformerFactory transformerFactory = TransformerFactory |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
352 .newInstance(); |
11
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
353 Transformer transformer = transformerFactory.newTransformer(); |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
354 StringWriter sw = new StringWriter(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
355 StreamResult result = new StreamResult(sw); |
11
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
356 transformer.transform(source, result); |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
357 return sw.getBuffer().toString(); |
3cb753564552
Integration of the required XSL-Transformation of the Describe-Response of the Artifactdatabase
Tim Englich <tim.englich@intevation.de>
parents:
2
diff
changeset
|
358 } |
670
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
359 |
962 | 360 /** |
361 * Writes a given Document to an <code>OutputStream</code> | |
362 * @param document the document that should be written | |
363 * @param out the stream where the document should be written to, | |
364 * @return true if it was successful, false if not. | |
365 */ | |
366 public static boolean toStream(Document document, OutputStream out) { | |
670
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
367 try { |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
368 Transformer transformer = |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
369 TransformerFactory.newInstance().newTransformer(); |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
370 DOMSource source = new DOMSource(document); |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
371 StreamResult result = new StreamResult(out); |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
372 transformer.transform(source, result); |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
373 return true; |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
374 } |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
375 catch (TransformerConfigurationException tce) { |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
376 logger.error(tce.getLocalizedMessage(), tce); |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
377 } |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
378 catch (TransformerFactoryConfigurationError tfce) { |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
379 logger.error(tfce.getLocalizedMessage(), tfce); |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
380 } |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
381 catch (TransformerException te) { |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
382 logger.error(te.getLocalizedMessage(), te); |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
383 } |
b89b31293772
Implemented first things to store/load projects.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
585
diff
changeset
|
384 return false; |
681
15ac78a91d1b
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
670
diff
changeset
|
385 } |
2
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
386 } |
5e94403971af
infrastructur for Communicationg with the ArtifactDatabase added.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
387 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: |