gfe, fxa, ufpy, msas cleanup

This commit is contained in:
mjames-upc 2018-12-26 13:50:30 -07:00
parent 9b1402b3ad
commit 5b1667ba09
239 changed files with 3 additions and 23492 deletions

View file

@ -1,9 +0,0 @@
#!/bin/sh
export DISPLAY=":0.0"
export FXA_HOME=/awips2/cave/caveEnvironment
export TMCP_HOME=/awips2/cave/caveEnvironment
$FXA_HOME/bin/MonitorTestMode >& /dev/null &

View file

@ -1,64 +0,0 @@
#!/bin/sh
# determine where the script is being ran from.
path_to_script=`readlink -f $0`
RUN_FROM_DIR=`dirname ${path_to_script}`
BASE_ENV_DIR=`dirname ${RUN_FROM_DIR}`
#DR 18113 rehost. /awips2/fxa/... Has kicked the bit-bucket.
export TMCP_HOME=/awips2/cave/caveEnvironment
export FXA_HOME=/awips2/cave/caveEnvironment
if [ ! -n "${TMCP_HOME}" ]
then
echo -e "\e[1;31mTMCP_HOME is not set.\e[m"
echo -e "\e[0;32mSetting TMCP_HOME to '${BASE_ENV_DIR}'.\e[m"
export TMCP_HOME=${BASE_ENV_DIR}
else
echo "TMCP_HOME is '${TMCP_HOME}'"
fi
if [ ! -n "${FXA_HOME}" ]
then
echo -e "\e[1;31mFXA_HOME is not set.\e[m"
echo -e "\e[0;32mSetting FXA_HOME to '${BASE_ENV_DIR}'.\e[m"
export FXA_HOME=${BASE_ENV_DIR}
else
echo "FXA_HOME is '${FXA_HOME}'"
fi
# determine if 'FXA_WARNGEN_PRODUCT_ID' needs to be set
HOST=`uname -n`
TMP_HOST_NUMBER=`uname -n | awk '{print substr($1, 3, 1);}'`
ALT_HOST_PART=`uname -n | awk '{print substr($1, 3, length($1) - 1);}'`
ALT_HOST="xt"${ALT_HOST_PART}
ping -c 1 -w 1 ${ALT_HOST} >/dev/null 2>/dev/null
RC=`echo $?`
if [ "${RC}" = "0" ]
then
if [ ! -n "${FXA_WARNGEN_PRODUCT_ID}" ]
then
echo -e "\e[1;31mFXA_WARNGEN_PRODUCT_ID is not set.\e[m"
echo -e "\e[0;32mSetting FXA_WARNGEN_PRODUCT_ID to '${TMP_HOST_NUMBER}'.\e[m"
export FXA_WARNGEN_PRODUCT_ID=${TMP_HOST_NUMBER}
else
echo "FXA_WARNGEN_PRODUCT_ID is '${FXA_WARNGEN_PRODUCT_ID}'."
fi
else
echo -e "\e[1;31mPartner host \""${ALT_HOST}"\" is unreachable by network!\e[m"
echo ${ALT_HOME}
echo
fi
export LD_LIBRARY_PATH=$TMCP_HOME/lib:$LD_LIBRARY_PATH
# for TMCP logs
if [ ! -d $HOME/caveData/tmcpLogs ]; then
mkdir -p $HOME/caveData/tmcpLogs
fi
export LOG_DIR=$HOME/caveData/tmcpLogs
$TMCP_HOME/bin/tmcp

View file

@ -1,10 +0,0 @@
#!/bin/sh
export DISPLAY=:0.0
export FXA_HOME=/awips2/cave/caveEnvironment
if [ $6 = "kde" ]
then
kstart --alldesktops $FXA_HOME/bin/showBanner $2 $3 $4 $5 &
else
$FXA_HOME/bin/showBanner $2 $3 $4 $5 &
fi

View file

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>build.wes2bridge.utility</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

View file

@ -1,49 +0,0 @@
<project basedir=".">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<!-- The directory that the jar file will be placed in when it is finished. -->
<property name="destination.directory" value="" />
<!-- The location of uframe-eclipse. -->
<property name="eclipse.directory" value="" />
<!-- The location of the awips2 baseline. -->
<property name="baseline.dir" value="" />
<!-- Verify the destination directory has been provided. -->
<if>
<equals arg1="${destination.directory}" arg2="" />
<then>
<fail message="Error: a destination directory has not been specified." />
</then>
</if>
<!-- Verify the an eclipse directory has been provided. -->
<if>
<equals arg1="${eclipse.directory}" arg2="" />
<then>
<fail message="Error: an eclipse directory has not been specified." />
</then>
</if>
<!-- Verify the awips2 baseline directory has been provided. -->
<if>
<equals arg1="${baseline.dir}" arg2="" />
<then>
<fail message="Error: a awips2 baseline directory has not been specified." />
</then>
</if>
<target name="extract_eclipse_jar_in_jar">
<mkdir dir="${baseline.dir}/${project.name}/lib" />
<unzip
dest="${baseline.dir}/${project.name}/lib"
overwrite="true">
<fileset dir="${eclipse.directory}/plugins">
<include name="org.eclipse.jdt.ui_*.jar" />
</fileset>
<patternset>
<include name="jar-in-jar-loader.zip" />
</patternset>
</unzip>
</target>
</project>

View file

@ -1,28 +0,0 @@
# Wes2Bridge Utility pde build properties.
product=/com.raytheon.wes2bridge.utility.product/wes2bridge.utility.product
topLevelElementType=feature
buildType=I
buildId=Wes2Bridge
buildLabel=${buildType}.${buildId}
timestamp=007
archivePrefix=wes2bridge
archivesFormat=linux, gtk, x86 - folder
collectingFolder=${archivePrefix}
runPackager=false
skipBase=true
skipFetch=true
skipMaps=true
baseos=linux
basews=gtk
basearch=x86
logExtension=.log
javacDebugInfo=false
javacFailOnError=true
javacVerbose=true
javacSource=1.8
javacTarget=1.8
compilerArg=-g:lines,source

View file

@ -1,195 +0,0 @@
<project name="Build specific targets and properties" default="noDefault">
<!-- ===================================================================== -->
<!-- Run a given ${target} on all elements being built -->
<!-- Add on <ant> task for each top level element being built. -->
<!-- ===================================================================== -->
<property name="allElementsFile" value="${builder}/allElements.xml"/>
<import file="${allElementsFile}" />
<target name="allElements">
<antcall target="allElementsDelegator" />
</target>
<!-- ===================================================================== -->
<!-- ===================================================================== -->
<target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
<get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" />
<unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" />
</target>
<target name="checkLocalBase">
<available file="${base}" property="skipBase" />
</target>
<!-- ===================================================================== -->
<!-- Check out map files from correct repository -->
<!-- Replace values for mapsCheckoutTag as desired. -->
<!-- ===================================================================== -->
<target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
</target>
<target name="checkLocalMaps">
</target>
<target name="tagMapFiles" if="tagMaps">
</target>
<!-- ===================================================================== -->
<target name="clean" unless="noclean">
<antcall target="allElements">
<param name="target" value="cleanElement" />
</antcall>
</target>
<target name="gatherLogs">
<mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
<antcall target="allElements">
<param name="target" value="gatherLogs" />
</antcall>
<unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
<fileset dir="${buildDirectory}/features">
<include name="**/*.log.zip" />
</fileset>
</unzip>
</target>
<!-- ===================================================================== -->
<!-- Steps to do before setup -->
<!-- ===================================================================== -->
<target name="preSetup">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after setup but before starting the build proper -->
<!-- ===================================================================== -->
<target name="postSetup">
<echo message="${buildDirectory}"/>
<mkdir dir="${buildDirectory}/plugins"/>
<echo message="com.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="com.*/**"/>
</copy>
<echo message="org.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="org.*/**"/>
</copy>
<echo message="ch.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ch.*/**"/>
</copy>
<echo message="javax.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="javax.*/**"/>
</copy>
<echo message="features.*/**"/>
<copy todir="${buildDirectory}/features">
<fileset dir="${buildDirectory}/../../../" includes="*.feature*/**"/>
</copy>
<antcall target="getBaseComponents" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do before fetching the build elements -->
<!-- ===================================================================== -->
<target name="preFetch">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after fetching the build elements -->
<!-- ===================================================================== -->
<target name="postFetch">
</target>
<!-- ===================================================================== -->
<!-- Steps to do before generating the build scripts. -->
<!-- ===================================================================== -->
<target name="preGenerate">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after generating the build scripts. -->
<!-- ===================================================================== -->
<target name="postGenerate">
<antcall target="clean" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do before running the build.xmls for the elements being built. -->
<!-- ===================================================================== -->
<target name="preProcess">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running the build.xmls for the elements being built. -->
<!-- ===================================================================== -->
<target name="postProcess">
</target>
<!-- ===================================================================== -->
<!-- Steps to do before running assemble. -->
<!-- ===================================================================== -->
<target name="preAssemble">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running assemble. -->
<!-- ===================================================================== -->
<target name="postAssemble">
</target>
<!-- ===================================================================== -->
<!-- Steps to do before running package. -->
<!-- ===================================================================== -->
<target name="prePackage">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running package. -->
<!-- ===================================================================== -->
<target name="postPackage">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after the build is done. -->
<!-- ===================================================================== -->
<target name="postBuild">
</target>
<!-- ===================================================================== -->
<!-- Steps to do to test the build results -->
<!-- ===================================================================== -->
<target name="test">
<ant antfile="${builder}/test.xml" />
</target>
<target name="checkJUnitTestResults">
<taskdef name="checkJUnitReports" classname="sample.tools.TestResultCheck" classpath="${builder}/bin;${builder}/extraTools/sampletools.jar" />
<checkJUnitReports dir="${buildDirectory}/${buildLabel}/testresults" output="${buildDirectory}/junitresults.txt" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do to publish the build results -->
<!-- ===================================================================== -->
<target name="publish">
</target>
<!-- ===================================================================== -->
<!-- Default target -->
<!-- ===================================================================== -->
<target name="noDefault">
<echo message="You must specify a target when invoking this file" />
</target>
</project>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.wes2bridge.common</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -1,8 +0,0 @@
#Thu Jan 12 13:45:52 CST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
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

View file

@ -1,9 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wes2Bridge Utility Common
Bundle-SymbolicName: com.raytheon.wes2bridge.common
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.raytheon.wes2bridge.common.configuration,
com.raytheon.wes2bridge.configuration.jaxb

View file

