Issue #2361 remove ISerializableObject from persistence path keys

Change-Id: I7ff7e5234c7c88ed475014c755f3df7d1ee23b16

Former-commit-id: 44a6d5b302 [formerly 02d26d0f84 [formerly 044f4fd87a83d6b83eef7f46854f1b484536c825]]
Former-commit-id: 02d26d0f84
Former-commit-id: 0e4a1d9ced
This commit is contained in:
Nate Jensen 2013-11-08 12:30:39 -06:00
parent f4167f3a52
commit 6c82fc1303
4 changed files with 76 additions and 13 deletions

View file

@ -1,2 +0,0 @@
com.raytheon.uf.common.dataplugin.persist.PersistencePathKey
com.raytheon.uf.common.dataplugin.persist.PersistencePathKeySet

View file

@ -37,7 +37,7 @@ import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
@ -57,15 +57,20 @@ import com.raytheon.uf.common.time.util.TimeUtil;
* 04/08/13 1293 bkowal Removed references to hdffileid.
* 04/30/13 1861 bkowal Added constant for hdf5 file suffix.
* 10/04/13 2081 mschenke Removed unused annotation logic
* 11/08/13 2361 njensen Use JAXBManager for XML
* </pre>
*
* @author bphillip
* @version 1.0
*/
public class DefaultPathProvider implements IHDFFilePathProvider {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(DefaultPathProvider.class);
private static final SingleTypeJAXBManager<PersistencePathKeySet> jaxb = SingleTypeJAXBManager
.createWithoutException(PersistencePathKeySet.class);
public static final String HDF5_SUFFIX = ".h5";
public static final ThreadLocal<SimpleDateFormat> fileNameFormat = new ThreadLocal<SimpleDateFormat>() {
@ -204,11 +209,9 @@ public class DefaultPathProvider implements IHDFFilePathProvider {
PersistencePathKeySet pathKeySet = null;
if (sitePathFile.exists()) {
pathKeySet = (PersistencePathKeySet) SerializationUtil
.jaxbUnmarshalFromXmlFile(sitePathFile);
pathKeySet = jaxb.unmarshalFromXmlFile(sitePathFile);
} else if (basePathFile.exists()) {
pathKeySet = (PersistencePathKeySet) SerializationUtil
.jaxbUnmarshalFromXmlFile(basePathFile);
pathKeySet = jaxb.unmarshalFromXmlFile(basePathFile);
}
List<String> keyNames = null;

View file

@ -1,3 +1,22 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.dataplugin.persist;
import javax.xml.bind.annotation.XmlAccessType;
@ -5,11 +24,23 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
/**
* PluginDataObject key to use in IDataStore's directory path.
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* --/--/---- Initial creation
* Nov 08, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
*/
@XmlRootElement(name = "pathKey")
@XmlAccessorType(XmlAccessType.NONE)
public class PersistencePathKey implements Comparable<PersistencePathKey>,ISerializableObject {
public class PersistencePathKey implements Comparable<PersistencePathKey> {
@XmlElement
private String key;

View file

@ -1,3 +1,22 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.dataplugin.persist;
import java.util.List;
@ -8,11 +27,23 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
/**
* Set of PersistencePathKeys
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* --/--/---- Initial creation
* Nov 08, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
*/
@XmlRootElement(name = "pathKeySet")
@XmlAccessorType(XmlAccessType.NONE)
public class PersistencePathKeySet implements ISerializableObject{
public class PersistencePathKeySet {
@XmlElements({ @XmlElement(name = "pathKey", type = PersistencePathKey.class) })
private List<PersistencePathKey> pathKeys;