commit | author | age
|
ca8e1e
|
1 |
/* |
U |
2 |
Transit - Remote procedure calls made simple |
|
3 |
Copyright (c) 2012 Ulrich Hilger |
|
4 |
|
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU Affero General Public License as published by |
|
7 |
the Free Software Foundation, either version 3 of the License, or |
|
8 |
(at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU Affero General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU Affero General Public License |
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 |
*/ |
|
18 |
|
|
19 |
package de.uhilger.transit; |
|
20 |
|
|
21 |
import java.util.List; |
|
22 |
|
|
23 |
import com.thoughtworks.xstream.XStream; |
|
24 |
import com.thoughtworks.xstream.io.xml.StaxDriver; |
|
25 |
|
|
26 |
/** |
|
27 |
* Java-Objekte in die Extensible Markup Language (XML) |
|
28 |
* verwandeln und umgekehrt |
|
29 |
* |
|
30 |
* <p>Diese Klasse benoetigt die Java-Klassenbibliotheken |
42c48e
|
31 |
* <a href="http://xstream.codehaus.org/" target="_blank">XStream</a> |
U |
32 |
* und <a href="http://jettison.codehaus.org/" target="_blank">Jettison</a> |
ca8e1e
|
33 |
* im Classpath.</p> |
U |
34 |
* |
|
35 |
* @author Copyright (c) Ulrich Hilger, http://uhilger.de |
|
36 |
* @author Published under the terms and conditions of |
|
37 |
* the <a href="http://www.gnu.org/licenses/agpl-3.0" target="_blank">GNU Affero General Public License</a> |
|
38 |
* |
|
39 |
* @version 1, 28. Dezember 2012 |
|
40 |
*/ |
|
41 |
public class XmlWandler extends AbstractWandler { |
|
42 |
|
|
43 |
/** Bezeichnerdes Formats, das dieser Wandler unterstuetzt */ |
|
44 |
public static final String FORMAT_XML = "XML"; |
|
45 |
|
|
46 |
protected XStream getXStream() { |
|
47 |
return new XStream(new StaxDriver()); |
|
48 |
} |
|
49 |
|
|
50 |
/** |
|
51 |
* Das Format ermitteln, das dieser Wandler verarbeitet |
|
52 |
* @return das Format, das dieser Wandler verarbeitet |
|
53 |
*/ |
|
54 |
@Override |
|
55 |
public String getFormat() { |
|
56 |
return FORMAT_XML; |
|
57 |
} |
|
58 |
|
|
59 |
} |