@ -1,4 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_jar" name="Create com.raytheon.wes2bridge.common.jar.">
<import file="${basedir}/../build.wes2bridge.utility/ant/setup.xml" />
<property name="project.name" value="com.raytheon.wes2bridge.common" />
<target name="compile">
<mkdir dir="${baseline.dir}/${project.name}/bin" />
<javac destdir="${baseline.dir}/${project.name}/bin"
srcdir="${baseline.dir}/${project.name}/src"
executable="/awips2/java/bin/javac" fork="true"
includeantruntime="false">
<include name="**/*.java" />
</javac>
</target>
<target name="create_jar" depends="compile">
<jar destfile="${destination.directory}/${project.name}.jar"
manifest="${baseline.dir}/${project.name}/META-INF/MANIFEST.MF">
<fileset dir="${baseline.dir}/${project.name}/bin" />
</jar>
</target>
</project>

View file

@ -1,198 +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.wes2bridge.common.configuration;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* Represents a Wes2Bridge test case that will be used to configure a new edex
* environment.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 12, 2014 3521 bkowal Initial creation
* Apr 20, 2015 4392 dlovely Removed un-used JMX port configuration
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
@XmlRootElement(name = "Wes2BridgeCase")
@XmlAccessorType(XmlAccessType.NONE)
public class Wes2BridgeCase {
@XmlElement
private String name;
@XmlElement
private String dataArchiveRoot;
@XmlElement
private int databasePort;
@XmlElement
private int edexHttpPort;
@XmlElement
private int qpidHttpPort;
@XmlElement
private int jmsPort;
@XmlElement
private int httpdPypiesPort;
@XmlElement
private int pypiesLoggingPort;
/**
*
*/
public Wes2BridgeCase() {
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name
* the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the dataArchiveRoot
*/
public String getDataArchiveRoot() {
return dataArchiveRoot;
}
/**
* @param dataArchiveRoot
* the dataArchiveRoot to set
*/
public void setDataArchiveRoot(String dataArchiveRoot) {
this.dataArchiveRoot = dataArchiveRoot;
}
/**
* @return the databasePort
*/
public int getDatabasePort() {
return databasePort;
}
/**
* @param databasePort
* the databasePort to set
*/
public void setDatabasePort(int databasePort) {
this.databasePort = databasePort;
}
/**
* @return the edexHttpPort
*/
public int getEdexHttpPort() {
return edexHttpPort;
}
/**
* @param edexHttpPort
* the edexHttpPort to set
*/
public void setEdexHttpPort(int edexHttpPort) {
this.edexHttpPort = edexHttpPort;
}
/**
* @return the qpidHttpPort
*/
public int getQpidHttpPort() {
return qpidHttpPort;
}
/**
* @param qpidHttpPort
* the qpidHttpPort to set
*/
public void setQpidHttpPort(int qpidHttpPort) {
this.qpidHttpPort = qpidHttpPort;
}
/**
* @return the jmsPort
*/
public int getJmsPort() {
return jmsPort;
}
/**
* @param jmsPort
* the jmsPort to set
*/
public void setJmsPort(int jmsPort) {
this.jmsPort = jmsPort;
}
/**
* @return the httpdPypiesPort
*/
public int getHttpdPypiesPort() {
return httpdPypiesPort;
}
/**
* @param httpdPypiesPort
* the httpdPypiesPort to set
*/
public void setHttpdPypiesPort(int httpdPypiesPort) {
this.httpdPypiesPort = httpdPypiesPort;
}
/**
* @return the pypiesLoggingPort
*/
public int getPypiesLoggingPort() {
return pypiesLoggingPort;
}
/**
* @param pypiesLoggingPort
* the pypiesLoggingPort to set
*/
public void setPypiesLoggingPort(int pypiesLoggingPort) {
this.pypiesLoggingPort = pypiesLoggingPort;
}
}

View file

@ -1,58 +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.wes2bridge.configuration.jaxb;
import java.io.File;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import com.raytheon.wes2bridge.common.configuration.Wes2BridgeCase;
/**
* Uses jaxb to convert Wes2Bridge configuration in XML format to a Java POJO.
*
* <pre>
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 12, 2014 3521 bkowal Initial creation
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
public class Wes2BridgeJaxbManager {
/**
*
*/
protected Wes2BridgeJaxbManager() {
}
public static Wes2BridgeCase toWes2BridgeCase(File wes2bridgeXMLFile)
throws JAXBException {
JAXBContext jaxbContext = JAXBContext.newInstance(Wes2BridgeCase.class);
return (Wes2BridgeCase) jaxbContext.createUnmarshaller().unmarshal(
wes2bridgeXMLFile);
}
}

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.wes2bridge.configuration</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -1,8 +0,0 @@
#Thu Jan 12 14:09:44 CST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
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

View file

@ -1,8 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wes2Bridge Configuration Utility
Bundle-SymbolicName: com.raytheon.wes2bridge.configuration
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: com.raytheon.wes2bridge.common;bundle-version="1.0.0"

View file

@ -1,4 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar"
name="Create Runnable Jar for Project com.raytheon.wes2bridge.configuration with Jar-in-Jar Loader"
basedir=".">
<import file="${basedir}/../build.wes2bridge.utility/ant/setup.xml" />
<property name="project.name" value="com.raytheon.wes2bridge.configuration" />
<path id="WES2BRIDGE.classpath">
<pathelement path="${destination.directory}/com.raytheon.wes2bridge.common.jar" />
</path>
<target name="compile">
<mkdir dir="${baseline.dir}/${project.name}/bin" />
<javac destdir="${baseline.dir}/${project.name}/bin"
srcdir="${baseline.dir}/${project.name}/src"
executable="/awips2/java/bin/javac" fork="true"
includeantruntime="false"
classpathref="WES2BRIDGE.classpath">
<include name="**/*.java" />
</javac>
</target>
<target name="create_run_jar" depends="compile">
<antcall target="extract_eclipse_jar_in_jar" />
<jar destfile="${destination.directory}/ConfigurationUtility.jar">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.configuration.ConfigurationUtility"/>
<attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./ com.raytheon.wes2bridge.common.jar"/>
</manifest>
<zipfileset src="${baseline.dir}/${project.name}/lib/jar-in-jar-loader.zip"/>
<zipfileset dir="${destination.directory}" includes="com.raytheon.wes2bridge.common.jar"/>
<fileset dir="${baseline.dir}/${project.name}/bin"/>
</jar>
</target>
</project>

View file

@ -1,77 +0,0 @@
/**
*
*/
package com.raytheon.wes2bridge.configuration;
import java.io.File;
import javax.xml.bind.JAXBException;
import com.raytheon.wes2bridge.common.configuration.Wes2BridgeCase;
import com.raytheon.wes2bridge.configuration.jaxb.Wes2BridgeJaxbManager;
/**
* A command line utility that can be used to retrieve individual values from configuration.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ? ? bkowal Initial Creation.
* Aug 14, 2014 3521 bkowal Updated to use Wes2BridgeCase.
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
public class ConfigurationUtility {
private static final String FIELD_NAME = "-name";
private static final String FIELD_ARCHIVE = "-archiveRoot";
private static final String FIELD_DBPORT = "-databasePort";
private static final String FIELD_HTTPPORT = "-httpPort";
private static final String FIELD_JMSPORT = "-jmsPort";
/**
* @param args
*/
public static void main(String[] args) {
if (args.length != 2) {
System.out
.println("Error: both a configuration file and a field must be specified.");
System.exit(-1);
}
Wes2BridgeCase wes2BridgeCase = null;
try {
wes2BridgeCase = Wes2BridgeJaxbManager.toWes2BridgeCase(new File(
args[0]));
} catch (JAXBException e) {
e.printStackTrace();
System.out
.println("FAILED TO READ THE SPECIFIED CONFIGURATION FILE: "
+ args[0] + "!");
System.exit(-1);
}
final String field = args[1];
if (field.equals(FIELD_NAME)) {
System.out.print(wes2BridgeCase.getName());
} else if (field.equals(FIELD_ARCHIVE)) {
System.out.print(wes2BridgeCase.getDataArchiveRoot());
} else if (field.equals(FIELD_DBPORT)) {
System.out.print(wes2BridgeCase.getDatabasePort());
} else if (field.equals(FIELD_HTTPPORT)) {
System.out.print(wes2BridgeCase.getEdexHttpPort());
} else if (field.equals(FIELD_JMSPORT)) {
System.out.print(wes2BridgeCase.getJmsPort());
}
System.exit(0);
}
}

View file

@ -1,6 +0,0 @@
log4j.rootLogger=ERROR, CA
log4j.appender.CA=org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.wes2bridge.datalink</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -1,8 +0,0 @@
#Thu Jan 12 13:58:47 CST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
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

View file

@ -1,7 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wes2Bridge Datalink Utility
Bundle-SymbolicName: com.raytheon.wes2bridge.datalink
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.8

View file

@ -1,4 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar"
name="Create Runnable Jar for Project com.raytheon.wes2bridge.datalink with Jar-in-Jar Loader"
basedir=".">
<import file="${basedir}/../build.wes2bridge.utility/ant/setup.xml" />
<property name="project.name" value="com.raytheon.wes2bridge.datalink" />
<target name="compile">
<mkdir dir="${baseline.dir}/${project.name}/bin" />
<javac destdir="${baseline.dir}/${project.name}/bin"
srcdir="${baseline.dir}/${project.name}/src"
executable="/awips2/java/bin/javac" fork="true"
includeantruntime="false">
<include name="**/*.java" />
</javac>
</target>
<target name="create_run_jar" depends="compile">
<antcall target="extract_eclipse_jar_in_jar" />
<jar destfile="${destination.directory}/DataLinkUtility.jar">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.datalink.DataLinkUtility"/>
<attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./"/>
</manifest>
<zipfileset src="${baseline.dir}/${project.name}/lib/jar-in-jar-loader.zip"/>
<fileset dir="${baseline.dir}/${project.name}/bin"/>
</jar>
</target>
</project>

View file

@ -1,34 +0,0 @@
/**
*
*/
package com.raytheon.wes2bridge.datalink;
/**
* @author bkowal
*
* This is an extremely simple utility. This program
* expects on argument: a postgresql database directory.
* This utility will then extract the "/awips2/database/data" and
* return only the name of the database directory.
*/
public class DataLinkUtility
{
private static final String AWIPSII_DATA = "/awips2/database/data/";
/**
* @param args
*/
public static void main(String[] args)
{
if (args.length != 1)
{
System.out.print("Error: The name of the data directory must be specified.");
System.exit(-1);
}
String dataDirectory = args[0];
System.out.print(dataDirectory.replace(AWIPSII_DATA, ""));
System.exit(0);
}
}

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.wes2bridge.manager</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -1,10 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wes2Bridge Manager
Bundle-SymbolicName: com.raytheon.wes2bridge.manager
Bundle-Version: 1.16.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: com.raytheon.wes2bridge.common;bundle-version="1.0.0",
org.apache.commons.lang3,
com.fasterxml.jackson;bundle-version="2.6.5"

View file

