15 * You should have received a copy of the GNU General Public License |
15 * You should have received a copy of the GNU General Public License |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 */ |
17 */ |
18 package info.globalcode.sql.dk.configuration; |
18 package info.globalcode.sql.dk.configuration; |
19 |
19 |
|
20 import static info.globalcode.sql.dk.Constants.XMLNS_CONFIGURATION; |
20 import info.globalcode.sql.dk.DKException; |
21 import info.globalcode.sql.dk.DKException; |
21 import info.globalcode.sql.dk.formatting.Formatter; |
22 import info.globalcode.sql.dk.formatting.Formatter; |
22 import info.globalcode.sql.dk.formatting.FormatterContext; |
23 import info.globalcode.sql.dk.formatting.FormatterContext; |
23 import java.lang.reflect.Constructor; |
24 import java.lang.reflect.Constructor; |
24 import java.lang.reflect.InvocationTargetException; |
25 import java.lang.reflect.InvocationTargetException; |
25 import javax.xml.bind.annotation.XmlElement; |
26 import javax.xml.bind.annotation.XmlElement; |
26 import javax.xml.bind.annotation.XmlTransient; |
|
27 |
27 |
28 /** |
28 /** |
29 * |
29 * |
30 * @author Ing. František Kučera (frantovo.cz) |
30 * @author Ing. František Kučera (frantovo.cz) |
31 */ |
31 */ |
32 public class FormatterDefinition implements NameIdentified { |
32 public class FormatterDefinition implements NameIdentified { |
33 |
33 |
34 private String name; |
34 private String name; |
35 private String className; |
35 private String className; |
36 |
36 |
37 @XmlElement(name = "name") |
37 public FormatterDefinition() { |
|
38 } |
|
39 |
|
40 public FormatterDefinition(String name, String className) { |
|
41 this.name = name; |
|
42 this.className = className; |
|
43 } |
|
44 |
|
45 @XmlElement(name = "name", namespace = XMLNS_CONFIGURATION) |
38 @Override |
46 @Override |
39 public String getName() { |
47 public String getName() { |
40 return name; |
48 return name; |
41 } |
49 } |
42 |
50 |
52 * The constructor must accept one parameter: |
60 * The constructor must accept one parameter: |
53 * <code>info.globalcode.sql.dk.formatting.FormatterContext</code> |
61 * <code>info.globalcode.sql.dk.formatting.FormatterContext</code> |
54 * |
62 * |
55 * @return fully qualified class name |
63 * @return fully qualified class name |
56 */ |
64 */ |
57 @XmlElement(name = "class") |
65 @XmlElement(name = "class", namespace = XMLNS_CONFIGURATION) |
58 public String getClassName() { |
66 public String getClassName() { |
59 return className; |
67 return className; |
60 } |
68 } |
61 |
69 |
62 public void setClassName(String className) { |
70 public void setClassName(String className) { |