-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -47,23 +25,5 @@
-
-
-
-
-
-
-
- java.lang.Throwable
-
-
-
-
-
-
-
-
diff --git a/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/DataArchiver.java b/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/DataArchiver.java
deleted file mode 100644
index 991d6a98e2..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/DataArchiver.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-package com.raytheon.uf.edex.maintenance.archive;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import com.raytheon.uf.common.localization.IPathManager;
-import com.raytheon.uf.common.localization.LocalizationContext;
-import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
-import com.raytheon.uf.common.localization.LocalizationFile;
-import com.raytheon.uf.common.localization.PathManagerFactory;
-import com.raytheon.uf.common.serialization.SerializationUtil;
-import com.raytheon.uf.common.status.IUFStatusHandler;
-import com.raytheon.uf.common.status.UFStatus;
-import com.raytheon.uf.common.status.UFStatus.Priority;
-import com.raytheon.uf.edex.core.dataplugin.PluginRegistry;
-import com.raytheon.uf.edex.maintenance.archive.config.DataArchiveConfig;
-
-/**
- * Handles archiving of data. Has two interfaces for registering data archive.
- * Data archived based on archiving for each plugin and general data archive
- * programs.
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Dec 16, 2011 rjpeter Initial creation
- *
- *
- *
- * @author rjpeter
- * @version 1.0
- */
-public class DataArchiver {
- private static final transient IUFStatusHandler statusHandler = UFStatus
- .getHandler(DataArchiver.class);
-
- private List pluginArchivers = new ArrayList();
-
- private List dataArchivers = new ArrayList();
-
- private String archivePath = null;
-
- private String defaultPlugin = "default";
-
- private String configDir = "archiver";
-
- public DataArchiver(String archivePath) {
- this.archivePath = archivePath;
- }
-
- public void archivePlugins() {
- statusHandler.info("Archival of plugin data starting");
-
- // get list of plugins, ordered by plugin
- Set availablePlugins = new TreeSet(PluginRegistry
- .getInstance().getRegisteredObjects());
-
- Map configs = getDataArchiveConfigs();
- DataArchiveConfig defaultConf = configs.get(defaultPlugin);
- File baseArchive = new File(archivePath);
-
- for (String pluginName : availablePlugins) {
- DataArchiveConfig conf = configs.get(pluginName);
- if (conf == null) {
- conf = defaultConf;
- }
-
- if (Boolean.TRUE.equals(conf.getArchivingEnabled())) {
- for (IPluginArchiver pluginArchiver : pluginArchivers) {
- pluginArchiver.archivePlugin(pluginName, archivePath, conf);
- }
- }
- }
-
- statusHandler.info("Archival of plugin data complete");
- }
-
- public Object registerPluginArchiver(IPluginArchiver archiver) {
- if (!pluginArchivers.contains(archiver)) {
- pluginArchivers.add(archiver);
- } else {
- statusHandler.warn("Plugin archiver already registered: "
- + archiver);
- }
-
- return this;
- }
-
- public Object registerDataArchiver(IDataArchiver archiver) {
- if (!dataArchivers.contains(archiver)) {
- dataArchivers.add(archiver);
- } else {
- statusHandler.warn("Data archiver already registered: " + archiver);
- }
-
- return this;
- }
-
- private Map getDataArchiveConfigs() {
- Map configs = new HashMap();
- IPathManager pathMgr = PathManagerFactory.getPathManager();
- // process in reverse order so BASE is processed before CONFIGURED
- // before SITE
- List contexts = Arrays.asList(pathMgr
- .getLocalSearchHierarchy(LocalizationType.COMMON_STATIC));
- Collections.reverse(contexts);
- String[] extensions = new String[] { "xml" };
- for (LocalizationContext ctx : contexts) {
- statusHandler.info("Loading context: " + ctx);
- LocalizationFile[] lfs = pathMgr.listFiles(ctx, configDir,
- extensions, false, true);
- if (lfs != null && lfs.length > 0) {
- for (LocalizationFile lf : lfs) {
- String fileName = lf.getName();
- try {
- File f = lf.getFile(true);
- fileName = f.getAbsolutePath();
- Object obj = SerializationUtil
- .jaxbUnmarshalFromXmlFile(f);
- if (obj instanceof DataArchiveConfig) {
- DataArchiveConfig conf = (DataArchiveConfig) obj;
- String plugin = conf.getPluginName();
- if (plugin != null) {
- plugin = plugin.trim();
- if (!plugin.isEmpty()) {
- configs.put(plugin, conf);
- } else {
- throw new Exception(
- "Configuration file does not specify pluginName");
- }
- } else {
- throw new Exception(
- "Configuration file does not specify pluginName");
- }
- } else {
- throw new Exception(
- "File in wrong format, expected "
- + DataArchiveConfig.class
- + ", found " + obj.getClass());
- }
- } catch (Throwable e) {
- statusHandler.error(
- "Failed to load archive configuration file: "
- + fileName, e);
- }
- }
- }
- }
-
- DataArchiveConfig defaultConf = configs.get(defaultPlugin);
- if (defaultConf == null) {
- // default plugin didn't load from disk, force a default config
- statusHandler
- .warn("Failed to find default configuration, using internal defaults");
- defaultConf = new DataArchiveConfig();
- defaultConf.setPluginName(defaultPlugin);
- configs.put(defaultPlugin, defaultConf);
- }
-
- if (!defaultConf.isArchivingEnabledSet()) {
- defaultConf.setArchivingEnabled(Boolean.TRUE);
- }
-
- if (!defaultConf.isCompressionEnabledSet()) {
- defaultConf.setCompressionEnabled(Boolean.TRUE);
- }
-
- if (!defaultConf.isHoursToKeepSet()) {
- defaultConf.setHoursToKeep(6);
- }
-
- // override unset fields with default
- for (DataArchiveConfig pluginConf : configs.values()) {
- if (pluginConf.getPluginName().equals(defaultPlugin)) {
- // skip default conf
- continue;
- }
-
- if (!pluginConf.isArchivingEnabledSet()) {
- pluginConf.setArchivingEnabled(defaultConf
- .getArchivingEnabled());
- }
-
- if (!pluginConf.isCompressionEnabledSet()) {
- pluginConf.setCompressionEnabled(defaultConf
- .getArchivingEnabled());
- }
-
- if (!pluginConf.isHoursToKeepSet()) {
- pluginConf.setHoursToKeep(defaultConf.getHoursToKeep());
- }
- }
-
- try {
- statusHandler.info("DefaultConfiguration:\n"
- + SerializationUtil.marshalToXml(defaultConf));
- } catch (Exception e) {
- statusHandler.handle(Priority.WARN, "Failed to deserialize config",
- e);
- }
- return configs;
- }
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/DataStoreArchiver.java b/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/DataStoreArchiver.java
deleted file mode 100644
index ba7ea799da..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/DataStoreArchiver.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-package com.raytheon.uf.edex.maintenance.archive;
-
-import java.io.File;
-
-import com.raytheon.uf.common.datastorage.DataStoreFactory;
-import com.raytheon.uf.common.datastorage.IDataStore;
-import com.raytheon.uf.common.datastorage.StorageException;
-import com.raytheon.uf.common.datastorage.StorageProperties.Compression;
-import com.raytheon.uf.common.status.IUFStatusHandler;
-import com.raytheon.uf.common.status.UFStatus;
-import com.raytheon.uf.common.status.UFStatus.Priority;
-import com.raytheon.uf.edex.maintenance.archive.config.DataArchiveConfig;
-
-/**
- * Uses the repack feature of IDataStore to archive data by repacking it to a
- * specified compression at the hdf5 dataset level and moving the resulting file
- * to the archive dir.
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Dec 8, 2011 njensen Initial creation
- * Jan 14, 2013 1469 bkowal Removed the hdf5 data directory.
- * Jul 23, 2013 2216 rferrel Removed the time stamp filter in hdf5 copy.
- *
- *
- *
- * @author njensen
- * @version 1.0
- */
-
-public class DataStoreArchiver {
-
- private static final transient IUFStatusHandler statusHandler = UFStatus
- .getHandler(DataStoreArchiver.class);
-
- private Compression compression = Compression.NONE;
-
- public DataStoreArchiver(String compression) {
- this.compression = Compression.valueOf(compression);
- }
-
- public void archiveFiles(String[] hdf5Files, String archiveDir,
- DataArchiveConfig conf) {
- for (String hdf5File : hdf5Files) {
- IDataStore ds = DataStoreFactory.getDataStore(new File(hdf5File));
- String outputDir = archiveDir; // + dirs of hdf5 file
-
- try {
- // Do not perform time stamp check.
- ds.copy(outputDir, compression, null, 0, 0);
- } catch (StorageException e) {
- statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage());
- }
- }
- }
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/config/DataArchiveConfig.java b/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/config/DataArchiveConfig.java
deleted file mode 100644
index 406e9536a6..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/config/DataArchiveConfig.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-package com.raytheon.uf.edex.maintenance.archive.config;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * Data archive configuration. Configuration should be pulled from common_static
- * localization. Configuration with a pluginName of default will all to all
- * plugins.
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Jan 14, 2012 rjpeter Initial creation
- *
- *
- *
- * @author rjpeter
- * @version 1.0
- */
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.NONE)
-public class DataArchiveConfig {
- @XmlElement
- private String pluginName;
-
- @XmlElement
- private Integer hoursToKeep;
-
- @XmlElement
- private Boolean archivingEnabled;
-
- @XmlElement
- private Boolean compressionEnabled;
-
- /**
- * @return the pluginName
- */
- public String getPluginName() {
- return pluginName;
- }
-
- /**
- * @param pluginName
- * the pluginName to set
- */
- public void setPluginName(String pluginName) {
- this.pluginName = pluginName;
- }
-
- /**
- * @return the hoursToKeep
- */
- public Integer getHoursToKeep() {
- return hoursToKeep;
- }
-
- /**
- * @param hoursToKeep
- * the hoursToKeep to set
- */
- public void setHoursToKeep(Integer hoursToKeep) {
- this.hoursToKeep = hoursToKeep;
- }
-
- /**
- * @return the archivingEnabled
- */
- public Boolean getArchivingEnabled() {
- return archivingEnabled;
- }
-
- /**
- * @param archivingEnabled
- * the archivingEnabled to set
- */
- public void setArchivingEnabled(Boolean archivingEnabled) {
- this.archivingEnabled = archivingEnabled;
- }
-
- /**
- * @param compressionEnabled
- * the compressionEnabled to set
- */
- public void setCompressionEnabled(Boolean compressionEnabled) {
- this.compressionEnabled = compressionEnabled;
- }
-
- /**
- * @return the compressionEnabled
- */
- public Boolean getCompressionEnabled() {
- return compressionEnabled;
- }
-
- public boolean isArchivingEnabledSet() {
- return archivingEnabled != null;
- }
-
- public boolean isHoursToKeepSet() {
- return hoursToKeep != null;
- }
-
- public boolean isCompressionEnabledSet() {
- return (compressionEnabled != null);
- }
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.maintenance/utility/common_static/base/archiver/defaultArchiveConfig.xml b/edexOsgi/com.raytheon.uf.edex.maintenance/utility/common_static/base/archiver/defaultArchiveConfig.xml
deleted file mode 100644
index 5f69229316..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.maintenance/utility/common_static/base/archiver/defaultArchiveConfig.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- default
- 6
- false
- true
-
diff --git a/edexOsgi/com.raytheon.uf.edex.text.feature/feature.xml b/edexOsgi/com.raytheon.uf.edex.text.feature/feature.xml
index 49bff7ab36..10df591fb1 100644
--- a/edexOsgi/com.raytheon.uf.edex.text.feature/feature.xml
+++ b/edexOsgi/com.raytheon.uf.edex.text.feature/feature.xml
@@ -19,6 +19,7 @@
+