@ -1,4 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar"
name="Create Runnable Jar for Project com.raytheon.wes2bridge.manager with Jar-in-Jar Loader"
basedir=".">
<import file="${basedir}/../build.wes2bridge.utility/ant/setup.xml" />
<property name="project.name" value="com.raytheon.wes2bridge.manager" />
<path id="WES2BRIDGE.classpath">
<pathelement path="${destination.directory}/com.raytheon.wes2bridge.common.jar" />
<fileset dir="${baseline.dir}/com.fasterxml.jackson">
<include name="**/*.jar" />
<exclude name="**/*sources.jar" />
</fileset>
<fileset dir="${baseline.dir}/org.apache.commons.lang3">
<include name="**/*.jar" />
</fileset>
</path>
<pathconvert property="manifest.classpath" pathsep=" ">
<path refid="WES2BRIDGE.classpath"/>
<mapper>
<chainedmapper>
<flattenmapper/>
</chainedmapper>
</mapper>
</pathconvert>
<target name="compile">
<mkdir dir="${baseline.dir}/${project.name}/bin" />
<javac destdir="${baseline.dir}/${project.name}/bin"
srcdir="${baseline.dir}/${project.name}/src"
executable="/awips2/java/bin/javac" fork="true"
includeantruntime="false"
classpathref="WES2BRIDGE.classpath">
<include name="**/*.java" />
</javac>
</target>
<target name="create_run_jar" depends="compile">
<antcall target="extract_eclipse_jar_in_jar" />
<jar destfile="${destination.directory}/Wes2BridgeManager.jar">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.manager.Wes2BridgeManager"/>
<attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./ ${manifest.classpath}"/>
</manifest>
<zipfileset src="${baseline.dir}/${project.name}/lib/jar-in-jar-loader.zip"/>
<zipfileset dir="${destination.directory}" includes="com.raytheon.wes2bridge.common.jar"/>
<zipfileset dir="${baseline.dir}/com.fasterxml.jackson" includes="*.jar"
excludes="*sources.jar" />
<zipfileset dir="${baseline.dir}/org.apache.commons.lang3" includes="*.jar"
excludes="*sources.jar" />
<fileset dir="${baseline.dir}/${project.name}/bin"/>
</jar>
</target>
</project>

View file

