();
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/alarms/AlarmAlertProduct.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/alarms/AlarmAlertProduct.java
index 30d178e7a9..09351d3556 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/alarms/AlarmAlertProduct.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/alarms/AlarmAlertProduct.java
@@ -21,7 +21,6 @@ package com.raytheon.uf.common.dataplugin.text.alarms;
import java.util.Date;
-import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@@ -37,6 +36,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Sep 29, 2009 mnash Initial creation
* 07Jul2010 2187 cjeanbap Added operational mode flag.
* May 23, 2012 14952 rferrel Added refTime.
+ * May 15, 2014 2536 bclement removed ISerializableObject
*
*
*
@@ -45,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@DynamicSerialize
-public class AlarmAlertProduct implements ISerializableObject {
+public class AlarmAlertProduct {
public enum ProductType {
Alarm_Alert, Proximity_Alarm
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/ICommandExecutor.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/ICommandExecutor.java
similarity index 86%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/ICommandExecutor.java
rename to edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/ICommandExecutor.java
index 9121dca805..3cfc4e5233 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/ICommandExecutor.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/ICommandExecutor.java
@@ -17,25 +17,26 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbsrv;
+package com.raytheon.uf.common.dataplugin.text.dbsrv;
import com.raytheon.uf.common.message.Message;
/**
- * TODO Add Description
+ * Command executor interface for textdbsrv
*
*
- *
+ *
* SOFTWARE HISTORY
- *
+ *
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 7, 2008 1538 jkorman Initial creation
- *
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
+ *
*
- *
+ *
* @author jkorman
- * @version 1.0
+ * @version 1.0
*/
public interface ICommandExecutor {
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/IQueryTransport.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/IQueryTransport.java
similarity index 84%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/IQueryTransport.java
rename to edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/IQueryTransport.java
index 11d8f2947b..c6412c2000 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/IQueryTransport.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/IQueryTransport.java
@@ -17,25 +17,26 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbsrv;
+package com.raytheon.uf.common.dataplugin.text.dbsrv;
import com.raytheon.uf.common.message.Message;
/**
- * TODO Add Description
+ * Transport interface for sending textdb query messages to query service
*
*
- *
+ *
* SOFTWARE HISTORY
- *
+ *
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 3, 2008 jkorman Initial creation
- *
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
+ *
*
- *
+ *
* @author jkorman
- * @version 1.0
+ * @version 1.0
*/
public interface IQueryTransport {
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/PropConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/PropConverter.java
new file mode 100644
index 0000000000..4d36ebd3ad
--- /dev/null
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/PropConverter.java
@@ -0,0 +1,89 @@
+/**
+ * This software was developed and / or modified by Raytheon Company,
+ * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
+ *
+ * U.S. EXPORT CONTROLLED TECHNICAL DATA
+ * This software product contains export-restricted data whose
+ * export/transfer/disclosure is restricted by U.S. law. Dissemination
+ * to non-U.S. persons whether in the United States or abroad requires
+ * an export license or other authorization.
+ *
+ * Contractor Name: Raytheon Company
+ * Contractor Address: 6825 Pine Street, Suite 340
+ * Mail Stop B8
+ * Omaha, NE 68106
+ * 402.291.0100
+ *
+ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
+ * further licensing information.
+ **/
+package com.raytheon.uf.common.dataplugin.text.dbsrv;
+
+import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
+
+import com.raytheon.uf.common.message.Header;
+
+/**
+ * Utilities for hexadecimal property values
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * May 15, 2014 2536 bclement Initial creation
+ *
+ *
+ *
+ * @author bclement
+ * @version 1.0
+ */
+public class PropConverter {
+
+ /**
+ * ASCII to HEX conversion.
+ *
+ * @param string
+ * ascii string
+ * @return hex code
+ */
+ public static String asciiToHex(String string) {
+ return new HexBinaryAdapter().marshal(string.getBytes());
+ }
+
+ /**
+ * HEX To ASCII conversion
+ *
+ * @param hexString
+ * @return ascii string
+ */
+ public static String hexToAscii(String hexString) {
+
+ byte[] b = new HexBinaryAdapter().unmarshal(hexString);
+
+ return new String(b);
+ }
+
+ /**
+ * Get hexadecimal property value. Converts value from hex to ASCII (if
+ * non-null).
+ *
+ * @param header
+ * contains message header.
+ * @param propName
+ * contains property name.
+ * @return property value or null if property is not in header
+ */
+ public static String getProperty(Header header, String propName) {
+ String result = null;
+
+ String value = header.getProperty(propName);
+
+ if (value != null) {
+ result = hexToAscii(value);
+ }
+ return result;
+ }
+
+}
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/StateTableTags.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/StateTableTags.java
similarity index 85%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/StateTableTags.java
rename to edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/StateTableTags.java
index e801fcf41f..ea722368a2 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/StateTableTags.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/StateTableTags.java
@@ -17,23 +17,24 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbsrv;
+package com.raytheon.uf.common.dataplugin.text.dbsrv;
/**
- * TODO Add Description
+ * Textdbsrv state table enum
*
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 7, 2008 1538 jkorman Initial creation
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
*
*
* @author jkorman
* @version 1.0
*/
-public enum StateTableTags implements ICommandTags {
+public enum StateTableTags {
OP, STATE, CCC, XXX;
}
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextDBQuery.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextDBQuery.java
similarity index 97%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextDBQuery.java
rename to edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextDBQuery.java
index a1bdfe48f8..1e2c7521db 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextDBQuery.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextDBQuery.java
@@ -17,10 +17,8 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbsrv;
+package com.raytheon.uf.common.dataplugin.text.dbsrv;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.asciiToHex;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.hexToAscii;
import java.util.ArrayList;
@@ -40,6 +38,7 @@ import com.raytheon.uf.common.message.Property;
* 28May2010 cjeanbap Added operational functionality.
* 02Aug2010 2187 cjeanbap Update variable/method signature to be consistent.
* 29Jan2013 1496 rferrel Added methods clearProductIds and clone.
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
*
*
*
@@ -432,7 +431,7 @@ public class TextDBQuery {
for (Property property : properties) {
String s = property.getValue();
if (s != null) {
- property.setValue(asciiToHex(s));
+ property.setValue(PropConverter.asciiToHex(s));
}
}
Property[] p = new Property[properties.size()];
@@ -454,7 +453,7 @@ public class TextDBQuery {
for (Property p : properties) {
String s = p.getValue();
if (s != null) {
- p.setValue(hexToAscii(s));
+ p.setValue(PropConverter.hexToAscii(s));
}
}
}
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextDBSrvCommandTags.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextDBSrvCommandTags.java
similarity index 85%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextDBSrvCommandTags.java
rename to edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextDBSrvCommandTags.java
index 8c55a4945c..cd27dee044 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextDBSrvCommandTags.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextDBSrvCommandTags.java
@@ -17,23 +17,24 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbsrv;
+package com.raytheon.uf.common.dataplugin.text.dbsrv;
/**
- * TODO Add Description
+ * Textdbsrv command enum
*
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 7, 2008 1538 jkorman Initial creation
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
*
*
* @author jkorman
* @version 1.0
*/
-public enum TextDBSrvCommandTags implements ICommandTags {
+public enum TextDBSrvCommandTags {
VIEW, ERROR, PUT, GET, DELETE;
}
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextViewGetTags.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextViewGetTags.java
similarity index 86%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextViewGetTags.java
rename to edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextViewGetTags.java
index 18cb9ea1ce..34ce7c2978 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextViewGetTags.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextViewGetTags.java
@@ -17,10 +17,10 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbsrv;
+package com.raytheon.uf.common.dataplugin.text.dbsrv;
/**
- * TODO Add Description
+ * Enumeration for textdbsrv view retrieval options
*
*
*
@@ -30,12 +30,13 @@ package com.raytheon.uf.edex.services.textdbsrv;
* 10/15/2008 1538 jkorman Initial creation.
* 08/05/2009 2191 rjpeter Added PRODXML and JOINXML.
* 05/17/2010 2187 cjeanbap Added OPERATIONAL.
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
*
*
* @author jkorman
* @version 1.0
*/
-public enum TextViewGetTags implements ICommandTags {
+public enum TextViewGetTags {
LATEST, ALL, INFO, PROD, JOIN, RAW, UNIX, DEFAULT, CLIENT, PRODXML, JOINXML, OPERATIONAL;
}
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextViewTags.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextViewTags.java
similarity index 86%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextViewTags.java
rename to edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextViewTags.java
index ae07652344..40fb24d750 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/TextViewTags.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/TextViewTags.java
@@ -17,10 +17,10 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbsrv;
+package com.raytheon.uf.common.dataplugin.text.dbsrv;
/**
- * TODO Add Description
+ * Enumeration for textdbsrv view options
*
*
* SOFTWARE HISTORY
@@ -28,12 +28,13 @@ package com.raytheon.uf.edex.services.textdbsrv;
* ------------ ---------- ----------- --------------------------
* Oct 14, 2008 1538 jkorman Initial creation
* 21May2010 2187 cjeanbap Add OPERATIONAL code
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
*
*
* @author jkorman
* @version 1.0
*/
-public enum TextViewTags implements ICommandTags {
+public enum TextViewTags {
OP, SUBOP, PRODID, FORMAT, CLIENTFMT, PRODUCT, AFOSCMD, WMOID, SITE, HOUR, HDRTIME, BBB, NNNXXX, FULLREAD, OPERATIONAL, TEST, PRACTICE;
}
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/VersionsTableTags.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/VersionsTableTags.java
similarity index 81%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/VersionsTableTags.java
rename to edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/VersionsTableTags.java
index a222d97252..a61ad4af5e 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/VersionsTableTags.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/VersionsTableTags.java
@@ -17,26 +17,27 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbsrv;
+package com.raytheon.uf.common.dataplugin.text.dbsrv;
/**
- * TODO Add Description
+ * Enumeration for textdbsrv version header fields
*
*
- *
+ *
* SOFTWARE HISTORY
- *
+ *
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 8, 2008 1538 jkorman Initial creation
- *
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
+ *
*
- *
+ *
* @author jkorman
- * @version 1.0
+ * @version 1.0
*/
-public enum VersionsTableTags implements ICommandTags {
+public enum VersionsTableTags {
OP, PRODID, VERSION;
}
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/WarnTableTags.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/WarnTableTags.java
similarity index 83%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/WarnTableTags.java
rename to edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/WarnTableTags.java
index e50bb4b61f..2ce82dc909 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/WarnTableTags.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/dbsrv/WarnTableTags.java
@@ -17,26 +17,27 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbsrv;
+package com.raytheon.uf.common.dataplugin.text.dbsrv;
/**
- *
+ * Textdbsrv warning header fields
*
*
- *
+ *
* SOFTWARE HISTORY
- *
+ *
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 8, 2008 1538 jkorman Initial creation
- *
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
+ *
*
- *
+ *
* @author jkorman
- * @version 1.0
+ * @version 1.0
*/
-public enum WarnTableTags implements ICommandTags {
+public enum WarnTableTags {
OP, PRODID, SCRIPT;
}
diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.text/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.plugin.text/META-INF/MANIFEST.MF
index 686872cb8c..3cf67c8c6a 100644
--- a/edexOsgi/com.raytheon.uf.edex.plugin.text/META-INF/MANIFEST.MF
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/META-INF/MANIFEST.MF
@@ -17,10 +17,13 @@ Require-Bundle: com.raytheon.edex.textdb,
com.raytheon.uf.edex.ndm;bundle-version="1.0.0",
com.raytheon.uf.common.localization;bundle-version="1.14.0"
Export-Package: com.raytheon.uf.edex.plugin.text,
- com.raytheon.uf.edex.plugin.text.dao
+ com.raytheon.uf.edex.plugin.text.dao,
+ com.raytheon.uf.edex.plugin.text.dbsrv
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.uf.common.dataplugin.text,
com.raytheon.uf.common.dataplugin.text.db,
+ com.raytheon.uf.common.dataplugin.text.dbsrv,
com.raytheon.uf.common.dataplugin.text.request,
+ com.raytheon.uf.common.message,
com.raytheon.uf.common.wmo,
org.apache.commons.logging
diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.text/res/spring/text-common.xml b/edexOsgi/com.raytheon.uf.edex.plugin.text/res/spring/text-common.xml
index 81b1801fde..bcddc719bd 100644
--- a/edexOsgi/com.raytheon.uf.edex.plugin.text/res/spring/text-common.xml
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/res/spring/text-common.xml
@@ -42,6 +42,8 @@
+
+
@@ -56,6 +58,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/resources/textdbsrv.properties b/edexOsgi/com.raytheon.uf.edex.plugin.text/resources/textdbsrv.properties
similarity index 100%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/resources/textdbsrv.properties
rename to edexOsgi/com.raytheon.uf.edex.plugin.text/resources/textdbsrv.properties
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/TextDBSrv.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/TextDBSrv.java
similarity index 92%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/TextDBSrv.java
rename to edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/TextDBSrv.java
index c47481b25f..2b7dc8f724 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/TextDBSrv.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/TextDBSrv.java
@@ -17,16 +17,16 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services;
+package com.raytheon.uf.edex.plugin.text.dbsrv;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.ICommandExecutor;
import com.raytheon.uf.common.message.Message;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
-import com.raytheon.uf.edex.services.textdbimpl.CommandExecutor;
-import com.raytheon.uf.edex.services.textdbsrv.ICommandExecutor;
+import com.raytheon.uf.edex.plugin.text.dbsrv.impl.CommandExecutor;
/**
- *
+ * Service for processing textdb queries
*
*
* SOFTWARE HISTORY
@@ -34,6 +34,7 @@ import com.raytheon.uf.edex.services.textdbsrv.ICommandExecutor;
* ------------ ---------- ----------- --------------------------
* Oct 03, 2008 1538 jkorman Initial implementation.
* Mar 26, 2014 2835 rjpeter Added logging.
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
*
*
* @author jkorman
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/textdbsrv/TextDBSrvWrapper.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/TextDBSrvWrapper.java
similarity index 96%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/textdbsrv/TextDBSrvWrapper.java
rename to edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/TextDBSrvWrapper.java
index f985e56435..383f9237d8 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/textdbsrv/TextDBSrvWrapper.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/TextDBSrvWrapper.java
@@ -17,7 +17,7 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
*/
-package com.raytheon.uf.edex.textdbsrv;
+package com.raytheon.uf.edex.plugin.text.dbsrv;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -33,8 +33,7 @@ import com.raytheon.uf.common.util.ByteArrayOutputStreamPool;
import com.raytheon.uf.common.util.SizeUtil;
import com.raytheon.uf.common.util.stream.LimitingInputStream;
import com.raytheon.uf.common.util.stream.LimitingOutputStream;
-import com.raytheon.uf.edex.services.TextDBSrv;
-import com.raytheon.uf.edex.services.textdbimpl.CommandExecutor;
+import com.raytheon.uf.edex.plugin.text.dbsrv.impl.CommandExecutor;
/**
* Thin wrapper around TextDBSrv to handle marshalling/unmarshalling and
@@ -47,6 +46,7 @@ import com.raytheon.uf.edex.services.textdbimpl.CommandExecutor;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 15, 2014 2928 rjpeter Initial creation.
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
*
*
*
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/CommandExecutor.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/CommandExecutor.java
similarity index 84%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/CommandExecutor.java
rename to edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/CommandExecutor.java
index 3327fe5849..46f108ea1b 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/CommandExecutor.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/CommandExecutor.java
@@ -17,25 +17,22 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbimpl;
+package com.raytheon.uf.edex.plugin.text.dbsrv.impl;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.asciiToHex;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.getProperty;
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
+import com.raytheon.uf.common.dataplugin.text.dbsrv.ICommandExecutor;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.PropConverter;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.TextDBSrvCommandTags;
import com.raytheon.uf.common.message.Header;
import com.raytheon.uf.common.message.Message;
import com.raytheon.uf.common.message.Property;
-import com.raytheon.uf.edex.services.textdbsrv.ICommandExecutor;
-import com.raytheon.uf.edex.services.textdbsrv.TextDBSrvCommandTags;
/**
- * TODO Add Description
+ * Executes command messages in ICommandExecutors. The executor is determined by
+ * the VIEW_CMD header in the message.
*
*
*
@@ -43,6 +40,7 @@ import com.raytheon.uf.edex.services.textdbsrv.TextDBSrvCommandTags;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 7, 2008 1538 jkorman Initial creation
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv, removed unused logger
*
*
*
@@ -52,8 +50,6 @@ import com.raytheon.uf.edex.services.textdbsrv.TextDBSrvCommandTags;
public class CommandExecutor implements ICommandExecutor {
- private Log logger = LogFactory.getLog(getClass());
-
private static final TextDBSrvCommandTags VIEW_CMD = TextDBSrvCommandTags.VIEW;
private Map execMap = new HashMap();
@@ -100,7 +96,7 @@ public class CommandExecutor implements ICommandExecutor {
if (message != null) {
Header header = message.getHeader();
if (header != null) {
- cmdView = getProperty(header, VIEW_CMD.name());
+ cmdView = PropConverter.getProperty(header, VIEW_CMD.name());
}
}
return cmdView;
@@ -139,8 +135,8 @@ public class CommandExecutor implements ICommandExecutor {
public static final Message createErrorMessage(String error) {
Message msg = new Message();
Header h = new Header();
- h.setProperties(new Property[] { new Property("STDERR",
- asciiToHex(error)), });
+ h.setProperties(new Property[] { new Property("STDERR", PropConverter
+ .asciiToHex(error)), });
msg.setHeader(h);
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/StateTableAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/StateTableAdapter.java
similarity index 66%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/StateTableAdapter.java
rename to edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/StateTableAdapter.java
index a4301260f9..08d50f06ee 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/StateTableAdapter.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/StateTableAdapter.java
@@ -17,21 +17,20 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbimpl;
+package com.raytheon.uf.edex.plugin.text.dbsrv.impl;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.asciiToHex;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.getProperty;
import java.util.List;
import com.raytheon.edex.textdb.dbapi.impl.TextDB;
import com.raytheon.uf.common.dataplugin.text.db.StateMatch;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.ICommandExecutor;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.PropConverter;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.StateTableTags;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.TextDBSrvCommandTags;
import com.raytheon.uf.common.message.Header;
import com.raytheon.uf.common.message.Message;
import com.raytheon.uf.common.message.Property;
-import com.raytheon.uf.edex.services.textdbsrv.ICommandExecutor;
-import com.raytheon.uf.edex.services.textdbsrv.StateTableTags;
-import com.raytheon.uf.edex.services.textdbsrv.TextDBSrvCommandTags;
/**
*
@@ -42,7 +41,8 @@ import com.raytheon.uf.edex.services.textdbsrv.TextDBSrvCommandTags;
* ------------ ---------- ----------- --------------------------
* Oct 7, 2008 1538 jkorman Initial creation
* Aug 31, 2010 2103 cjeanbap Check variable for null.
- *
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
+ *
*
*
* @author jkorman
@@ -86,7 +86,8 @@ public class StateTableAdapter implements ICommandExecutor {
Header sHeader = cmdMessage.getHeader();
// Get the operation code
- String op = getProperty(sHeader, StateTableTags.OP.name());
+ String op = PropConverter
+ .getProperty(sHeader, StateTableTags.OP.name());
TextDBSrvCommandTags opTag = TextDBSrvCommandTags.valueOf(op);
@@ -94,25 +95,32 @@ public class StateTableAdapter implements ICommandExecutor {
switch (opTag) {
case PUT: {
- String state = getProperty(sHeader, StateTableTags.STATE.name());
- String cccId = getProperty(sHeader, StateTableTags.CCC.name());
- String xxxId = getProperty(sHeader, StateTableTags.XXX.name());
+ String state = PropConverter.getProperty(sHeader,
+ StateTableTags.STATE.name());
+ String cccId = PropConverter.getProperty(sHeader,
+ StateTableTags.CCC.name());
+ String xxxId = PropConverter.getProperty(sHeader,
+ StateTableTags.XXX.name());
if ((state != null) && (cccId != null) && (xxxId != null)) {
addStateData(sHeader, state, xxxId, cccId);
}
break;
}
case GET: {
- String state = getProperty(sHeader, StateTableTags.STATE.name());
+ String state = PropConverter.getProperty(sHeader,
+ StateTableTags.STATE.name());
if (state != null) {
getStateData(sHeader, state);
}
break;
}
case DELETE: {
- String state = getProperty(sHeader, StateTableTags.STATE.name());
- String cccId = getProperty(sHeader, StateTableTags.CCC.name());
- String xxxId = getProperty(sHeader, StateTableTags.XXX.name());
+ String state = PropConverter.getProperty(sHeader,
+ StateTableTags.STATE.name());
+ String cccId = PropConverter.getProperty(sHeader,
+ StateTableTags.CCC.name());
+ String xxxId = PropConverter.getProperty(sHeader,
+ StateTableTags.XXX.name());
if ((state != null) && (cccId != null) && (xxxId != null)) {
deleteStateData(sHeader, state, xxxId, cccId);
}
@@ -121,8 +129,9 @@ public class StateTableAdapter implements ICommandExecutor {
default: {
String tagName = (opTag != null) ? opTag.name() : "null";
Property[] props = new Property[] { new Property("STDERR",
- asciiToHex("ERROR:Invalid command tag = [" + tagName
- + "]")), };
+ PropConverter
+ .asciiToHex("ERROR:Invalid command tag = ["
+ + tagName + "]")), };
sHeader.setProperties(props);
break;
}
@@ -144,9 +153,10 @@ public class StateTableAdapter implements ICommandExecutor {
private void addStateData(Header header, String state, String xxxId,
String cccId) {
Property newProperty = new Property("STDERR",
- asciiToHex("NORMAL:Adding a new state-ccc."));
+ PropConverter.asciiToHex("NORMAL:Adding a new state-ccc."));
Property errProperty = new Property("STDERR",
- asciiToHex("ERROR:Failure adding to state_ccc table."));
+ PropConverter
+ .asciiToHex("ERROR:Failure adding to state_ccc table."));
Property[] props = new Property[] { newProperty, };
if (!textDB.addState(state, cccId, xxxId)) {
@@ -174,17 +184,20 @@ public class StateTableAdapter implements ICommandExecutor {
if (dataList != null && dataList.size() > 0) {
props = new Property[dataList.size() + HEADER_LINES];
int i = 0;
- props[i++] = new Property(PROP_FMT, asciiToHex("XXX CCC"));
- props[i++] = new Property(PROP_FMT, asciiToHex("-------"));
+ props[i++] = new Property(PROP_FMT,
+ PropConverter.asciiToHex("XXX CCC"));
+ props[i++] = new Property(PROP_FMT,
+ PropConverter.asciiToHex("-------"));
for (StateMatch s : dataList) {
- props[i++] = new Property(PROP_FMT, asciiToHex(s.getPk()
- .getXxx()
- + " " + s.getPk().getCcc()));
+ props[i++] = new Property(PROP_FMT, PropConverter.asciiToHex(s
+ .getPk()
+ .getXxx() + " " + s.getPk().getCcc()));
}
} else {
props = new Property[] { new Property(
"STDERR",
- asciiToHex("ERROR:Failure reading from state lookup table.")), };
+ PropConverter
+ .asciiToHex("ERROR:Failure reading from state lookup table.")), };
}
header.setProperties(props);
}
@@ -203,10 +216,11 @@ public class StateTableAdapter implements ICommandExecutor {
if (textDB.removeState(state, xxxId, cccId)) {
props = new Property[] { new Property("STDERR",
- asciiToHex("NORMAL:Deleting state-ccc.")), };
+ PropConverter.asciiToHex("NORMAL:Deleting state-ccc.")), };
} else {
props = new Property[] { new Property("STDERR",
- asciiToHex("ERROR:Failure deleting from state_ccc table.")), };
+ PropConverter
+ .asciiToHex("ERROR:Failure deleting from state_ccc table.")), };
}
header.setProperties(props);
}
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/TextViewAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/TextViewAdapter.java
similarity index 74%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/TextViewAdapter.java
rename to edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/TextViewAdapter.java
index d9f9d1f1a0..d27ff893b7 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/TextViewAdapter.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/TextViewAdapter.java
@@ -17,22 +17,18 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbimpl;
+package com.raytheon.uf.edex.plugin.text.dbsrv.impl;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.asciiToHex;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.getProperty;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.hexToAscii;
import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.List;
-import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -40,18 +36,21 @@ import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.textdb.alarms.AlarmAlertUtil;
import com.raytheon.edex.textdb.dbapi.impl.TextDB;
import com.raytheon.uf.common.dataplugin.text.db.StdTextProduct;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.ICommandExecutor;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.PropConverter;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.TextDBSrvCommandTags;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.TextViewGetTags;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.TextViewTags;
import com.raytheon.uf.common.message.Header;
import com.raytheon.uf.common.message.Message;
import com.raytheon.uf.common.message.Property;
+import com.raytheon.uf.common.serialization.JAXBManager;
+import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.site.SiteMap;
+import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.edex.core.EDEXUtil;
import com.raytheon.uf.edex.core.EdexException;
-import com.raytheon.uf.edex.decodertools.time.TimeTools;
-import com.raytheon.uf.edex.services.textdbsrv.ICommandExecutor;
-import com.raytheon.uf.edex.services.textdbsrv.TextDBSrvCommandTags;
-import com.raytheon.uf.edex.services.textdbsrv.TextViewGetTags;
-import com.raytheon.uf.edex.services.textdbsrv.TextViewTags;
/**
* Handles database interactions with the Text DB's standard text products
@@ -73,6 +72,7 @@ import com.raytheon.uf.edex.services.textdbsrv.TextViewTags;
* 28Sep2010 6338 cjeanbap Added retrieval of current node by site.
* --------------------------------
* 27Apr2012 564 jkorman Added sort to ALL times retrieval.
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv, added marshalToStream()
*
*
*
@@ -129,7 +129,7 @@ public class TextViewAdapter implements ICommandExecutor {
Header sHeader = cmdMessage.getHeader();
// Get the operation code
- String op = getProperty(sHeader, TextViewTags.OP.name());
+ String op = PropConverter.getProperty(sHeader, TextViewTags.OP.name());
TextDBSrvCommandTags opTag = TextDBSrvCommandTags.valueOf(op);
@@ -147,14 +147,17 @@ public class TextViewAdapter implements ICommandExecutor {
}
case DELETE: {
Property[] props = new Property[] { new Property("STDERR",
- asciiToHex("ERROR:Command tag = [" + opTag.name()
+ PropConverter.asciiToHex("ERROR:Command tag = ["
+ + opTag.name()
+ "] not implemented")), };
sHeader.setProperties(props);
break;
}
default: {
Property[] props = new Property[] { new Property("STDERR",
- asciiToHex("ERROR:Invalid command tag = [" + op + "]")), };
+ PropConverter
+ .asciiToHex("ERROR:Invalid command tag = ["
+ + op + "]")), };
sHeader.setProperties(props);
break;
}
@@ -179,9 +182,12 @@ public class TextViewAdapter implements ICommandExecutor {
* @return the updated message header
*/
private Header processPutRequest(Header msgHeader) {
- String prodId = getProperty(msgHeader, TextViewTags.PRODID.name());
- String product = getProperty(msgHeader, TextViewTags.PRODUCT.name());
- String strMode = getProperty(msgHeader, TextViewTags.OPERATIONAL.name());
+ String prodId = PropConverter.getProperty(msgHeader,
+ TextViewTags.PRODID.name());
+ String product = PropConverter.getProperty(msgHeader,
+ TextViewTags.PRODUCT.name());
+ String strMode = PropConverter.getProperty(msgHeader,
+ TextViewTags.OPERATIONAL.name());
boolean operationalMode = isOperationalMode(strMode);
long insertTime = textDB.writeProduct(prodId, product, operationalMode,
@@ -195,11 +201,13 @@ public class TextViewAdapter implements ICommandExecutor {
d.setTime(insertTime);
AlarmAlertUtil.sendProductAlarmAlert(prodId, d, operationalMode);
Property[] props = new Property[] { new Property("STDERR",
- asciiToHex("NORMAL:Saved " + prodId)), };
+ PropConverter.asciiToHex("NORMAL:Saved " + prodId)), };
msgHeader.setProperties(props);
} else {
Property[] props = new Property[] { new Property("STDERR",
- asciiToHex("NORMAL:Not Saved; duplicate product " + prodId)), };
+ PropConverter
+ .asciiToHex("NORMAL:Not Saved; duplicate product "
+ + prodId)), };
msgHeader.setProperties(props);
}
@@ -213,10 +221,12 @@ public class TextViewAdapter implements ICommandExecutor {
*/
private Header processGetRequest(Header msgHeader) {
- String op = getProperty(msgHeader, TextViewTags.SUBOP.name());
+ String op = PropConverter.getProperty(msgHeader,
+ TextViewTags.SUBOP.name());
TextViewGetTags subOp = TextViewGetTags.valueOf(op);
- boolean operationalMode = isOperationalMode(getProperty(msgHeader,
+ boolean operationalMode = isOperationalMode(PropConverter.getProperty(
+ msgHeader,
TextViewTags.OPERATIONAL.name()));
if (subOp != null) {
@@ -224,9 +234,9 @@ public class TextViewAdapter implements ICommandExecutor {
List times = new ArrayList();
- String fmtType = getProperty(msgHeader,
+ String fmtType = PropConverter.getProperty(msgHeader,
TextViewTags.FORMAT.name());
- String timeFmt = getProperty(msgHeader,
+ String timeFmt = PropConverter.getProperty(msgHeader,
TextViewTags.CLIENTFMT.name());
// get the latest time for one or more products.
@@ -235,23 +245,25 @@ public class TextViewAdapter implements ICommandExecutor {
if (TextViewTags.PRODID.name().equals(p.getName())) {
times.add(textDB.getLatestTime(
- hexToAscii(p.getValue()), operationalMode));
+ PropConverter.hexToAscii(p.getValue()),
+ operationalMode));
}
} // for
msgProps = new Property[times.size()];
int pIndex = 0;
for (Long t : times) {
String s = formatTime(t, fmtType, timeFmt);
- msgProps[pIndex++] = new Property("STDOUT", asciiToHex(s));
+ msgProps[pIndex++] = new Property("STDOUT",
+ PropConverter.asciiToHex(s));
}
msgHeader.setProperties(msgProps);
} else if (TextViewGetTags.ALL.equals(subOp)) {
// get all times for a product
- String productId = getProperty(msgHeader,
+ String productId = PropConverter.getProperty(msgHeader,
TextViewTags.PRODID.name());
- String fmtType = getProperty(msgHeader,
+ String fmtType = PropConverter.getProperty(msgHeader,
TextViewTags.FORMAT.name());
- String timeFmt = getProperty(msgHeader,
+ String timeFmt = PropConverter.getProperty(msgHeader,
TextViewTags.CLIENTFMT.name());
List times = textDB.getAllTimes(productId,
@@ -263,21 +275,20 @@ public class TextViewAdapter implements ICommandExecutor {
int pIndex = 0;
for (Long t : times) {
String s = formatTime(t, fmtType, timeFmt);
- msgProps[pIndex++] = new Property("STDOUT", asciiToHex(s));
+ msgProps[pIndex++] = new Property("STDOUT",
+ PropConverter.asciiToHex(s));
}
msgHeader.setProperties(msgProps);
} else if (TextViewGetTags.INFO.equals(subOp)
|| TextViewGetTags.PROD.equals(subOp)
|| TextViewGetTags.PRODXML.equals(subOp)) {
- String siteCCCNNNXX = getProperty(msgHeader,
+ String siteCCCNNNXX = PropConverter.getProperty(msgHeader,
TextViewTags.SITE.name());
if (siteCCCNNNXX == null) {
boolean infoFlag = TextViewGetTags.INFO.equals(subOp);
boolean xmlFlag = TextViewGetTags.PRODXML.equals(subOp);
- JAXBContext ctx = null;
- Marshaller msh = null;
- String afosCmd = getProperty(msgHeader,
+ String afosCmd = PropConverter.getProperty(msgHeader,
TextViewTags.AFOSCMD.name());
logger.info("AFOS Command = " + afosCmd);
@@ -290,23 +301,18 @@ public class TextViewAdapter implements ICommandExecutor {
if (infoFlag) {
String ss = "********** Product Count = "
+ prods.size();
- prodList.add(new Property("STDOUT", asciiToHex(ss)));
+ prodList.add(new Property("STDOUT", PropConverter
+ .asciiToHex(ss)));
}
try {
- if (xmlFlag) {
- ctx = SerializationUtil.getJaxbContext();
- msh = ctx.createMarshaller();
- msh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
- Boolean.FALSE);
- }
-
for (StdTextProduct prod : prods) {
if (xmlFlag) {
ByteArrayOutputStream strm = new ByteArrayOutputStream();
- msh.marshal(prod, strm);
+ marshalToStream(prod, strm);
prodList.add(new Property("STDOUT",
- asciiToHex(strm.toString())));
+ PropConverter.asciiToHex(strm
+ .toString())));
} else {
String s = prod.getProduct();
if (s != null) {
@@ -314,15 +320,15 @@ public class TextViewAdapter implements ICommandExecutor {
String ss = "********** Product Size = "
+ s.length();
prodList.add(new Property("STDOUT",
- asciiToHex(ss)));
+ PropConverter.asciiToHex(ss)));
}
prodList.add(new Property("STDOUT",
- asciiToHex(s)));
+ PropConverter.asciiToHex(s)));
}
}
}
- } catch (JAXBException e) {
+ } catch (SerializationException e) {
logger.error(
"JAXB Exception marshaling StdTextProducts", e);
}
@@ -335,10 +341,11 @@ public class TextViewAdapter implements ICommandExecutor {
Property[] props = new Property[1];
if (cccNNNXXX != null) {
- props[0] = new Property("STDOUT", asciiToHex(cccNNNXXX));
+ props[0] = new Property("STDOUT",
+ PropConverter.asciiToHex(cccNNNXXX));
} else {
props[0] = new Property("STDERR",
- asciiToHex(UNKNOWN_SITE));
+ PropConverter.asciiToHex(UNKNOWN_SITE));
}
msgHeader.setProperties(props);
@@ -346,20 +353,21 @@ public class TextViewAdapter implements ICommandExecutor {
} else if (TextViewGetTags.JOIN.equals(subOp)
|| TextViewGetTags.JOINXML.equals(subOp)) {
boolean xmlFlag = TextViewGetTags.JOINXML.equals(subOp);
- JAXBContext ctx = null;
- Marshaller msh = null;
// get all times for a product
- String wmoId = getProperty(msgHeader, TextViewTags.WMOID.name());
- String site = getProperty(msgHeader, TextViewTags.SITE.name());
- String abbrId = getProperty(msgHeader,
+ String wmoId = PropConverter.getProperty(msgHeader,
+ TextViewTags.WMOID.name());
+ String site = PropConverter.getProperty(msgHeader,
+ TextViewTags.SITE.name());
+ String abbrId = PropConverter.getProperty(msgHeader,
TextViewTags.NNNXXX.name());
- String lastHrs = getProperty(msgHeader,
+ String lastHrs = PropConverter.getProperty(msgHeader,
TextViewTags.HOUR.name());
- String hdrTime = getProperty(msgHeader,
+ String hdrTime = PropConverter.getProperty(msgHeader,
TextViewTags.HDRTIME.name());
- String bbbId = getProperty(msgHeader, TextViewTags.BBB.name());
- String fullDataReadProp = getProperty(msgHeader,
+ String bbbId = PropConverter.getProperty(msgHeader,
+ TextViewTags.BBB.name());
+ String fullDataReadProp = PropConverter.getProperty(msgHeader,
TextViewTags.FULLREAD.name());
boolean fullDataRead = false;
@@ -378,25 +386,21 @@ public class TextViewAdapter implements ICommandExecutor {
// if not xml or last hours request, add the number of returned
// items
if (!xmlFlag && (lastHrs == null || lastHrs.length() == 0)) {
- prodList.add(new Property("STDOUT", asciiToHex(""
+ prodList.add(new Property("STDOUT", PropConverter
+ .asciiToHex(""
+ prods.size())));
}
StringBuilder header = new StringBuilder();
try {
- if (xmlFlag) {
- ctx = SerializationUtil.getJaxbContext();
- msh = ctx.createMarshaller();
- msh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
- Boolean.FALSE);
- }
for (StdTextProduct prod : prods) {
if (xmlFlag) {
ByteArrayOutputStream strm = new ByteArrayOutputStream();
- msh.marshal(prod, strm);
- prodList.add(new Property("STDOUT", asciiToHex(strm
+ marshalToStream(prod, strm);
+ prodList.add(new Property("STDOUT", PropConverter
+ .asciiToHex(strm
.toString())));
} else {
String cccId = prod.getCccid();
@@ -422,11 +426,11 @@ public class TextViewAdapter implements ICommandExecutor {
header.append(cccId);
header.append(nnnId);
header.append(xxxId);
- prodList.add(new Property("STDOUT",
- asciiToHex(header.toString())));
+ prodList.add(new Property("STDOUT", PropConverter
+ .asciiToHex(header.toString())));
}
}
- } catch (JAXBException e) {
+ } catch (SerializationException e) {
logger.error("JAXB Exception marshaling StdTextProducts", e);
}
@@ -438,6 +442,25 @@ public class TextViewAdapter implements ICommandExecutor {
return msgHeader;
}
+ /**
+ * Marshals product to XML in the provided stream. Does not format the
+ * output.
+ *
+ * @param prod
+ * @param stream
+ * @throws SerializationException
+ */
+ private void marshalToStream(StdTextProduct prod, OutputStream stream)
+ throws SerializationException {
+ JAXBManager jaxbManager;
+ try {
+ jaxbManager = SerializationUtil.getJaxbManager();
+ } catch (JAXBException e) {
+ throw new SerializationException("Unable to create JAXB manager", e);
+ }
+ jaxbManager.marshalToStream(prod, stream, false);
+ }
+
/**
* Convert the database product time into the client requested format.
*
@@ -459,12 +482,12 @@ public class TextViewAdapter implements ICommandExecutor {
break;
}
case DEFAULT: {
- Calendar t = TimeTools.newCalendar(prodTime);
+ Calendar t = TimeUtil.newGmtCalendar(new Date(prodTime));
formattedTime = String.format(DEFAULT_TIME_FORMAT, t);
break;
}
case CLIENT: {
- Calendar t = TimeTools.newCalendar(prodTime);
+ Calendar t = TimeUtil.newGmtCalendar(new Date(prodTime));
if (timeFormat != null) {
formattedTime = String.format(timeFormat, t);
} else {
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/VersionsAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/VersionsAdapter.java
similarity index 72%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/VersionsAdapter.java
rename to edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/VersionsAdapter.java
index 4a60ba477d..3255ee8448 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/VersionsAdapter.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/VersionsAdapter.java
@@ -17,22 +17,21 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbimpl;
+package com.raytheon.uf.edex.plugin.text.dbsrv.impl;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.asciiToHex;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.getProperty;
import com.raytheon.edex.textdb.dbapi.impl.TextDB;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.ICommandExecutor;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.PropConverter;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.TextDBSrvCommandTags;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.VersionsTableTags;
import com.raytheon.uf.common.message.Header;
import com.raytheon.uf.common.message.Message;
import com.raytheon.uf.common.message.Property;
import com.raytheon.uf.common.wmo.AFOSProductId;
-import com.raytheon.uf.edex.services.textdbsrv.ICommandExecutor;
-import com.raytheon.uf.edex.services.textdbsrv.TextDBSrvCommandTags;
-import com.raytheon.uf.edex.services.textdbsrv.VersionsTableTags;
/**
- *
+ * Manipulates version headers on textdbsrv messages
*
*
*
@@ -40,6 +39,7 @@ import com.raytheon.uf.edex.services.textdbsrv.VersionsTableTags;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 8, 2008 1538 jkorman Initial creation
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
*
*
*
@@ -81,10 +81,12 @@ public class VersionsAdapter implements ICommandExecutor {
Header sHeader = cmdMessage.getHeader();
// Get the operation code
- String op = getProperty(sHeader, VersionsTableTags.OP.name());
+ String op = PropConverter.getProperty(sHeader,
+ VersionsTableTags.OP.name());
TextDBSrvCommandTags opTag = TextDBSrvCommandTags.valueOf(op);
- String productId = getProperty(sHeader, VersionsTableTags.PRODID.name());
+ String productId = PropConverter.getProperty(sHeader,
+ VersionsTableTags.PRODID.name());
if (opTag != null && productId != null) {
AFOSProductId prodId = new AFOSProductId(productId);
@@ -92,7 +94,7 @@ public class VersionsAdapter implements ICommandExecutor {
switch (opTag) {
case PUT: {
- String versions = getProperty(sHeader,
+ String versions = PropConverter.getProperty(sHeader,
VersionsTableTags.VERSION.name());
addVersionInfo(sHeader, prodId.getCcc(), prodId.getNnn(),
@@ -113,8 +115,9 @@ public class VersionsAdapter implements ICommandExecutor {
default: {
String tagName = (opTag != null) ? opTag.name() : "null";
Property[] props = new Property[] { new Property("STDERR",
- asciiToHex("ERROR:Invalid command tag = ["
- + tagName + "]")), };
+ PropConverter
+ .asciiToHex("ERROR:Invalid command tag = ["
+ + tagName + "]")), };
sHeader.setProperties(props);
break;
}
@@ -138,10 +141,11 @@ public class VersionsAdapter implements ICommandExecutor {
private void addVersionInfo(Header header, String ccc, String nnn,
String xxx, String versions) {
Property newProperty = new Property("STDERR",
- asciiToHex("NORMAL:Adding productId " + ccc + nnn + xxx
- + " versions " + versions));
+ PropConverter.asciiToHex("NORMAL:Adding productId " + ccc + nnn
+ + xxx + " versions " + versions));
Property errProperty = new Property("STDERR",
- asciiToHex("ERROR:Failure adding to versions table."));
+ PropConverter
+ .asciiToHex("ERROR:Failure adding to versions table."));
Property[] props = new Property[] { newProperty, };
if (!textDB.addVersions(ccc, nnn, xxx, Integer.parseInt(versions))) {
@@ -165,10 +169,13 @@ public class VersionsAdapter implements ICommandExecutor {
String vers = textDB.getVersions(ccc, nnn, xxx);
if (vers != null) {
- props = new Property[] { new Property(PROP_FMT, asciiToHex(vers)) };
+ props = new Property[] { new Property(PROP_FMT,
+ PropConverter.asciiToHex(vers)) };
} else {
- props = new Property[] { new Property("STDERR",
- asciiToHex("ERROR:Failure reading versions table.")), };
+ props = new Property[] { new Property(
+ "STDERR",
+ PropConverter
+ .asciiToHex("ERROR:Failure reading versions table.")), };
}
header.setProperties(props);
}
@@ -183,11 +190,11 @@ public class VersionsAdapter implements ICommandExecutor {
private void deleteVersionInfo(Header header, String ccc, String nnn,
String xxx) {
Property newProperty = new Property("STDERR",
- asciiToHex("NORMAL:Deleting product id " + ccc + nnn + xxx
- + " from versionstable."));
+ PropConverter.asciiToHex("NORMAL:Deleting product id " + ccc
+ + nnn + xxx + " from versionstable."));
Property errProperty = new Property("STDERR",
- asciiToHex("ERROR:Failure deleting " + ccc + nnn + xxx
- + " from versionstable."));
+ PropConverter.asciiToHex("ERROR:Failure deleting " + ccc + nnn
+ + xxx + " from versionstable."));
Property[] props = new Property[] { newProperty, };
if (!textDB.deleteVersions(ccc, nnn, xxx)) {
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/WarnTableAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/WarnTableAdapter.java
similarity index 73%
rename from edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/WarnTableAdapter.java
rename to edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/WarnTableAdapter.java
index 4dffa009bb..e6463d4943 100644
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/WarnTableAdapter.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dbsrv/impl/WarnTableAdapter.java
@@ -17,10 +17,8 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
-package com.raytheon.uf.edex.services.textdbimpl;
+package com.raytheon.uf.edex.plugin.text.dbsrv.impl;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.asciiToHex;
-import static com.raytheon.edex.textdb.dbapi.impl.TextDB.getProperty;
import java.util.Collection;
import java.util.List;
@@ -30,17 +28,18 @@ import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.textdb.dbapi.impl.TextDB;
import com.raytheon.uf.common.dataplugin.text.db.WatchWarn;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.ICommandExecutor;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.PropConverter;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.TextDBSrvCommandTags;
+import com.raytheon.uf.common.dataplugin.text.dbsrv.WarnTableTags;
import com.raytheon.uf.common.message.Header;
import com.raytheon.uf.common.message.Message;
import com.raytheon.uf.common.message.Property;
import com.raytheon.uf.edex.core.EDEXUtil;
import com.raytheon.uf.edex.core.EdexException;
-import com.raytheon.uf.edex.services.textdbsrv.ICommandExecutor;
-import com.raytheon.uf.edex.services.textdbsrv.TextDBSrvCommandTags;
-import com.raytheon.uf.edex.services.textdbsrv.WarnTableTags;
/**
- *
+ * Processes warning textdbsrv command messages
*
*
* SOFTWARE HISTORY
@@ -50,6 +49,7 @@ import com.raytheon.uf.edex.services.textdbsrv.WarnTableTags;
* Aug 9,2010 3944 cjeanbap Added logic to delete all records
* from WatchWarn table.
* Sep 14,2010 3944 cjenabap Added sendTextToQueue()
+ * May 15, 2014 2536 bclement moved from uf.edex.textdbsrv
*
*
* @author jkorman
@@ -94,7 +94,7 @@ public class WarnTableAdapter implements ICommandExecutor {
Header sHeader = cmdMessage.getHeader();
// Get the operation code
- String op = getProperty(sHeader,WarnTableTags.OP.name());
+ String op = PropConverter.getProperty(sHeader, WarnTableTags.OP.name());
TextDBSrvCommandTags opTag = TextDBSrvCommandTags.valueOf(op);
@@ -102,8 +102,10 @@ public class WarnTableAdapter implements ICommandExecutor {
switch (opTag) {
case PUT: {
- String productId = getProperty(sHeader,WarnTableTags.PRODID.name());
- String script = getProperty(sHeader,WarnTableTags.SCRIPT.name());
+ String productId = PropConverter.getProperty(sHeader,
+ WarnTableTags.PRODID.name());
+ String script = PropConverter.getProperty(sHeader,
+ WarnTableTags.SCRIPT.name());
addWatchWarn(sHeader, productId, script);
sendTextToQueue(productId, WATCH_WARN_QUEUE);
@@ -111,15 +113,18 @@ public class WarnTableAdapter implements ICommandExecutor {
}
case GET: {
- String productId = getProperty(sHeader,WarnTableTags.PRODID.name());
+ String productId = PropConverter.getProperty(sHeader,
+ WarnTableTags.PRODID.name());
if (productId != null) {
getWatchWarn(sHeader, productId);
}
break;
}
case DELETE: {
- String productId = getProperty(sHeader,WarnTableTags.PRODID.name());
- String script = getProperty(sHeader,WarnTableTags.SCRIPT.name());
+ String productId = PropConverter.getProperty(sHeader,
+ WarnTableTags.PRODID.name());
+ String script = PropConverter.getProperty(sHeader,
+ WarnTableTags.SCRIPT.name());
if ((productId != null) && (script != null)) {
deleteWatchWarn(sHeader, productId, script);
@@ -138,7 +143,8 @@ public class WarnTableAdapter implements ICommandExecutor {
default: {
String tagName = (opTag != null) ? opTag.name() : "null";
Property[] props = new Property[] { new Property("STDERR",
- asciiToHex("ERROR:Invalid command tag = [" + tagName + "]")), };
+ PropConverter.asciiToHex("ERROR:Invalid command tag = ["
+ + tagName + "]")), };
sHeader.setProperties(props);
break;
}
@@ -159,9 +165,11 @@ public class WarnTableAdapter implements ICommandExecutor {
*/
private void addWatchWarn(Header header, String productId, String script) {
Property newProperty = new Property("STDERR",
- asciiToHex("NORMAL:Adding productId " + productId + " to trigger."));
+ PropConverter.asciiToHex("NORMAL:Adding productId " + productId
+ + " to trigger."));
Property errProperty = new Property("STDERR",
- asciiToHex("ERROR:Failure adding to state_ccc table."));
+ PropConverter
+ .asciiToHex("ERROR:Failure adding to state_ccc table."));
Property[] props = new Property[] { newProperty, };
if (!textDB.addWatchWarn(productId, script)) {
@@ -185,15 +193,20 @@ public class WarnTableAdapter implements ICommandExecutor {
if (dataList.size() > 0) {
props = new Property[dataList.size() + 2];
int i = 0;
- props[i] = new Property(PROP_FMT, asciiToHex("PRODUCTID SCRIPT"));
- props[i] = new Property(PROP_FMT, asciiToHex("--------- ------"));
+ props[i] = new Property(PROP_FMT,
+ PropConverter.asciiToHex("PRODUCTID SCRIPT"));
+ props[i] = new Property(PROP_FMT,
+ PropConverter.asciiToHex("--------- ------"));
for (WatchWarn w : dataList) {
- props[i++] = new Property(PROP_FMT, asciiToHex(String.format("%9s %s", w
+ props[i++] = new Property(PROP_FMT,
+ PropConverter.asciiToHex(String.format("%9s %s",
+ w
.getProductid(), w.getScript())));
}
} else {
props = new Property[] { new Property("STDERR",
- asciiToHex("ERROR:Failure reading from watch warn table.")), };
+ PropConverter
+ .asciiToHex("ERROR:Failure reading from watch warn table.")), };
}
header.setProperties(props);
}
@@ -207,9 +220,11 @@ public class WarnTableAdapter implements ICommandExecutor {
*/
private void deleteWatchWarn(Header header, String productId, String script) {
Property newProperty = new Property("STDERR",
- asciiToHex("NORMAL:Deleting product id " + productId + " trigger."));
+ PropConverter.asciiToHex("NORMAL:Deleting product id "
+ + productId + " trigger."));
Property errProperty = new Property("STDERR",
- asciiToHex("ERROR:Failure adding to state_ccc table."));
+ PropConverter
+ .asciiToHex("ERROR:Failure adding to state_ccc table."));
Property[] props = new Property[] { newProperty, };
if (!textDB.deleteWatchWarn(productId, script)) {
diff --git a/edexOsgi/com.raytheon.uf.edex.text.feature/feature.xml b/edexOsgi/com.raytheon.uf.edex.text.feature/feature.xml
index af819da6f6..f8de12083f 100644
--- a/edexOsgi/com.raytheon.uf.edex.text.feature/feature.xml
+++ b/edexOsgi/com.raytheon.uf.edex.text.feature/feature.xml
@@ -29,13 +29,6 @@
version="0.0.0"
unpack="false"/>
-
-
-
-
-
-
-
-
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/.project b/edexOsgi/com.raytheon.uf.edex.textdbsrv/.project
deleted file mode 100644
index 9e06bdd574..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- com.raytheon.uf.edex.textdbsrv
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/com.raytheon.uf.edex.textdbsrv/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f29e672cda..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Thu Mar 26 10:34:04 CDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.textdbsrv/META-INF/MANIFEST.MF
deleted file mode 100644
index 5b483b5b1a..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: textdbsrv
-Bundle-SymbolicName: com.raytheon.uf.edex.textdbsrv
-Bundle-Version: 1.12.1174.qualifier
-Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization
-Bundle-Vendor: RAYTHEON
-Require-Bundle: com.raytheon.edex.common,
- com.raytheon.edex.textdb,
- org.apache.commons.lang,
- com.raytheon.uf.common.status,
- com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
- com.raytheon.uf.common.dataplugin.text,
- com.raytheon.uf.common.site;bundle-version="1.12.1152",
- com.raytheon.uf.common.status
-Export-Package: com.raytheon.uf.edex.services,
- com.raytheon.uf.edex.services.textdbimpl,
- com.raytheon.uf.edex.services.textdbsrv
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: com.raytheon.uf.common.message,
- com.raytheon.uf.common.wmo,
- org.apache.commons.logging
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/build.properties b/edexOsgi/com.raytheon.uf.edex.textdbsrv/build.properties
deleted file mode 100644
index 0aa3712428..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- res/,\
- resources/
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/com.raytheon.uf.edex.textdbsrv.ecl b/edexOsgi/com.raytheon.uf.edex.textdbsrv/com.raytheon.uf.edex.textdbsrv.ecl
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/docs/textdbsrv _interface.doc b/edexOsgi/com.raytheon.uf.edex.textdbsrv/docs/textdbsrv _interface.doc
deleted file mode 100644
index 50495d43a4..0000000000
Binary files a/edexOsgi/com.raytheon.uf.edex.textdbsrv/docs/textdbsrv _interface.doc and /dev/null differ
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/res/spring/textdbsrv-common.xml b/edexOsgi/com.raytheon.uf.edex.textdbsrv/res/spring/textdbsrv-common.xml
deleted file mode 100644
index baaad49afe..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/res/spring/textdbsrv-common.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/res/spring/textdbsrv-request.xml b/edexOsgi/com.raytheon.uf.edex.textdbsrv/res/spring/textdbsrv-request.xml
deleted file mode 100644
index 4608bb9051..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/res/spring/textdbsrv-request.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/TextDBSrvInterface.java b/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/TextDBSrvInterface.java
deleted file mode 100644
index ee175f67ed..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/TextDBSrvInterface.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-package com.raytheon.uf.edex.services;
-
-/**
- * TODO Add Description
- *
- *
- * SOFTWARE HISTORY
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Oct 03, 2008 1538 jkorman Initial implementation
- *
- *
- * @author jkorman
- * @version 1.0
- */
-public interface TextDBSrvInterface {
-
- /**
- *
- * @return
- */
- public String getServiceName();
-
- /**
- * Get a count of messages processed since startup or the last reset.
- *
- * @return Message count.
- */
- public int getMessageCount();
-
- /**
- * Reset the message count to zero.
- */
- public void clearMessageCount();
-
- /**
- * Execute an arbitrary string command..
- *
- * @param command
- * A command to execute.
- */
- public void execute(String command);
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/ICommandTags.java b/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/ICommandTags.java
deleted file mode 100644
index 271f5192af..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbsrv/ICommandTags.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-package com.raytheon.uf.edex.services.textdbsrv;
-
-/**
- * TODO Add Description
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Oct 7, 2008 1538 jkorman Initial creation
- *
- *
- *
- * @author jkorman
- * @version 1.0
- */
-
-public interface ICommandTags {
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/testscript/httprequest.sh b/edexOsgi/com.raytheon.uf.edex.textdbsrv/testscript/httprequest.sh
deleted file mode 100755
index 9267bca9ee..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/testscript/httprequest.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/home/jkorman/awips/bin/python
-##
-# This software was developed and / or modified by Raytheon Company,
-# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
-#
-# U.S. EXPORT CONTROLLED TECHNICAL DATA
-# This software product contains export-restricted data whose
-# export/transfer/disclosure is restricted by U.S. law. Dissemination
-# to non-U.S. persons whether in the United States or abroad requires
-# an export license or other authorization.
-#
-# Contractor Name: Raytheon Company
-# Contractor Address: 6825 Pine Street, Suite 340
-# Mail Stop B8
-# Omaha, NE 68106
-# 402.291.0100
-#
-# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
-# further licensing information.
-##
-
-import httplib
-import sys
-import os
-
-xml = ""
-
-conn = httplib.HTTP("localhost:9581")
-conn.putrequest("POST", "/services/textdbsrv")
-conn.putheader("Content-Type", "text/plain")
-conn.putheader("Content-Length", "%d" % len(xml))
-conn.endheaders()
-conn.send(xml)
-
-# Success/Failure messages
-reply, messages, headers = conn.getreply()
-result = conn.getfile().read()
-conn.close()
-# expect message 200, if not exit
-if reply != 200:
- print reply + " " + messages
- exit (1)
-
-print result
-