--- a/java/sql-dk/src/info/globalcode/sql/dk/Constants.java Sun Dec 22 18:19:38 2013 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/Constants.java Sun Dec 22 18:35:50 2013 +0100
@@ -27,7 +27,6 @@
public static final String LICENSE_FILE = "info/globalcode/sql/dk/license.txt";
public static final String VERSION_FILE = "info/globalcode/sql/dk/version.txt";
public static final String HELP_FILE = "info/globalcode/sql/dk/help.txt";
- public static final String XMLNS_CONFIGURATION = "https://sql-dk.globalcode.info/xmlns/configuration";
private Constants() {
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/java/sql-dk/src/info/globalcode/sql/dk/Xmlns.java Sun Dec 22 18:35:50 2013 +0100
@@ -0,0 +1,28 @@
+/**
+ * SQL-DK
+ * Copyright © 2013 František Kučera (frantovo.cz)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package info.globalcode.sql.dk;
+
+/**
+ * XML namespaces
+ *
+ * @author Ing. František Kučera (frantovo.cz)
+ */
+public class Xmlns {
+
+ public static final String CONFIGURATION = "https://sql-dk.globalcode.info/xmlns/configuration";
+}
--- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/Configuration.java Sun Dec 22 18:19:38 2013 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/Configuration.java Sun Dec 22 18:35:50 2013 +0100
@@ -17,7 +17,7 @@
*/
package info.globalcode.sql.dk.configuration;
-import static info.globalcode.sql.dk.Constants.XMLNS_CONFIGURATION;
+import static info.globalcode.sql.dk.Xmlns.CONFIGURATION;
import static info.globalcode.sql.dk.Functions.findByName;
import info.globalcode.sql.dk.formatting.SilentFormatter;
import info.globalcode.sql.dk.formatting.XmlFormatter;
@@ -32,7 +32,7 @@
*
* @author Ing. František Kučera (frantovo.cz)
*/
-@XmlRootElement(name = "configuration", namespace = XMLNS_CONFIGURATION)
+@XmlRootElement(name = "configuration", namespace = CONFIGURATION)
public class Configuration {
private List<DatabaseDefinition> databases = new ArrayList<>();
@@ -50,7 +50,7 @@
buildInFormatters = Collections.unmodifiableCollection(l);
}
- @XmlElement(name = "database", namespace = XMLNS_CONFIGURATION)
+ @XmlElement(name = "database", namespace = CONFIGURATION)
public List<DatabaseDefinition> getDatabases() {
return databases;
}
@@ -63,7 +63,7 @@
return findByName(databases, name);
}
- @XmlElement(name = "formatter", namespace = XMLNS_CONFIGURATION)
+ @XmlElement(name = "formatter", namespace = CONFIGURATION)
public List<FormatterDefinition> getFormatters() {
return formatters;
}
@@ -80,7 +80,7 @@
/**
* @return name of default formatter, is used if name is not specified on CLI
*/
- @XmlElement(name = "defaultFormatter", namespace = XMLNS_CONFIGURATION)
+ @XmlElement(name = "defaultFormatter", namespace = CONFIGURATION)
public String getDefaultFormatter() {
return defaultFormatter;
}
--- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java Sun Dec 22 18:19:38 2013 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java Sun Dec 22 18:35:50 2013 +0100
@@ -17,7 +17,7 @@
*/
package info.globalcode.sql.dk.configuration;
-import static info.globalcode.sql.dk.Constants.XMLNS_CONFIGURATION;
+import static info.globalcode.sql.dk.Xmlns.CONFIGURATION;
import info.globalcode.sql.dk.DatabaseConnection;
import java.sql.SQLException;
import javax.xml.bind.annotation.XmlElement;
@@ -33,7 +33,7 @@
private String userName;
private String password;
- @XmlElement(name = "name", namespace = XMLNS_CONFIGURATION)
+ @XmlElement(name = "name", namespace = CONFIGURATION)
@Override
public String getName() {
return name;
@@ -43,7 +43,7 @@
this.name = name;
}
- @XmlElement(name = "url", namespace = XMLNS_CONFIGURATION)
+ @XmlElement(name = "url", namespace = CONFIGURATION)
public String getUrl() {
return url;
}
@@ -52,7 +52,7 @@
this.url = url;
}
- @XmlElement(name = "userName", namespace = XMLNS_CONFIGURATION)
+ @XmlElement(name = "userName", namespace = CONFIGURATION)
public String getUserName() {
return userName;
}
@@ -61,7 +61,7 @@
this.userName = userName;
}
- @XmlElement(name = "password", namespace = XMLNS_CONFIGURATION)
+ @XmlElement(name = "password", namespace = CONFIGURATION)
public String getPassword() {
return password;
}
--- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java Sun Dec 22 18:19:38 2013 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java Sun Dec 22 18:35:50 2013 +0100
@@ -17,7 +17,7 @@
*/
package info.globalcode.sql.dk.configuration;
-import static info.globalcode.sql.dk.Constants.XMLNS_CONFIGURATION;
+import static info.globalcode.sql.dk.Xmlns.CONFIGURATION;
import info.globalcode.sql.dk.DKException;
import info.globalcode.sql.dk.formatting.Formatter;
import info.globalcode.sql.dk.formatting.FormatterContext;
@@ -42,7 +42,7 @@
this.className = className;
}
- @XmlElement(name = "name", namespace = XMLNS_CONFIGURATION)
+ @XmlElement(name = "name", namespace = CONFIGURATION)
@Override
public String getName() {
return name;
@@ -62,7 +62,7 @@
*
* @return fully qualified class name
*/
- @XmlElement(name = "class", namespace = XMLNS_CONFIGURATION)
+ @XmlElement(name = "class", namespace = CONFIGURATION)
public String getClassName() {
return className;
}