@ -1,685 +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.wes2bridge.manager;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.BufferedReader;
import java.io.FileWriter;
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import javax.xml.bind.JAXBException;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.raytheon.wes2bridge.common.configuration.Wes2BridgeCase;
import com.raytheon.wes2bridge.configuration.jaxb.Wes2BridgeJaxbManager;
/**
* This java-based utility is used to update a wes2bridge environment. This
* utility is invoked by the wes2bridge management script (bash) after the
* management script spawns a new edex, database, qpid, pypies. Only "base"
* files are updated based on the configuration file. The new wes2bridge
* environment will still need to be localized.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 18, 2012 1490 bkowal Pypies is now added to each
* edex-environment instance
* Apr 18, 2013 1899 bkowal Updates qpid 0.18 configuration now.
* July 2, 2013 2133 bkowal Updates for yajsw-wrapped qpid
* Dec 11, 2013 2182 bkowal Update the postgresql port in
* postgresql.conf instead of the
* postgresql startup scripts
* Aug 14, 2014 3521 bkowal Updated to use Wes2BridgeCase. Eliminated
* configuration that is no longer used and
* updated EDEX re-configuration.
* Apr 15, 2015 4392 dlovely Updates the new qpid json configuration now
* Apr 20, 2015 4392 dlovely Removed un-used JMX port configuration
* Nov 12, 2015 5121 bkowal Write Java, Python, and PSQL locations to
* setup.env to override the default locations.
* Mar 07, 2016 5067 bkowal Update to use fasterxml jackson.
* Jul 06, 2016 5734 bkowal Update edex_camel pid lookup match text.
* </pre>
*
* @author bkowal
* @version 1.0
*/
public class Wes2BridgeManager {
private static final String AWIPSII = "/awips2";
private static final String AWIPSII_WES2BRIDGE_SCRIPTS = AWIPSII
+ "/edex-environment/scripts";
private static final String WES2BRIDGE_DIRECTORY = "/usr/local/edex-environment";
private static final int GROUP_INDEX_ONE = 1;
private static final int GROUP_INDEX_TWO = 2;
private static final int EXIT_FAILURE = -1;
private static final int EXIT_SUCCESS = 0;
private static final String DEFAULT_HDF5_DIRECTORY = "/edex/data/hdf5";
private Wes2BridgeCase wes2BridgeCase;
private String wes2BridgeScripts = null;
private static final TypeReference<Map<String, Object>> MAP_TYPE_REFERENCE = new TypeReference<Map<String, Object>>() {
};
public static final String QPID_NAME = "name";
public static final String QPID_AMQP = "AMQP";
public static final String QPID_HTTP = "HTTP";
public static final String QPID_PORT = "port";
public static final String QPID_PORTS = "ports";
public Wes2BridgeManager() {
}
/**
* @param args
*/
public static void main(String[] args) {
if (args.length != 1) {
System.out
.println("ERROR: The configuration file has not been specified.");
System.exit(EXIT_FAILURE);
}
Wes2BridgeManager manager = new Wes2BridgeManager();
try {
manager.init(args[0]);
} catch (Exception e1) {
e1.printStackTrace();
System.exit(EXIT_FAILURE);
}
try {
manager.reconfigureEdex();
} catch (Exception e1) {
e1.printStackTrace();
System.exit(EXIT_FAILURE);
}
try {
manager.reconfigurePostgreSQL();
} catch (Exception e1) {
e1.printStackTrace();
System.exit(EXIT_FAILURE);
}
try {
manager.reconfigureQPID();
} catch (Exception e1) {
e1.printStackTrace();
System.exit(EXIT_FAILURE);
}
try {
manager.reconfigurePypies();
} catch (Exception e1) {
e1.printStackTrace();
System.exit(EXIT_FAILURE);
}
System.exit(EXIT_SUCCESS);
}
public void init(String arg1) throws JAXBException {
this.wes2BridgeCase = Wes2BridgeJaxbManager.toWes2BridgeCase(new File(
arg1));
this.wes2BridgeScripts = WES2BRIDGE_DIRECTORY + "/"
+ this.wes2BridgeCase.getName() + "/" + "edex-environment";
}
/*
* Updates setup.env and wrapper.conf.
*/
public void reconfigureEdex() throws FileNotFoundException, IOException {
final String srcEdexDirectory = AWIPSII + "/" + "edex";
final String edexDirectory = WES2BRIDGE_DIRECTORY + "/"
+ this.wes2BridgeCase.getName() + "/" + "edex";
this.updateEdexSetup(srcEdexDirectory, edexDirectory);
this.updateEdexWrapper(srcEdexDirectory, edexDirectory);
this.updateEdexCamel(edexDirectory);
}
private void updateEdexSetup(String srcEdexDirectory, String edexDirectory)
throws FileNotFoundException, IOException, IllegalStateException {
String srcsetup_env = srcEdexDirectory + "/bin/setup.env";
String setup_env = edexDirectory + "/bin/setup.env";
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = this.getBufferedReader(srcsetup_env);
bw = this.getBufferedWriter(setup_env);
final String line1 = "export DATA_ARCHIVE_ROOT=";
final String line2 = "export DB_PORT=";
final String line3 = "export BROKER_PORT=";
final String line4 = "export HTTP_PORT=";
final String line5 = "export BROKER_HTTP=";
final String line6 = "export SHARE_DIR=";
final String pypiesServerPattern = "(export PYPIES_SERVER=http://.+:)[1-9][0-9]+";
final Pattern pattern7 = Pattern.compile(pypiesServerPattern);
String line = StringUtils.EMPTY;
while ((line = br.readLine()) != null) {
Matcher matcher = pattern7.matcher(line);
if (line.startsWith(line1)) {
line = line1 + this.wes2BridgeCase.getDataArchiveRoot();
} else if (line.startsWith(line2)) {
line = line2 + this.wes2BridgeCase.getDatabasePort();
} else if (line.startsWith(line3)) {
line = line3 + this.wes2BridgeCase.getJmsPort();
} else if (line.startsWith(line4)) {
line = line4 + this.wes2BridgeCase.getEdexHttpPort();
} else if (line.startsWith(line5)) {
line = line5 + this.wes2BridgeCase.getQpidHttpPort();
} else if (line.startsWith(line6)) {
line = line6 + edexDirectory + "/data/share";
} else if (matcher.matches()) {
line = matcher.group(GROUP_INDEX_ONE)
+ this.wes2BridgeCase.getHttpdPypiesPort();
}
bw.write(line + "\n");
}
/*
* Need to overwrite the Java, Python, and PSQL locations using
* setup.env ever since edex_camel was updated to use a login shell
* to run the EDEX start.sh script.
*/
bw.write("export JAVA_INSTALL=/awips2/java\n");
bw.write("export PYTHON_INSTALL=/awips2/python\n");
bw.write("export PSQL_INSTALL=/awips2/psql\n");
} finally {
br.close();
bw.close();
}
}
/* Disable JMX. */
private void updateEdexWrapper(String srcEdexDirectory, String edexDirectory)
throws FileNotFoundException, IOException {
String srcwrapper_conf = srcEdexDirectory + "/conf/wrapper.conf";
String wrapper_conf = edexDirectory + "/conf/wrapper.conf";
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = this.getBufferedReader(srcwrapper_conf);
bw = this.getBufferedWriter(wrapper_conf);
/*
* Add a new wes2bridge.instance JVM argument so that it will be
* possible to determine which edex instance belongs to which test
* case.
*/
int javaAdditionalMax = 0;
final String line1 = "wrapper.jvm.parameter.order.2=-Daw.site.identifier";
final String javaAdditionalPatternRegex = "wrapper\\.java\\.additional\\.([0-9]+)=.+";
final Pattern javaAdditionalPattern = Pattern
.compile(javaAdditionalPatternRegex);
String line = StringUtils.EMPTY;
while ((line = br.readLine()) != null) {
Matcher matcher = javaAdditionalPattern.matcher(line);
if (matcher.matches()) {
/* Guaranteed to be numeric based on the regex */
int javaAdditional = Integer.parseInt(matcher.group(1));
if (javaAdditional > javaAdditionalMax) {
javaAdditionalMax = javaAdditional;
}
}
if (line.equals(line1)) {
bw.write(line + "\n");
/*
* Ensure that the wes2bridge test name will be third in the
* list of jvm arguments.
*/
line = "wrapper.jvm.parameter.order.3=-Dwes2bridge.instance";
}
bw.write(line + "\n");
}
/*
* add the additional JVM argument.
*/
++javaAdditionalMax;
String jvmArg = "wrapper.java.additional." + javaAdditionalMax
+ "=-Dwes2bridge.instance=" + this.wes2BridgeCase.getName();
bw.write(jvmArg);
} finally {
br.close();
bw.close();
}
}
private void updateEdexCamel(String edexDirectory)
throws FileNotFoundException, IOException {
final String srcedex_camel = AWIPSII_WES2BRIDGE_SCRIPTS + "/"
+ "edex_camel";
final String edex_camel = this.wes2BridgeScripts + "/edex_camel";
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = this.getBufferedReader(srcedex_camel);
bw = this.getBufferedWriter(edex_camel);
final String line1 = "export EDEX_INSTALL=";
final String line2 = "export DATA_ARCHIVE_ROOT=";
final String line3 = "CAMELPROCESS=`ps -ef | grep \"aw.site.identifier\"|grep -c \"edex.run.mode=${1} \" `";
final String line4 = "_camel_pid=`pgrep -f -u $EDEXUSER \"java -Dedex.run.mode=${1} \"`";
String line = StringUtils.EMPTY;
while ((line = br.readLine()) != null) {
if (line.trim().startsWith(line1)) {
line = line1 + edexDirectory;
} else if (line.trim().startsWith(line2)) {
line = line2 + this.wes2BridgeCase.getDataArchiveRoot();
} else if (line.trim().startsWith(line3)) {
line = "CAMELPROCESS=`ps -ef | "
+ "grep \"wes2bridge.instance="
+ this.wes2BridgeCase.getName() + "\" | "
+ "grep -c \"edex.run.mode=${1} \" `";
} else if (line.trim().startsWith(line4)) {
line = "_camel_pid=`pgrep -f \"java.*-Dedex.run.mode=${1} -Daw.site.identifier=.+ -Dwes2bridge.instance="
+ this.wes2BridgeCase.getName() + " \"`";
}
bw.write(line + "\n");
}
} finally {
br.close();
bw.close();
}
}
public void reconfigurePostgreSQL() throws FileNotFoundException,
IOException {
final String postgresqlRootDirectory = WES2BRIDGE_DIRECTORY
+ File.separator + this.wes2BridgeCase.getName();
final String srcDataDirectory = AWIPSII + File.separator + "data";
this.updateEdexPostgres(postgresqlRootDirectory);
this.updatePostgresqlConf(srcDataDirectory);
}
private void updateEdexPostgres(String postgresqlRootDirectory)
throws FileNotFoundException, IOException {
final String srcedex_postgres = AWIPSII_WES2BRIDGE_SCRIPTS + "/"
+ "edex_postgres";
final String edex_postgres = this.wes2BridgeScripts + "/edex_postgres";
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = this.getBufferedReader(srcedex_postgres);
bw = this.getBufferedWriter(edex_postgres);
final String line1 = "POSTGRESQL_INSTALL_ROOT=";
String line = StringUtils.EMPTY;
while ((line = br.readLine()) != null) {
if (line.startsWith(line1)) {
line = line1 + postgresqlRootDirectory;
}
bw.write(line + "\n");
}
} finally {
br.close();
bw.close();
}
}
private void updatePostgresqlConf(String srcDataDirectory)
throws FileNotFoundException, IOException {
final String postgresqlConf = "postgresql.conf";
final String srcPostgresqlConf = srcDataDirectory + File.separator
+ postgresqlConf;
final String destPostgresqlConf = WES2BRIDGE_DIRECTORY + File.separator
+ this.wes2BridgeCase.getName() + File.separator + "data"
+ File.separator + postgresqlConf;
final String regex1 = "^(port = )([0-9]+)(.+)";
final Pattern pattern1 = Pattern.compile(regex1);
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = this.getBufferedReader(srcPostgresqlConf);
bw = this.getBufferedWriter(destPostgresqlConf);
String line = StringUtils.EMPTY;
// only used once - clearing it will not be necessary
StringBuilder stringBuilder = new StringBuilder();
while ((line = br.readLine()) != null) {
Matcher matcher = pattern1.matcher(line);
if (matcher.matches()) {
stringBuilder.append(matcher.group(1));
stringBuilder.append(this.wes2BridgeCase.getDatabasePort());
stringBuilder.append(matcher.group(3));
line = stringBuilder.toString();
}
bw.write(line + "\n");
}
} finally {
br.close();
bw.close();
}
}
public void reconfigureQPID() throws FileNotFoundException, IOException {
final String srcQpidDirectory = AWIPSII + "/" + "qpid";
final String qpidDirectory = WES2BRIDGE_DIRECTORY + "/"
+ this.wes2BridgeCase.getName() + "/" + "qpid";
this.updateQpidConfigJSON(srcQpidDirectory, qpidDirectory);
this.updateQPIDD(qpidDirectory);
}
/* Updates qpid config.json */
private void updateQpidConfigJSON(String srcQpidDirectory,
String qpidDirectory) throws FileNotFoundException, IOException {
String srcconfig_json = srcQpidDirectory + "/config.json";
String config_json = qpidDirectory + "/config.json";
try (BufferedWriter bw = this.getBufferedWriter(config_json);) {
List<String> lines = Files.readAllLines(Paths.get(srcconfig_json),
Charset.defaultCharset());
StringBuilder stringBuilder = new StringBuilder();
for (String line : lines) {
stringBuilder.append(line);
}
ObjectMapper mapper = new ObjectMapper();
Map<String, Object> attributesMap = mapper.readValue(
stringBuilder.toString(), MAP_TYPE_REFERENCE);
@SuppressWarnings("unchecked")
ArrayList<Object> ports = (ArrayList<Object>) attributesMap
.get(QPID_PORTS);
for (int x = 0; x < ports.size(); x++) {
@SuppressWarnings("unchecked")
Map<String, Object> port = (Map<String, Object>) ports.get(x);
String name = (String) port.get(QPID_NAME);
if (QPID_AMQP.equals(name)) {
port.put(QPID_PORT, this.wes2BridgeCase.getJmsPort());
} else if (QPID_HTTP.equals(name)) {
port.put(QPID_PORT, this.wes2BridgeCase.getQpidHttpPort());
}
}
/*
* Write the updated configuration file to its destination.
*/
mapper.writerWithDefaultPrettyPrinter().writeValue(bw,
attributesMap);
}
}
private void updateQPIDD(String qpidDirectory)
throws FileNotFoundException, IOException {
final String srcqpidd = AWIPSII_WES2BRIDGE_SCRIPTS + "/" + "qpidd";
final String qpidd = this.wes2BridgeScripts + "/qpidd";
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = this.getBufferedReader(srcqpidd);
bw = this.getBufferedWriter(qpidd);
final String line1 = "QPID_HOME=";
String line = StringUtils.EMPTY;
while ((line = br.readLine()) != null) {
if (line.startsWith(line1)) {
line = line1 + qpidDirectory;
}
bw.write(line + "\n");
}
} finally {
br.close();
bw.close();
}
}
/*
* This method will: 1) update pypies.cfg 2) update httpd.conf
*/
public void reconfigurePypies() throws FileNotFoundException, IOException {
final String srcPypiesDirectory = AWIPSII + File.separator + "pypies";
final String pypiesDirectory = WES2BRIDGE_DIRECTORY + File.separator
+ this.wes2BridgeCase.getName() + File.separator + "pypies";
final String srcHttpdPypiesDirectory = AWIPSII + File.separator
+ "httpd_pypies";
final String httpdPypiesDirectory = WES2BRIDGE_DIRECTORY
+ File.separator + this.wes2BridgeCase.getName()
+ File.separator + "httpd_pypies";
this.updatePypiesCfg(srcPypiesDirectory, pypiesDirectory);
this.updateHttpdConf(srcHttpdPypiesDirectory, httpdPypiesDirectory);
this.updateHttpdPypies(httpdPypiesDirectory, pypiesDirectory);
}
private void updatePypiesCfg(String srcPypiesDirectory,
String pypiesDirectory) throws FileNotFoundException, IOException,
IllegalArgumentException {
final String pypiesCfgPathSuffix = File.separator + "conf"
+ File.separator + "pypies.cfg";
final String srcpypiescfg = srcPypiesDirectory + pypiesCfgPathSuffix;
final String pypiescfg = pypiesDirectory + pypiesCfgPathSuffix;
// use the default location for the hdf5 root
final String hdf5DirectoryLocation = WES2BRIDGE_DIRECTORY
+ File.separator + this.wes2BridgeCase.getName()
+ DEFAULT_HDF5_DIRECTORY;
final String logFileDirectoryLocation = pypiesDirectory
+ File.separator + "logs";
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = this.getBufferedReader(srcpypiescfg);
bw = this.getBufferedWriter(pypiescfg);
final String hdf5DirPattern = "(hdf5dir=).+";
final String logFileDirPattern = "(logFileDir=).+";
final String loggingPortPattern = "(logging_port=)[1-9][0-9]+";
final Pattern pattern1 = Pattern.compile(hdf5DirPattern);
final Pattern pattern2 = Pattern.compile(logFileDirPattern);
final Pattern pattern3 = Pattern.compile(loggingPortPattern);
String line = StringUtils.EMPTY;
while ((line = br.readLine()) != null) {
Matcher matcher1 = pattern1.matcher(line);
Matcher matcher2 = pattern2.matcher(line);
Matcher matcher3 = pattern3.matcher(line);
if (matcher1.matches()) {
line = matcher1.group(GROUP_INDEX_ONE);
line += hdf5DirectoryLocation;
} else if (matcher2.matches()) {
line = matcher2.group(GROUP_INDEX_ONE);
line += logFileDirectoryLocation;
} else if (matcher3.matches()) {
line = matcher3.group(GROUP_INDEX_ONE);
line += this.wes2BridgeCase.getPypiesLoggingPort();
}
bw.write(line + "\n");
}
} finally {
br.close();
bw.close();
}
}
private void updateHttpdConf(String srcHttpdPypiesDirectory,
String httpdPypiesDirectory) throws FileNotFoundException,
IOException {
final String httpdConfPathSuffix = File.separator + "etc"
+ File.separator + "httpd" + File.separator + "conf"
+ File.separator + "httpd.conf";
final String srcHttpdConf = srcHttpdPypiesDirectory
+ httpdConfPathSuffix;
final String httpdConf = httpdPypiesDirectory + httpdConfPathSuffix;
final String serverRoot = httpdPypiesDirectory + File.separator + "etc"
+ File.separator + "httpd";
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = this.getBufferedReader(srcHttpdConf);
bw = this.getBufferedWriter(httpdConf);
final String listenPattern = "(Listen )[1-9][0-9]+";
final String serverRootPattern = "(ServerRoot \").+(\")";
final Pattern pattern1 = Pattern.compile(listenPattern);
final Pattern pattern2 = Pattern.compile(serverRootPattern);
String line = StringUtils.EMPTY;
while ((line = br.readLine()) != null) {
Matcher matcher1 = pattern1.matcher(line);
Matcher matcher2 = pattern2.matcher(line);
if (matcher1.matches()) {
line = matcher1.group(GROUP_INDEX_ONE);
line += this.wes2BridgeCase.getHttpdPypiesPort();
} else if (matcher2.matches()) {
line = matcher2.group(GROUP_INDEX_ONE);
line += serverRoot;
line += matcher2.group(GROUP_INDEX_TWO);
}
bw.write(line + "\n");
}
} finally {
br.close();
bw.close();
}
}
private void updateHttpdPypies(String httpdPypiesDirectory,
String pypiesDirectory) throws IOException, FileNotFoundException {
final String srchttpd_pypies = AWIPSII_WES2BRIDGE_SCRIPTS + "/"
+ "httpd-pypies";
final String httpd_pypies = this.wes2BridgeScripts + "/httpd-pypies";
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = this.getBufferedReader(srchttpd_pypies);
bw = this.getBufferedWriter(httpd_pypies);
final String httpdPypiesInstallPattern = "(HTTPD_PYPIES_INSTALL=).+";
final String loggingCommandPattern = "( *nohup su awips -c \"\\$loggingCmd > /tmp/pypiesLoggingService)(.log 2>&1\" > /dev/null &)";
final String pypiesConfigurationPattern = "(export PYPIES_CFG=).+";
final Pattern pattern1 = Pattern.compile(httpdPypiesInstallPattern);
final Pattern pattern2 = Pattern.compile(loggingCommandPattern);
final Pattern pattern3 = Pattern
.compile(pypiesConfigurationPattern);
String line = StringUtils.EMPTY;
while ((line = br.readLine()) != null) {
Matcher matcher1 = pattern1.matcher(line);
Matcher matcher2 = pattern2.matcher(line);
Matcher matcher3 = pattern3.matcher(line);
if (matcher1.matches()) {
line = matcher1.group(GROUP_INDEX_ONE);
line += httpdPypiesDirectory;
} else if (matcher2.matches()) {
line = matcher2.group(GROUP_INDEX_ONE);
line += this.wes2BridgeCase.getName();
line += matcher2.group(GROUP_INDEX_TWO);
} else if (matcher3.matches()) {
line = matcher3.group(GROUP_INDEX_ONE) + pypiesDirectory
+ File.separator + "conf" + File.separator
+ "pypies.cfg";
}
bw.write(line + "\n");
}
} finally {
br.close();
bw.close();
}
}
/*
* The following functions and usage of the following functions would no
* longer be necessary with Apache Commons IOUtils.
*/
private BufferedReader getBufferedReader(String file)
throws FileNotFoundException {
return new BufferedReader(new FileReader(this.getFile(file)));
}
private BufferedWriter getBufferedWriter(String file) throws IOException {
return new BufferedWriter(new FileWriter(this.getFile(file)));
}
private File getFile(String file) {
return new File(file);
}
}

