1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java Sat Dec 21 22:22:30 2013 +0100
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java Sun Dec 22 18:19:38 2013 +0100
1.3 @@ -17,13 +17,13 @@
1.4 */
1.5 package info.globalcode.sql.dk.configuration;
1.6
1.7 +import static info.globalcode.sql.dk.Constants.XMLNS_CONFIGURATION;
1.8 import info.globalcode.sql.dk.DKException;
1.9 import info.globalcode.sql.dk.formatting.Formatter;
1.10 import info.globalcode.sql.dk.formatting.FormatterContext;
1.11 import java.lang.reflect.Constructor;
1.12 import java.lang.reflect.InvocationTargetException;
1.13 import javax.xml.bind.annotation.XmlElement;
1.14 -import javax.xml.bind.annotation.XmlTransient;
1.15
1.16 /**
1.17 *
1.18 @@ -34,7 +34,15 @@
1.19 private String name;
1.20 private String className;
1.21
1.22 - @XmlElement(name = "name")
1.23 + public FormatterDefinition() {
1.24 + }
1.25 +
1.26 + public FormatterDefinition(String name, String className) {
1.27 + this.name = name;
1.28 + this.className = className;
1.29 + }
1.30 +
1.31 + @XmlElement(name = "name", namespace = XMLNS_CONFIGURATION)
1.32 @Override
1.33 public String getName() {
1.34 return name;
1.35 @@ -54,7 +62,7 @@
1.36 *
1.37 * @return fully qualified class name
1.38 */
1.39 - @XmlElement(name = "class")
1.40 + @XmlElement(name = "class", namespace = XMLNS_CONFIGURATION)
1.41 public String getClassName() {
1.42 return className;
1.43 }
1.44 @@ -68,7 +76,6 @@
1.45 * @return
1.46 * @throws DKException
1.47 */
1.48 - @XmlTransient
1.49 public Formatter getInstance(FormatterContext context) throws DKException {
1.50 try {
1.51 Constructor constructor = Class.forName(className).getConstructor(context.getClass());