comparison gnv-artifacts/src/main/java/de/intevation/gnv/utils/ArtifactXMLUtilities.java @ 823:499cfbbb61bc

Removed obsolet SuppressWarnings-Annotations. gnv-artifacts/trunk@910 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 13 Apr 2010 08:25:34 +0000
parents a645bd23c1c8
children 05bf8534a35a
comparison
equal deleted inserted replaced
822:ac1b9f00603f 823:499cfbbb61bc
1 package de.intevation.gnv.utils; 1 package de.intevation.gnv.utils;
2
3 import de.intevation.artifacts.ArtifactNamespaceContext;
4 2
5 import java.io.ByteArrayInputStream; 3 import java.io.ByteArrayInputStream;
6 import java.io.IOException; 4 import java.io.IOException;
7 import java.io.InputStream; 5 import java.io.InputStream;
8 import java.io.Serializable; 6 import java.io.Serializable;
10 import java.io.UnsupportedEncodingException; 8 import java.io.UnsupportedEncodingException;
11 9
12 import javax.xml.parsers.DocumentBuilder; 10 import javax.xml.parsers.DocumentBuilder;
13 import javax.xml.parsers.DocumentBuilderFactory; 11 import javax.xml.parsers.DocumentBuilderFactory;
14 import javax.xml.parsers.ParserConfigurationException; 12 import javax.xml.parsers.ParserConfigurationException;
15
16 import javax.xml.transform.Transformer; 13 import javax.xml.transform.Transformer;
17 import javax.xml.transform.TransformerConfigurationException; 14 import javax.xml.transform.TransformerConfigurationException;
18 import javax.xml.transform.TransformerException; 15 import javax.xml.transform.TransformerException;
19 import javax.xml.transform.TransformerFactory; 16 import javax.xml.transform.TransformerFactory;
20 import javax.xml.transform.TransformerFactoryConfigurationError; 17 import javax.xml.transform.TransformerFactoryConfigurationError;
21
22 import javax.xml.transform.dom.DOMSource; 18 import javax.xml.transform.dom.DOMSource;
23
24 import javax.xml.transform.stream.StreamResult; 19 import javax.xml.transform.stream.StreamResult;
25 20
26 import org.apache.log4j.Logger; 21 import org.apache.log4j.Logger;
27
28 import org.w3c.dom.Document; 22 import org.w3c.dom.Document;
29 import org.w3c.dom.Element; 23 import org.w3c.dom.Element;
30 import org.w3c.dom.Node; 24 import org.w3c.dom.Node;
31
32 import org.xml.sax.SAXException; 25 import org.xml.sax.SAXException;
26
27 import de.intevation.artifacts.ArtifactNamespaceContext;
33 28
34 /** 29 /**
35 * This class provides some methods for creating and working with xml documents. 30 * This class provides some methods for creating and working with xml documents.
36 * 31 *
37 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> 32 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
123 } 118 }
124 return returnValue; 119 return returnValue;
125 } 120 }
126 121
127 122
128 @SuppressWarnings("static-access")
129 public Document reInitDocument(Document document) { 123 public Document reInitDocument(Document document) {
130 try { 124 try {
131 @SuppressWarnings("static-access")
132 byte[] barray = ArtifactXMLUtilities.writeDocument2String(document).getBytes( 125 byte[] barray = ArtifactXMLUtilities.writeDocument2String(document).getBytes(
133 "UTF-8"); 126 "UTF-8");
134 InputStream inputStream = new ByteArrayInputStream(barray); 127 InputStream inputStream = new ByteArrayInputStream(barray);
135 return ArtifactXMLUtilities.readDocument(inputStream); 128 return ArtifactXMLUtilities.readDocument(inputStream);
136 } catch (UnsupportedEncodingException e) { 129 } catch (UnsupportedEncodingException e) {

http://dive4elements.wald.intevation.org