View file

@ -1,6 +0,0 @@
log4j.rootLogger=ERROR, CA
log4j.appender.CA=org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

View file

@ -1,69 +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.
##
#
# A port of the Java DynamicSerializeManager. Should be used to read/write
# DynamicSerialize binary data.
#
#
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 06/09/10 njensen Initial Creation.
#
#
#
from thrift.transport import TTransport
import SelfDescribingBinaryProtocol, ThriftSerializationContext
class DynamicSerializationManager:
def __init__(self):
self.transport = None
def _deserialize(self, ctx):
return ctx.deserializeMessage()
def deserializeBytes(self, bytes):
ctx = self._buildSerializationContext(bytes)
ctx.readMessageStart()
obj = self._deserialize(ctx)
ctx.readMessageEnd()
return obj
def _buildSerializationContext(self, bytes=None):
self.transport = TTransport.TMemoryBuffer(bytes)
protocol = SelfDescribingBinaryProtocol.SelfDescribingBinaryProtocol(self.transport)
return ThriftSerializationContext.ThriftSerializationContext(self, protocol)
def serializeObject(self, obj):
ctx = self._buildSerializationContext()
ctx.writeMessageStart("dynamicSerialize")
self._serialize(ctx, obj)
ctx.writeMessageEnd()
return self.transport.getvalue()
def _serialize(self, ctx, obj):
ctx.serializeMessage(obj)

View file

@ -1,142 +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.
##
from thrift.protocol.TProtocol import *
from thrift.protocol.TBinaryProtocol import *
from struct import pack, unpack
#
# Partially compatible AWIPS-II Thrift Binary Protocol
#
# <B>Missing functionality:</B>
# <UL>
# <LI> Custom Serializers
# <LI> Inheritance
# </UL>
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 11/11/09 chammack Initial Creation.
# 06/09/10 njensen Added float, list methods
# Apr 24, 2015 4425 nabowle Add F64List support.
#
#
#
import struct, numpy
FLOAT = 64
intList = numpy.dtype(numpy.int32).newbyteorder('>')
floatList = numpy.dtype(numpy.float32).newbyteorder('>')
longList = numpy.dtype(numpy.int64).newbyteorder('>')
shortList = numpy.dtype(numpy.int16).newbyteorder('>')
byteList = numpy.dtype(numpy.int8).newbyteorder('>')
doubleList = numpy.dtype(numpy.float64).newbyteorder('>')
class SelfDescribingBinaryProtocol(TBinaryProtocol):
def readFieldBegin(self):
type = self.readByte()
if type == TType.STOP:
return (None, type, 0)
name = self.readString()
id = self.readI16()
return (name, type, id)
def readStructBegin(self):
return self.readString()
def writeStructBegin(self, name):
self.writeString(name)
def writeFieldBegin(self, name, type, id):
self.writeByte(type)
self.writeString(name)
self.writeI16(id)
def readFloat(self):
d = self.readI32()
dAsBytes = struct.pack('i', d)
f = struct.unpack('f', dAsBytes)
return f[0]
def writeFloat(self, f):
dAsBytes = struct.pack('f', f)
i = struct.unpack('i', dAsBytes)
self.writeI32(i[0])
def readI32List(self, sz):
buff = self.trans.readAll(4*sz)
val = numpy.frombuffer(buff, dtype=intList, count=sz)
return val
def readF32List(self, sz):
buff = self.trans.readAll(4*sz)
val = numpy.frombuffer(buff, dtype=floatList, count=sz)
return val
def readF64List(self, sz):
buff = self.trans.readAll(8*sz)
val = numpy.frombuffer(buff, dtype=doubleList, count=sz)
return val
def readI64List(self, sz):
buff = self.trans.readAll(8*sz)
val = numpy.frombuffer(buff, dtype=longList, count=sz)
return val
def readI16List(self, sz):
buff = self.trans.readAll(2*sz)
val = numpy.frombuffer(buff, dtype=shortList, count=sz)
return val
def readI8List(self, sz):
buff = self.trans.readAll(sz)
val = numpy.frombuffer(buff, dtype=byteList, count=sz)
return val
def writeI32List(self, buff):
b = numpy.asarray(buff, intList)
self.trans.write(numpy.getbuffer(b))
def writeF32List(self, buff):
b = numpy.asarray(buff, floatList)
self.trans.write(numpy.getbuffer(b))
def writeF64List(self, buff):
b = numpy.asarray(buff, doubleList)
self.trans.write(numpy.getbuffer(b))
def writeI64List(self, buff):
b = numpy.asarray(buff, longList)
self.trans.write(numpy.getbuffer(b))
def writeI16List(self, buff):
b = numpy.asarray(buff, shortList)
self.trans.write(numpy.getbuffer(b))
def writeI8List(self, buff):
b = numpy.asarray(buff, byteList)
self.trans.write(numpy.getbuffer(b))

View file

@ -1,424 +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.
##
#
# A port of the Java ThriftSerializationContext, used for reading/writing
# DynamicSerialize objects to/from thrift.
#
# For serialization, it has no knowledge of the expected types in other
# languages, it is instead all based on inspecting the types of the objects
# passed to it. Therefore, ensure the types of python objects and primitives
# match what they should be in the destination language.
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 06/09/10 njensen Initial Creation.
# 06/12/13 #2099 dgilling Implement readObject() and
# writeObject().
# Apr 24, 2015 4425 nabowle Add Double support
# Oct 17, 2016 5919 njensen Optimized for speed
#
#
from thrift.Thrift import TType
import inspect
import sys
import types
import time
import dynamicserialize
from dynamicserialize import dstypes, adapters
import SelfDescribingBinaryProtocol
import numpy
DS_LEN = len('dynamicserialize.dstypes.')
dsObjTypes = {}
def buildObjMap(module):
if '__all__' in module.__dict__:
for i in module.__all__:
name = module.__name__ + '.' + i
__import__(name)
buildObjMap(sys.modules[name])
else:
clzName = module.__name__[module.__name__.rfind('.') + 1:]
clz = module.__dict__[clzName]
tname = module.__name__
tname = tname[DS_LEN:]
dsObjTypes[tname] = clz
buildObjMap(dstypes)
pythonToThriftMap = {
types.StringType: TType.STRING,
types.IntType: TType.I32,
types.LongType: TType.I64,
types.ListType: TType.LIST,
types.DictionaryType: TType.MAP,
type(set([])): TType.SET,
types.FloatType: SelfDescribingBinaryProtocol.FLOAT,
# types.FloatType: TType.DOUBLE,
types.BooleanType: TType.BOOL,
types.InstanceType: TType.STRUCT,
types.NoneType: TType.VOID,
numpy.float32: SelfDescribingBinaryProtocol.FLOAT,
numpy.int32: TType.I32,
numpy.ndarray: TType.LIST,
numpy.object_: TType.STRING, # making an assumption here
numpy.string_: TType.STRING,
numpy.float64: TType.DOUBLE,
numpy.int16: TType.I16,
numpy.int8: TType.BYTE,
numpy.int64: TType.I64
}
primitiveSupport = (TType.BYTE, TType.I16, TType.I32, TType.I64,
SelfDescribingBinaryProtocol.FLOAT, TType.DOUBLE)
class ThriftSerializationContext(object):
def __init__(self, serializationManager, selfDescribingBinaryProtocol):
self.serializationManager = serializationManager
self.protocol = selfDescribingBinaryProtocol
self.typeDeserializationMethod = {
TType.STRING: self.protocol.readString,
TType.I16: self.protocol.readI16,
TType.I32: self.protocol.readI32,
TType.LIST: self._deserializeArray,
TType.MAP: self._deserializeMap,
TType.SET: self._deserializeSet,
SelfDescribingBinaryProtocol.FLOAT: self.protocol.readFloat,
TType.BYTE: self.protocol.readByte,
TType.I64: self.protocol.readI64,
TType.DOUBLE: self.protocol.readDouble,
TType.BOOL: self.protocol.readBool,
TType.STRUCT: self.deserializeMessage,
TType.VOID: lambda: None
}
self.typeSerializationMethod = {
TType.STRING: self.protocol.writeString,
TType.I16: self.protocol.writeI16,
TType.I32: self.protocol.writeI32,
TType.LIST: self._serializeArray,
TType.MAP: self._serializeMap,
TType.SET: self._serializeSet,
SelfDescribingBinaryProtocol.FLOAT: self.protocol.writeFloat,
TType.BYTE: self.protocol.writeByte,
TType.I64: self.protocol.writeI64,
TType.DOUBLE: self.protocol.writeDouble,
TType.BOOL: self.protocol.writeBool,
TType.STRUCT: self.serializeMessage,
TType.VOID: lambda x: None
}
self.listDeserializationMethod = {
TType.BYTE: self.protocol.readI8List,
TType.I16: self.protocol.readI16List,
TType.I32: self.protocol.readI32List,
TType.I64: self.protocol.readI64List,
SelfDescribingBinaryProtocol.FLOAT: self.protocol.readF32List,
TType.DOUBLE: self.protocol.readF64List
}
self.listSerializationMethod = {
TType.BYTE: self.protocol.writeI8List,
TType.I16: self.protocol.writeI16List,
TType.I32: self.protocol.writeI32List,
TType.I64: self.protocol.writeI64List,
SelfDescribingBinaryProtocol.FLOAT: self.protocol.writeF32List,
TType.DOUBLE: self.protocol.writeF64List
}
def readMessageStart(self):
msg = self.protocol.readMessageBegin()
return msg[0]
def readMessageEnd(self):
self.protocol.readMessageEnd()
def deserializeMessage(self):
name = self.protocol.readStructBegin()
if name.isdigit():
obj = self._deserializeType(int(name))
return obj
name = name.replace('_', '.')
if name in adapters.classAdapterRegistry:
return adapters.classAdapterRegistry[name].deserialize(self)
elif '$' in name:
# it's an inner class, we're going to hope it's an enum, treat it
# special
fieldName, fieldType, fieldId = self.protocol.readFieldBegin()
if fieldName != '__enumValue__':
raise dynamiceserialize.SerializationException(
"Expected to find enum payload. Found: " + fieldName)
obj = self.protocol.readString()
self.protocol.readFieldEnd()
return obj
else:
clz = dsObjTypes[name]
obj = clz()
while self._deserializeField(name, obj):
pass
self.protocol.readStructEnd()
return obj
def _deserializeType(self, b):
try:
return self.typeDeserializationMethod[b]()
except KeyError:
raise dynamicserialize.SerializationException(
"Unsupported type value " + str(b))
def _deserializeField(self, structname, obj):
fieldName, fieldType, fieldId = self.protocol.readFieldBegin()
if fieldType == TType.STOP:
return False
elif fieldType != TType.VOID:
result = self._deserializeType(fieldType)
lookingFor = "set" + fieldName[0].upper() + fieldName[1:]
try:
setMethod = getattr(obj, lookingFor)
setMethod(result)
except:
raise dynamicserialize.SerializationException(
"Couldn't find setter method " + lookingFor)
self.protocol.readFieldEnd()
return True
def _deserializeArray(self):
listType, size = self.protocol.readListBegin()
result = []
if size:
if listType not in primitiveSupport:
m = self.typeDeserializationMethod[listType]
result = [m() for n in xrange(size)]
else:
result = self.listDeserializationMethod[listType](size)
self.protocol.readListEnd()
return result
def _deserializeMap(self):
keyType, valueType, size = self.protocol.readMapBegin()
result = {}
for n in xrange(size):
# can't go off the type, due to java generics limitations dynamic serialize is
# serializing keys and values as void
key = self.typeDeserializationMethod[TType.STRUCT]()
value = self.typeDeserializationMethod[TType.STRUCT]()
result[key] = value
self.protocol.readMapEnd()
return result
def _deserializeSet(self):
setType, setSize = self.protocol.readSetBegin()
result = set([])
for n in xrange(setSize):
result.add(self.typeDeserializationMethod[TType.STRUCT]())
self.protocol.readSetEnd()
return result
def _lookupType(self, obj):
pyt = type(obj)
if pyt in pythonToThriftMap:
return pythonToThriftMap[pyt]
elif pyt.__module__[:DS_LEN - 1] == ('dynamicserialize.dstypes'):
return pythonToThriftMap[types.InstanceType]
else:
raise dynamicserialize.SerializationException(
"Don't know how to serialize object of type: " + str(pyt))
def serializeMessage(self, obj):
tt = self._lookupType(obj)
if tt == TType.STRUCT:
fqn = obj.__module__[DS_LEN:]
if fqn in adapters.classAdapterRegistry:
# get proper class name when writing class name to serialization stream
# in case we have a special inner-class case
m = sys.modules[adapters.classAdapterRegistry[fqn].__name__]
if isinstance(m.ClassAdapter, list):
fqn = m.ClassAdapter[0]
self.protocol.writeStructBegin(fqn)
adapters.classAdapterRegistry[fqn].serialize(self, obj)
return
else:
self.protocol.writeStructBegin(fqn)
methods = inspect.getmembers(obj, inspect.ismethod)
fid = 1
for m in methods:
methodName = m[0]
if methodName.startswith('get'):
fieldname = methodName[3].lower() + methodName[4:]
val = m[1]()
ft = self._lookupType(val)
if ft == TType.STRUCT:
fc = val.__module__[DS_LEN:]
self._serializeField(fieldname, ft, fid, val)
else:
self._serializeField(fieldname, ft, fid, val)
fid += 1
self.protocol.writeFieldStop()
self.protocol.writeStructEnd()
else:
# basic types
self.protocol.writeStructBegin(str(tt))
self._serializeType(obj, tt)
self.protocol.writeStructEnd()
def _serializeField(self, fieldName, fieldType, fieldId, fieldValue):
self.protocol.writeFieldBegin(fieldName, fieldType, fieldId)
self._serializeType(fieldValue, fieldType)
self.protocol.writeFieldEnd()
def _serializeType(self, fieldValue, fieldType):
if fieldType in self.typeSerializationMethod:
return self.typeSerializationMethod[fieldType](fieldValue)
else:
raise dynamicserialize.SerializationException(
"Unsupported type value " + str(fieldType))
def _serializeArray(self, obj):
size = len(obj)
if size:
if type(obj) is numpy.ndarray:
t = pythonToThriftMap[obj.dtype.type]
size = obj.size
else:
t = self._lookupType(obj[0])
else:
t = TType.STRUCT
self.protocol.writeListBegin(t, size)
if t == TType.STRING:
if type(obj) is numpy.ndarray:
if len(obj.shape) == 1:
for x in obj:
s = str(x).strip()
self.typeSerializationMethod[t](s)
else:
for x in obj:
for y in x:
s = str(y).strip()
self.typeSerializationMethod[t](s)
else:
for x in obj:
s = str(x)
self.typeSerializationMethod[t](s)
elif t not in primitiveSupport:
for x in obj:
self.typeSerializationMethod[t](x)
else:
self.listSerializationMethod[t](obj)
self.protocol.writeListEnd()
def _serializeMap(self, obj):
size = len(obj)
self.protocol.writeMapBegin(TType.VOID, TType.VOID, size)
for k in obj.keys():
self.typeSerializationMethod[TType.STRUCT](k)
self.typeSerializationMethod[TType.STRUCT](obj[k])
self.protocol.writeMapEnd()
def _serializeSet(self, obj):
size = len(obj)
self.protocol.writeSetBegin(TType.VOID, size)
for x in obj:
self.typeSerializationMethod[TType.STRUCT](x)
self.protocol.writeSetEnd()
def writeMessageStart(self, name):
self.protocol.writeMessageBegin(name, TType.VOID, 0)
def writeMessageEnd(self):
self.protocol.writeMessageEnd()
def readBool(self):
return self.protocol.readBool()
def writeBool(self, b):
self.protocol.writeBool(b)
def readByte(self):
return self.protocol.readByte()
def writeByte(self, b):
self.protocol.writeByte(b)
def readDouble(self):
return self.protocol.readDouble()
def writeDouble(self, d):
self.protocol.writeDouble(d)
def readFloat(self):
return self.protocol.readFloat()
def writeFloat(self, f):
self.protocol.writeFloat(f)
def readI16(self):
return self.protocol.readI16()
def writeI16(self, i):
self.protocol.writeI16(i)
def readI32(self):
return self.protocol.readI32()
def writeI32(self, i):
self.protocol.writeI32(i)
def readI64(self):
return self.protocol.readI64()
def writeI64(self, i):
self.protocol.writeI64(i)
def readString(self):
return self.protocol.readString()
def writeString(self, s):
self.protocol.writeString(s)
def readBinary(self):
numBytes = self.protocol.readI32()
return self.protocol.readI8List(numBytes)
def readFloatArray(self):
size = self.protocol.readI32()
return self.protocol.readF32List(size)
def writeFloatArray(self, floats):
self.protocol.writeI32(len(floats))
self.protocol.writeF32List(floats)
def readObject(self):
return self.deserializeMessage()
def writeObject(self, obj):
self.serializeMessage(obj)

View file

@ -1,58 +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.
##
#
# TODO
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 08/20/10 njensen Initial Creation.
#
#
#
__all__ = [
]
import dstypes, adapters
import DynamicSerializationManager
class SerializationException(Exception):
def __init__(self, message=None):
self.message = message
def __str__(self):
if self.message:
return self.message
else:
return ""
def serialize(obj):
dsm = DynamicSerializationManager.DynamicSerializationManager()
return dsm.serializeObject(obj)
def deserialize(bytes):
dsm = DynamicSerializationManager.DynamicSerializationManager()
return dsm.deserializeBytes(bytes)

View file

@ -1,46 +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.
##
#
# Adapter for java.nio.ByteBuffer
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 08/03/11 dgilling Initial Creation.
#
#
#
ClassAdapter = ['java.nio.ByteBuffer', 'java.nio.HeapByteBuffer']
def serialize(context, set):
raise NotImplementedError("Serialization of ByteBuffers is not supported.")
def deserialize(context):
byteBuf = context.readBinary()
return byteBuf

View file

@ -1,46 +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.
##
#
# Adapter for java.util.Calendar
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 09/29/10 wldougher Initial Creation.
#
#
#
from dynamicserialize.dstypes.java.util import Calendar
ClassAdapter = 'java.util.Calendar'
def serialize(context, calendar):
calTiM = calendar.getTimeInMillis()
context.writeI64(calTiM)
def deserialize(context):
result = Calendar()
result.setTimeInMillis(context.readI64())
return result

View file

@ -1,50 +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.
##
#
# Adapter for com.vividsolutions.jts.geom.Coordinate
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 01/20/11 dgilling Initial Creation.
#
#
#
from dynamicserialize.dstypes.com.vividsolutions.jts.geom import Coordinate
ClassAdapter = 'com.vividsolutions.jts.geom.Coordinate'
def serialize(context, coordinate):
context.writeDouble(coordinate.getX())
context.writeDouble(coordinate.getY())
def deserialize(context):
x = context.readDouble()
y = context.readDouble()
coord = Coordinate()
coord.setX(x)
coord.setY(y)
return coord

View file

@ -1,45 +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.
##
#
# Adapter for java.util.Date
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 12/06/10 dgilling Initial Creation.
#
#
#
from dynamicserialize.dstypes.java.util import Date
ClassAdapter = 'java.util.Date'
def serialize(context, date):
context.writeI64(date.getTime())
def deserialize(context):
result = Date()
result.setTime(context.readI64())
return result

View file

@ -1,57 +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.
##
#
# Adapter for java.util.EnumSet
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 07/28/11 dgilling Initial Creation.
# 12/02/13 2537 bsteffen Serialize empty enum sets.
#
#
#
from dynamicserialize.dstypes.java.util import EnumSet
ClassAdapter = ['java.util.EnumSet', 'java.util.RegularEnumSet']
def serialize(context, set):
setSize = len(set)
context.writeI32(setSize)
context.writeString(set.getEnumClass())
for val in set:
context.writeString(val)
def deserialize(context):
setSize = context.readI32()
enumClassName = context.readString()
valList = []
for i in xrange(setSize):
valList.append(context.readString())
return EnumSet(enumClassName, valList)

View file

@ -1,46 +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.
##
#
# Adapter for java.nio.FloatBuffer
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 08/01/11 dgilling Initial Creation.
#
#
#
ClassAdapter = ['java.nio.FloatBuffer', 'java.nio.HeapFloatBuffer']
def serialize(context, set):
raise NotImplementedError("Serialization of FloatBuffers is not supported.")
def deserialize(context):
floatBuf = context.readFloatArray()
return floatBuf

View file

@ -1,56 +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.
##
#
# Adapter for com.vividsolutions.jts.geom.Polygon
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 01/20/11 dgilling Initial Creation.
#
#
#
# TODO: Implement serialization/make deserialization useful.
# Deserialization was simply implemented to allow GridLocation objects to be
# passed through thrift, but the resulting Geometry object will not be transformed into
# useful data; the base byte array is passed to a worthless Geometry class.
from dynamicserialize.dstypes.com.vividsolutions.jts.geom import Geometry
# NOTE: At the moment, EDEX serializes Polygon, MultiPolygons, Points, and
# Geometrys with the tag of the base class Geometry. Java's serialization
# adapter is smarter and can determine the exact object by reading the binary
# data. This adapter doesn't need this _yet_, so it has not been implemented.
ClassAdapter = 'com.vividsolutions.jts.geom.Geometry'
def serialize(context, coordinate):
raise dynamicserialize.SerializationException('Not implemented yet')
def deserialize(context):
data = context.readBinary()
geom = Geometry()
geom.setBinaryData(data)
return geom

View file

@ -1,46 +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.
##
#
# Adapter for java.util.Calendar
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 09/29/10 wldougher Initial Creation.
#
#
#
from dynamicserialize.dstypes.java.util import GregorianCalendar
ClassAdapter = 'java.util.GregorianCalendar'
def serialize(context, calendar):
calTiM = calendar.getTimeInMillis()
context.writeI64(calTiM)
def deserialize(context):
result = GregorianCalendar()
result.setTimeInMillis(context.readI64())
return result

View file

@ -1,51 +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.
##
#
# Adapter for com.vividsolutions.jts.geom.Envelope
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 05/29/13 2023 dgilling Initial Creation.
#
#
from dynamicserialize.dstypes.com.vividsolutions.jts.geom import Envelope
ClassAdapter = 'com.vividsolutions.jts.geom.Envelope'
def serialize(context, envelope):
context.writeDouble(envelope.getMinX())
context.writeDouble(envelope.getMaxX())
context.writeDouble(envelope.getMinY())
context.writeDouble(envelope.getMaxY())
def deserialize(context):
env = Envelope()
env.setMinX(context.readDouble())
env.setMaxX(context.readDouble())
env.setMinY(context.readDouble())
env.setMaxY(context.readDouble())
return env

View file

@ -1,50 +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.
##
#
# Adapter for java.awt.Point
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 08/31/10 njensen Initial Creation.
#
#
#
from dynamicserialize.dstypes.java.awt import Point
ClassAdapter = 'java.awt.Point'
def serialize(context, point):
context.writeI32(point.getX())
context.writeI32(point.getY())
def deserialize(context):
x = context.readI32()
y = context.readI32()
point = Point()
point.setX(x)
point.setY(y)
return point

View file

@ -1,52 +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.
##
#
# Adapter for java.lang.StackTraceElement[]
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 09/21/10 njensen Initial Creation.
#
#
#
import dynamicserialize
from dynamicserialize.dstypes.java.lang import StackTraceElement
ClassAdapter = 'java.lang.StackTraceElement'
def serialize(context, obj):
raise dynamicserialize.SerializationException('Not implemented yet')
def deserialize(context):
result = StackTraceElement()
result.setDeclaringClass(context.readString())
result.setMethodName(context.readString())
result.setFileName(context.readString())
result.setLineNumber(context.readI32())
return result

View file

@ -1,44 +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.
##
#
# Adapter for java.sql.Timestamp
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 06/30/11 dgilling Initial Creation.
#
#
#
from dynamicserialize.dstypes.java.sql import Timestamp
ClassAdapter = 'java.sql.Timestamp'
def serialize(context, timestamp):
context.writeI64(timestamp.getTime())
def deserialize(context):
result = Timestamp(context.readI64())
return result

View file

@ -1,111 +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.
##
#
# __init__.py for Dynamic Serialize adapters.
#
# Plugins can contribute to dynamicserialize.adapters by either including their
# classes directly in pythonPackages/dynamicserialize/adapters/ within their
# plugin. The plugin's adapter will automatically be added to __all__ at runtime
# and registered.
# Plugins should not include a custom __init__.py in
# pythonPackages/dynamicserialize/adapters/ because it will overwrite this file.
# If custom package initialization is needed, a subpackage should be created
# with an __init__.py that includes the following:
#
# __all__ = ['CustomAdapter1', 'CustomAdapter2']
# from dynamicserialize.adapters import registerAdapters
# registerAdapters(__name__, __all__)
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 08/31/10 njensen Initial Creation.
# 03/20/13 #1774 randerso Added TimeConstraintsAdapter
# 04/22/13 #1949 rjpeter Added LockTableAdapter
# 02/06/14 #2672 bsteffen Added JTSEnvelopeAdapter
# 06/22/2015 #4573 randerso Added JobProgressAdapter
# 09/21/2015 #4486 rjpeter Added FormattedDateAdapter
# 06/23/2016 #5696 rjpeter Added CommutativeTimestampAdapter
# 10/17/2016 #5919 njensen Added GeomDataRespAdapter
# 01/09/2017 #5997 nabowle Allow contribution from plugins.
#
__all__ = [
'PointAdapter',
'StackTraceElementAdapter',
'CalendarAdapter',
'GregorianCalendarAdapter',
'DateAdapter',
'GeometryTypeAdapter',
'CoordAdapter',
'TimestampAdapter',
'EnumSetAdapter',
'FloatBufferAdapter',
'ByteBufferAdapter',
'JTSEnvelopeAdapter'
]
classAdapterRegistry = {}
def getAdapterRegistry():
import pkgutil
discoveredPackages = []
# allow other plugins to contribute to adapters by dropping their adapter or
# package into the dynamicserialize.adapters package
for _, modname, ispkg in pkgutil.iter_modules(__path__):
if ispkg:
discoveredPackages.append(modname)
else:
if modname not in __all__:
__all__.append(modname)
registerAdapters(__name__, __all__)
for pkg in discoveredPackages:
__import__(__name__ + '.' + pkg)
def registerAdapters(package, modules):
import sys
if not package.endswith('.'):
package += '.'
for x in modules:
exec 'import ' + package + x
m = sys.modules[package + x]
d = m.__dict__
if d.has_key('ClassAdapter'):
if isinstance(m.ClassAdapter, list):
for clz in m.ClassAdapter:
classAdapterRegistry[clz] = m
else:
clzName = m.ClassAdapter
classAdapterRegistry[clzName] = m
else:
raise LookupError('Adapter class ' + x + ' has no ClassAdapter field ' +
'and cannot be registered.')
getAdapterRegistry()

View file

@ -1,29 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'com',
'gov',
'java'
]

View file

@ -1,28 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'raytheon',
'vividsolutions'
]

View file

@ -1,27 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'uf'
]

View file

@ -1,27 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'common'
]

View file

@ -1,27 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'dataplugin'
]

View file

@ -1,27 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'events'
]

View file

@ -1,27 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'hazards'
]

View file

@ -1,27 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'requests'
]

View file

@ -1,46 +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.
##
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Oct 08, 2014 reblum Generated
class RegionLookupRequest(object):
def __init__(self):
self.region = None
self.site = None
def getRegion(self):
return self.region
def setRegion(self, region):
self.region = region
def getSite(self):
return self.site
def setSite(self, site):
self.site = site

View file

@ -1,28 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'RegionLookupRequest'
]
from RegionLookupRequest import RegionLookupRequest

View file

@ -1,27 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'jts'
]

View file

@ -1,27 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'geom'
]

View file

@ -1,46 +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.
##
# File auto-generated against equivalent DynamicSerialize Java class
class Coordinate(object):
def __init__(self, x=None, y=None):
self.x = x
self.y = y
def getX(self):
return self.x
def getY(self):
return self.y
def setX(self, x):
self.x = x
def setY(self, y):
self.y = y
def __str__(self):
return str((self.x, self.y))
def __repr__(self):
return self.__str__()

View file

@ -1,68 +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.
##
# This class is a dummy implementation of the
# com.vividsolutions.jts.geom.Envelope class. It was simply created to allow
# serialization/deserialization of IDataRequest objects from the Data Access
# Framework. This should be re-implemented if useful work needs to be
# performed against serialized Envelope objects.
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 05/29/13 2023 dgilling Initial Creation.
#
#
class Envelope(object):
def __init__(self, env=None):
self.maxx = -1.0
self.maxy = -1.0
self.minx = 0.0
self.miny = 0.0
if env is not None:
(self.minx, self.miny, self.maxx, self.maxy) = env.bounds
def getMaxX(self):
return self.maxx
def getMaxY(self):
return self.maxy
def getMinX(self):
return self.minx
def getMinY(self):
return self.miny
def setMaxX(self, value):
self.maxx = value
def setMaxY(self, value):
self.maxy = value
def setMinX(self, value):
self.minx = value
def setMinY(self, value):
self.miny = value

View file

@ -1,37 +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.
##
# This class is a dummy implementation of the
# com.vividsolutions.jts.geom.Geometry class. It was simply created to allow
# serialization/deserialization of GridLocation objects. This should be
# reimplemented if useful work needs to be performed against serialized
# Geometry objects.
class Geometry(object):
def __init__(self):
self.binaryData = None
def getBinaryData(self):
return self.binaryData
def setBinaryData(self, data):
self.binaryData = data

View file

@ -1,32 +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.
##
# File auto-generated by PythonFileGenerator
__all__ = [
'Coordinate',
'Envelope',
'Geometry'
]
from Coordinate import Coordinate
from Envelope import Envelope
from Geometry import Geometry

View file

@ -1,8 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'noaa'
]

View file

@ -1,8 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'nws'
]

View file

@ -1,8 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'ncep'
]

View file

@ -1,8 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'common'
]

View file

@ -1,8 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'dataplugin'
]

View file

@ -1,11 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'atcf',
'gempak',
'gpd',
'pgen'
]

View file

@ -1,8 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'request'
]

View file

@ -1,14 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
class RetrieveAtcfDeckRequest(object):
def __init__(self):
self.deckID = None
def getDeckID(self):
return self.deckID
def setDeckID(self, deckID):
self.deckID = deckID

View file

@ -1,9 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'RetrieveAtcfDeckRequest'
]
from RetrieveAtcfDeckRequest import RetrieveAtcfDeckRequest

View file

@ -1,8 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'request'
]

View file

@ -1,69 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Sep 16, 2016 pmoyer Generated
class GetGridDataRequest(object):
def __init__(self):
self.vcoord = None
self.level2 = None
self.modelId = None
self.parm = None
self.level1 = None
self.reftime = None
self.pluginName = None
self.fcstsec = None
def getVcoord(self):
return self.vcoord
def setVcoord(self, vcoord):
self.vcoord = vcoord
def getLevel2(self):
return self.level2
def setLevel2(self, level2):
self.level2 = level2
def getModelId(self):
return self.modelId
def setModelId(self, modelId):
self.modelId = modelId
def getParm(self):
return self.parm
def setParm(self, parm):
self.parm = parm
def getLevel1(self):
return self.level1
def setLevel1(self, level1):
self.level1 = level1
def getReftime(self):
return self.reftime
def setReftime(self, reftime):
self.reftime = reftime
def getPluginName(self):
return self.pluginName
def setPluginName(self, pluginName):
self.pluginName = pluginName
def getFcstsec(self):
return self.fcstsec
def setFcstsec(self, fcstsec):
self.fcstsec = fcstsec

View file

@ -1,41 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Sep 16, 2016 pmoyer Generated
class GetGridInfoRequest(object):
def __init__(self):
self.modelId = None
self.reftime = None
self.pluginName = None
self.fcstsec = None
def getModelId(self):
return self.modelId
def setModelId(self, modelId):
self.modelId = modelId
def getReftime(self):
return self.reftime
def setReftime(self, reftime):
self.reftime = reftime
def getPluginName(self):
return self.pluginName
def setPluginName(self, pluginName):
self.pluginName = pluginName
def getFcstsec(self):
return self.fcstsec
def setFcstsec(self, fcstsec):
self.fcstsec = fcstsec

View file

@ -1,27 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Sep 16, 2016 pmoyer Generated
class GetGridNavRequest(object):
def __init__(self):
self.modelId = None
self.pluginName = None
def getModelId(self):
return self.modelId
def setModelId(self, modelId):
self.modelId = modelId
def getPluginName(self):
return self.pluginName
def setPluginName(self, pluginName):
self.pluginName = pluginName

View file

@ -1,20 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Sep 16, 2016 pmoyer Generated
class GetStationsRequest(object):
def __init__(self):
self.pluginName = None
def getPluginName(self):
return self.pluginName
def setPluginName(self, pluginName):
self.pluginName = pluginName

View file

@ -1,27 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Sep 16, 2016 pmoyer Generated
class GetTimesRequest(object):
def __init__(self):
self.pluginName = None
self.timeField = None
def getPluginName(self):
return self.pluginName
def setPluginName(self, pluginName):
self.pluginName = pluginName
def getTimeField(self):
return self.timeField
def setTimeField(self, timeField):
self.timeField = timeField

View file

@ -1,20 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Sep 16, 2016 pmoyer Generated
class GetTimesResponse(object):
def __init__(self):
self.times = None
def getTimes(self):
return self.times
def setTimes(self, times):
self.times = times

View file

@ -1,64 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Sep 16, 2016 pmoyer Generated
import numpy
class Station(object):
def __init__(self):
self.elevation = None
self.state = None
self.stationId = None
self.longitude = None
self.latitude = None
self.wmoIndex = None
self.country = None
def getElevation(self):
return self.elevation
def setElevation(self, elevation):
self.elevation = elevation
def getState(self):
return self.state
def setState(self, state):
self.state = state
def getStationId(self):
return self.stationId
def setStationId(self, stationId):
self.stationId = stationId
def getLongitude(self):
return self.longitude
def setLongitude(self, longitude):
self.longitude = numpy.float64(longitude)
def getLatitude(self):
return self.latitude
def setLatitude(self, latitude):
self.latitude = numpy.float64(latitude)
def getWmoIndex(self):
return self.wmoIndex
def setWmoIndex(self, wmoIndex):
self.wmoIndex = wmoIndex
def getCountry(self):
return self.country
def setCountry(self, country):
self.country = country

View file

@ -1,48 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Sep 16, 2016 pmoyer Generated
class StationDataRequest(object):
def __init__(self):
self.refTime = None
self.pluginName = None
self.parmList = None
self.stationId = None
self.partNumber = None
def getRefTime(self):
return self.refTime
def setRefTime(self, refTime):
self.refTime = refTime
def getPluginName(self):
return self.pluginName
def setPluginName(self, pluginName):
self.pluginName = pluginName
def getParmList(self):
return self.parmList
def setParmList(self, parmList):
self.parmList = parmList
def getStationId(self):
return self.stationId
def setStationId(self, stationId):
self.stationId = stationId
def getPartNumber(self):
return self.partNumber
def setPartNumber(self, partNumber):
self.partNumber = partNumber

View file

@ -1,48 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Sep 16, 2016 pmoyer Generated
class SurfaceDataRequest(object):
def __init__(self):
self.refTime = None
self.pluginName = None
self.parmList = None
self.stationId = None
self.partNumber = None
def getRefTime(self):
return self.refTime
def setRefTime(self, refTime):
self.refTime = refTime
def getPluginName(self):
return self.pluginName
def setPluginName(self, pluginName):
self.pluginName = pluginName
def getParmList(self):
return self.parmList
def setParmList(self, parmList):
self.parmList = parmList
def getStationId(self):
return self.stationId
def setStationId(self, stationId):
self.stationId = stationId
def getPartNumber(self):
return self.partNumber
def setPartNumber(self, partNumber):
self.partNumber = partNumber

View file

@ -1,48 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Sep 16, 2016 pmoyer Generated
class UpperAirDataRequest(object):
def __init__(self):
self.refTime = None
self.pluginName = None
self.parmList = None
self.stationId = None
self.partNumber = None
def getRefTime(self):
return self.refTime
def setRefTime(self, refTime):
self.refTime = refTime
def getPluginName(self):
return self.pluginName
def setPluginName(self, pluginName):
self.pluginName = pluginName
def getParmList(self):
return self.parmList
def setParmList(self, parmList):
self.parmList = parmList
def getStationId(self):
return self.stationId
def setStationId(self, stationId):
self.stationId = stationId
def getPartNumber(self):
return self.partNumber
def setPartNumber(self, partNumber):
self.partNumber = partNumber

View file

@ -1,27 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'GetGridDataRequest',
'GetGridInfoRequest',
'GetGridNavRequest',
'GetStationsRequest',
'GetTimesRequest',
'GetTimesResponse',
'Station',
'StationDataRequest',
'SurfaceDataRequest',
'UpperAirDataRequest'
]
from GetGridDataRequest import GetGridDataRequest
from GetGridInfoRequest import GetGridInfoRequest
from GetGridNavRequest import GetGridNavRequest
from GetStationsRequest import GetStationsRequest
from GetTimesRequest import GetTimesRequest
from GetTimesResponse import GetTimesResponse
from Station import Station
from StationDataRequest import StationDataRequest
from SurfaceDataRequest import SurfaceDataRequest
from UpperAirDataRequest import UpperAirDataRequest

View file

@ -1,6 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'query'
]

View file

@ -1,84 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
class GenericPointDataReqMsg(object):
def __init__(self):
self.reqType = None
self.refTime = None
self.productName = None
self.stnId = None
self.slat = None
self.slon = None
self.productVersion = None
self.querySpecifiedProductVersion = False
self.queryKey = None
self.gpdDataString = None
self.maxNumLevel = 1
def getReqType(self):
return self.reqType
def setReqType(self, reqType):
self.reqType = reqType
def getRefTime(self):
return self.refTime
def setRefTime(self, refTime):
self.refTime = refTime
def getProductName(self):
return self.productName
def setProductName(self, productName):
self.productName = productName
def getStnId(self):
return self.stnId
def setStnId(self, stnId):
self.stnId = stnId
def getSlat(self):
return self.slat
def setSlat(self, slat):
self.slat = slat
def getSlon(self):
return self.slon
def setSlon(self, slon):
self.slon = slon
def getMaxNumLevel(self):
return self.maxNumLevel
def setMaxNumLevel(self, maxNumLevel):
self.maxNumLevel = maxNumLevel
def getProductVersion(self):
return self.productVersion
def setProductVersion(self, productVersion):
self.productVersion = productVersion
def getQuerySpecifiedProductVersion(self):
return self.querySpecifiedProductVersion
def setQuerySpecifiedProductVersion(self, querySpecifiedProductVersion):
self.querySpecifiedProductVersion = querySpecifiedProductVersion
def getQueryKey(self):
return self.queryKey
def setQueryKey(self, queryKey):
self.queryKey = queryKey
def getGpdDataString(self):
return self.gpdDataString
def setGpdDataString(self, gpdDataString):
self.gpdDataString = gpdDataString

View file

@ -1,8 +0,0 @@
# File auto-generated by PythonFileGenerator
__all__ = [
'GenericPointDataReqMsg'
]
from GenericPointDataReqMsg import GenericPointDataReqMsg

View file

@ -1,77 +0,0 @@
# File auto-generated against equivalent DynamicSerialize Java class
class ActivityInfo(object):
def __init__(self):
self.activityName = None
self.activityType = None
self.activitySubtype = None
self.activityLabel = None
self.site = None
self.desk = None
self.forecaster = None
self.refTime = None
self.mode = None
self.status = None
def getActivityName(self):
return self.activityName
def setActivityName(self, activityName):
self.activityName = activityName
def getActivityType(self):
return self.activityType
def setActivityType(self, activityType):
self.activityType = activityType
def getActivitySubtype(self):
return self.activitySubtype
def setActivitySubtype(self, activitySubtype):
self.activitySubtype = activitySubtype
def getActivityLabel(self):
return self.activityLabel
def setActivityLabel(self, activityLabel):
self.activityLabel = activityLabel
def getSite(self):
return self.site
def setSite(self, site):
self.site = site
def getDesk(self):
return self.desk
def setDesk(self, desk):
self.desk = desk
def getForecaster(self):
return self.forecaster
def setForecaster(self, forecaster):
self.forecaster = forecaster
def getRefTime(self):
return self.refTime
def setRefTime(self, refTime):
self.refTime = refTime
def getMode(self):
return self.mode
def setMode(self, mode):
self.mode = mode
def getStatus(self):
return self.status
def setStatus(self, status):
self.status = status

Some files were not shown because too many files have changed in this diff Show more