Merge "Issue #2584 Step one of versioning for DD Change-Id: I456643a92b95de3d4a74dff3a4e7daa9c08c5c00" into omaha_14.2.1
Former-commit-id: b6d4e063c3f99ba78a933435a87090e813643836
This commit is contained in:
commit
805f63c0ec
55 changed files with 474 additions and 259 deletions
|
@ -1,9 +1,10 @@
|
|||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||
|
||||
<bean factory-bean="ebxmlJaxbManager" factory-method="findJaxables"
|
||||
depends-on="ebxmlJaxbManager">
|
||||
|
||||
<bean factory-bean="ebxmlJaxbManager" factory-method="findJaxables"
|
||||
depends-on="ebxmlJaxbManager">
|
||||
<constructor-arg value="com.raytheon.uf.common.datadelivery.registry" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
|
@ -24,6 +24,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObject;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
/**
|
||||
|
@ -48,6 +49,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
* Oct 11, 2013 2460 dhladky Restored Adhoc's to registryObject store, WFO only
|
||||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||
* Nov 14, 2013 2548 mpduff Add a subscription type slot.
|
||||
* jan 23, 2013 2584 dhladky Versions.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -61,6 +63,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
@RegistryObject({ Subscription.PROVIDER_NAME_SLOT, Subscription.NAME_SLOT,
|
||||
Subscription.DATA_SET_SLOT, Subscription.OWNER_SLOT,
|
||||
Subscription.ORIGINATING_SITE_SLOT, Subscription.SUBSCRIPTION_TYPE_SLOT })
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
public class AdhocSubscription<T extends Time, C extends Coverage> extends
|
||||
SiteSubscription<T, C> {
|
||||
|
||||
|
@ -74,4 +77,5 @@ public class AdhocSubscription<T extends Time, C extends Coverage> extends
|
|||
super(subscription);
|
||||
setGroupName("Adhoc");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,11 @@
|
|||
**/
|
||||
package com.raytheon.uf.common.datadelivery.registry;
|
||||
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType;
|
||||
|
||||
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
||||
import com.raytheon.uf.common.registry.ebxml.encoder.IRegistryEncoder;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
|
||||
/**
|
||||
* Constants file for data delivery registry object types.
|
||||
|
@ -36,6 +40,7 @@ import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
|||
* Oct 11, 2013 2460 dhladky Restored Adhoc to registry store, WFO only.
|
||||
* Nov 12, 2013 2506 bgonzale Added is recurring subscription method.
|
||||
* Nov 18, 2013 1736 dhladky Data Set helper method.
|
||||
* Dec 08, 2013 2584 dhladky Registry versions for objects.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -48,6 +53,7 @@ public final class DataDeliveryRegistryObjectTypes {
|
|||
* Private constructor.
|
||||
*/
|
||||
private DataDeliveryRegistryObjectTypes() {
|
||||
|
||||
}
|
||||
|
||||
public static final String DATASETMETADATA = RegistryUtil
|
||||
|
@ -67,6 +73,9 @@ public final class DataDeliveryRegistryObjectTypes {
|
|||
|
||||
public static final String PROVIDER = RegistryUtil
|
||||
.getObjectType(Provider.class);
|
||||
|
||||
public static final String PARAMETER = RegistryUtil
|
||||
.getObjectType(Parameter.class);
|
||||
|
||||
/**
|
||||
* Is the object type a recurring subscription type, excluding adhoc
|
||||
|
@ -94,4 +103,47 @@ public final class DataDeliveryRegistryObjectTypes {
|
|||
return DataDeliveryRegistryObjectTypes.DATASETMETADATA
|
||||
.equals(objectType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the object if necessary
|
||||
*
|
||||
* @param content
|
||||
* @param encoder
|
||||
* @return
|
||||
*/
|
||||
public static Object convertObject(Object content,
|
||||
IRegistryEncoder encoder) {
|
||||
|
||||
/**
|
||||
* TODO In next step attempt to
|
||||
* do a conversion
|
||||
*/
|
||||
throw new IllegalArgumentException(
|
||||
"Can not convert Data Delivery Registry Objects in this release!");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the object from the encoder, checking to see if conversion is
|
||||
* necessary or not.
|
||||
*
|
||||
* @param registryObjectType
|
||||
* @param encoder
|
||||
* @return
|
||||
* @throws SerializationException
|
||||
*/
|
||||
public static Object getObject(RegistryObjectType registryObjectType,
|
||||
IRegistryEncoder encoder) throws SerializationException {
|
||||
|
||||
Object object = encoder.decodeObject(registryObjectType);
|
||||
|
||||
//Returned content. Object is of different version!
|
||||
if (object instanceof String) {
|
||||
object = convertObject(object, encoder);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.raytheon.uf.common.registry.annotations.RegistryObjectAssociation;
|
|||
import com.raytheon.uf.common.registry.annotations.RegistryObjectDescription;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectName;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectOwner;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttribute;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttributeConverter;
|
||||
import com.raytheon.uf.common.registry.ebxml.MapValuesResolver;
|
||||
|
@ -41,6 +42,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* Sep 07, 2012 1102 djohnson Remove invalid {@code @XmlRootElement}.
|
||||
* Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry objects.
|
||||
* Dec 18, 2013 2636 mpduff Add a data availability delay for the dataset.
|
||||
* jan 23, 2013 2584 dhladky Versions.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -50,6 +52,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
@RegistryObject({ "providerName", "collectionName", "dataSetName" })
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
public abstract class DataSet<T extends Time, C extends Coverage> {
|
||||
|
||||
@RegistryObjectOwner
|
||||
|
|
|
@ -17,6 +17,7 @@ import com.raytheon.uf.common.registry.annotations.RegistryObject;
|
|||
import com.raytheon.uf.common.registry.annotations.RegistryObjectDescription;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectName;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectOwner;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttribute;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttributeConverter;
|
||||
import com.raytheon.uf.common.registry.ebxml.slots.DateSlotConverter;
|
||||
|
@ -42,6 +43,7 @@ import com.raytheon.uf.common.time.util.ImmutableDate;
|
|||
* Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry objects.
|
||||
* Sept, 30 2013 1797 dhladky Made generic based on Time
|
||||
* Dec 20, 2013 2636 mpduff Add a dataset availability offset
|
||||
* jan 23, 2013 2584 dhladky Versions.
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -51,6 +53,7 @@ import com.raytheon.uf.common.time.util.ImmutableDate;
|
|||
@XmlSeeAlso({ GriddedDataSetMetaData.class,
|
||||
OpenDapGriddedDataSetMetaData.class, PointDataSetMetaData.class })
|
||||
@RegistryObject({ "url" })
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
public abstract class DataSetMetaData<T extends Time> {
|
||||
public static final String DATE_SLOT = "date";
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.raytheon.uf.common.registry.annotations.RegistryObjectAssociation;
|
|||
import com.raytheon.uf.common.registry.annotations.RegistryObjectDescription;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectName;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectOwner;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttribute;
|
||||
import com.raytheon.uf.common.registry.ebxml.MapValuesResolver;
|
||||
import com.raytheon.uf.common.serialization.XmlGenericMapAdapter;
|
||||
|
@ -33,6 +34,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* Aug 22, 2012 0743 djohnson Store data type as an enum.
|
||||
* Sep 07, 2012 1102 djohnson Add {@code @XmlRootElement}.
|
||||
* Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry objects.
|
||||
* jan 23, 2013 2584 dhladky Versions.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -44,6 +46,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
@RegistryObject(value = { "providerName", "dataSetType", "dataSetName" }, storeContent = false)
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
public class DataSetName {
|
||||
|
||||
@RegistryObjectOwner
|
||||
|
|
|
@ -33,8 +33,6 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
||||
/**
|
||||
* Request Time XML
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.uf.common.datadelivery.registry;
|
||||
|
||||
|
||||
/**
|
||||
* Defines a type that can visit {@link DataSetMetaData} instances and perform
|
||||
* some activity.
|
||||
|
|
|
@ -31,6 +31,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.serialization.XmlGenericMapAdapter;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
@ -55,9 +56,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
*/
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
@DynamicSerialize
|
||||
public class OpenDapGriddedDataSet extends GriddedDataSet {
|
||||
|
||||
public OpenDapGriddedDataSet() {
|
||||
|
||||
}
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlJavaTypeAdapter(type = Map.class, value = XmlGenericMapAdapter.class)
|
||||
private Map<Integer, String> cyclesToUrls = new HashMap<Integer, String>();
|
||||
|
@ -162,4 +168,5 @@ public class OpenDapGriddedDataSet extends GriddedDataSet {
|
|||
public ServiceType getServiceType() {
|
||||
return ServiceType.OPENDAP;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
/**
|
||||
|
@ -35,6 +36,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 4, 2012 1102 djohnson Initial creation
|
||||
* jan 23, 2013 2584 dhladky Versions
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -43,6 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
*/
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
@DynamicSerialize
|
||||
public class OpenDapGriddedDataSetMetaData extends GriddedDataSetMetaData {
|
||||
|
||||
|
@ -53,4 +56,5 @@ public class OpenDapGriddedDataSetMetaData extends GriddedDataSetMetaData {
|
|||
public void accept(IDataSetMetaDataVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ import com.raytheon.uf.common.registry.annotations.RegistryObject;
|
|||
import com.raytheon.uf.common.registry.annotations.RegistryObjectAssociation;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectDescription;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectName;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttribute;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttributeConverter;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
@ -40,6 +41,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* Sep 06, 2012 1121 mpduff Added toString().
|
||||
* Sep 07, 2012 1102 djohnson Add {@code @XmlRootElement}.
|
||||
* Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry objects.
|
||||
* Dec 08, 2013 2584 dhladky Version update
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -51,6 +53,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
@RegistryObject({ "name", "dataType" })
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
public class Parameter implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2332611624661834210L;
|
||||
|
@ -294,4 +297,5 @@ public class Parameter implements Serializable {
|
|||
|
||||
return hcBuilder.toHashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
|
||||
import com.raytheon.uf.common.registry.annotations.AssociationMapping;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObject;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.registry.constants.AssociationTypes;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
|
@ -39,6 +40,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 04, 2013 1841 djohnson Initial creation
|
||||
* Sept 30, 2013 1797 dhladky Generics
|
||||
* Dec 08, 2013 2584 dhladky Version update
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -54,6 +56,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
InitialPendingSubscription.CHANGE_REQUEST_ID_SLOT }, associationMappings = { @AssociationMapping(associationType = AssociationTypes.RELATED_TO, keyFields = {
|
||||
Subscription.PROVIDER_NAME_SLOT, Subscription.NAME_SLOT,
|
||||
Subscription.DATA_SET_SLOT, Subscription.OWNER_SLOT }, required = false, targetObject = SharedSubscription.class) })
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
public class PendingSharedSubscription<T extends Time, C extends Coverage> extends InitialPendingSharedSubscription<T, C>
|
||||
implements PendingSubscription<T, C> {
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
|
||||
import com.raytheon.uf.common.registry.annotations.AssociationMapping;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObject;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.registry.constants.AssociationTypes;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
|
@ -44,6 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
* Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry objects.
|
||||
* Mar 29, 2013 1841 djohnson Subscription is now UserSubscription.
|
||||
* Oct 1, 2013 1797 dhladky Added some start for generics
|
||||
* Dec 08, 2013 2584 dhladky Version update
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -59,6 +61,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
InitialPendingSubscription.CHANGE_REQUEST_ID_SLOT }, associationMappings = { @AssociationMapping(associationType = AssociationTypes.RELATED_TO, keyFields = {
|
||||
Subscription.PROVIDER_NAME_SLOT, Subscription.NAME_SLOT,
|
||||
Subscription.DATA_SET_SLOT, Subscription.OWNER_SLOT }, required = false, targetObject = SiteSubscription.class) })
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
public class PendingSiteSubscription<T extends Time, C extends Coverage> extends InitialPendingSiteSubscription<T, C>
|
||||
implements PendingSubscription<T, C> {
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.uf.common.datadelivery.registry;
|
||||
|
||||
|
||||
/**
|
||||
* Pending Subscription definition.
|
||||
*
|
||||
|
|
|
@ -22,6 +22,7 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
/**
|
||||
* Point Meta Data object
|
||||
|
@ -42,11 +43,17 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
@DynamicSerialize
|
||||
public class PointDataSetMetaData extends DataSetMetaData<PointTime> {
|
||||
|
||||
public PointDataSetMetaData() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(IDataSetMetaDataVisitor visitor) {
|
||||
// TODO: not sure what this does?
|
||||
}
|
||||
|
||||
}
|
|
@ -12,6 +12,7 @@ import javax.xml.bind.annotation.XmlElements;
|
|||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObject;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttribute;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
@ -31,6 +32,7 @@ import com.raytheon.uf.common.time.domain.api.IDuration;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 16, 2012 dhladky Initial creation
|
||||
* jun 11, 2013 2101 dhladky Updated for username/password DPA exchanges
|
||||
* Dec 08, 2013 2584 dhladky Version update
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -42,6 +44,7 @@ import com.raytheon.uf.common.time.domain.api.IDuration;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
@RegistryObject({ "name" })
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
public class Provider {
|
||||
|
||||
/**
|
||||
|
@ -105,7 +108,7 @@ public class Provider {
|
|||
return (long) (latSpan * lonSpan * (timeSpan/5) * requestOverheadInBytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static final Integer BYTES_IN_FLOAT = Float.SIZE / Byte.SIZE;
|
||||
|
||||
/** a one degree by one degree box **/
|
||||
|
|
|
@ -24,6 +24,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObject;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
/**
|
||||
|
@ -41,6 +42,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
* Sept 30, 2013 1797 dhladky Generics
|
||||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||
* Nov 14, 2013 2548 mpduff Add a subscription type slot.
|
||||
* jan 23, 2013 2584 dhladky Versions.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -53,6 +55,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
Subscription.NAME_SLOT, Subscription.DATA_SET_SLOT,
|
||||
Subscription.OWNER_SLOT, Subscription.ORIGINATING_SITE_SLOT,
|
||||
Subscription.SUBSCRIPTION_TYPE_SLOT })
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
@DynamicSerialize
|
||||
public class SharedSubscription<T extends Time, C extends Coverage> extends
|
||||
RecurringSubscription<T, C> {
|
||||
|
@ -143,4 +146,5 @@ public class SharedSubscription<T extends Time, C extends Coverage> extends
|
|||
this.officeIDs.add(officeId);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -25,6 +25,7 @@ import javax.xml.bind.annotation.XmlAttribute;
|
|||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObject;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttribute;
|
||||
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
@ -64,6 +65,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* Sept 30, 2013 1797 dhladky Some Generics
|
||||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||
* Nov 14, 2013 2548 mpduff Add a subscription type slot.
|
||||
* Dec 08, 2013 2584 dhladky Version update
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -77,6 +79,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
Subscription.DATA_SET_SLOT, Subscription.OWNER_SLOT,
|
||||
Subscription.ORIGINATING_SITE_SLOT, Subscription.SUBSCRIPTION_TYPE_SLOT })
|
||||
@DynamicSerialize
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
public class SiteSubscription<T extends Time, C extends Coverage> extends
|
||||
RecurringSubscription<T, C> {
|
||||
private static final long serialVersionUID = -6422673887457060034L;
|
||||
|
@ -180,4 +183,5 @@ public class SiteSubscription<T extends Time, C extends Coverage> extends
|
|||
this.officeIDs.add(officeId);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlEnum;
|
|||
import javax.xml.bind.annotation.XmlEnumValue;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Utils.SubscriptionStatus;
|
||||
|
||||
/**
|
||||
* Definition of a subscription.
|
||||
*
|
||||
|
|
|
@ -23,6 +23,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
/**
|
||||
|
@ -35,6 +36,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 11, 2012 754 dhladky Initial creation
|
||||
* jan 23, 2013 2584 dhladky Versions.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -43,6 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
*/
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@RegistryObjectVersion(value = 1.0f)
|
||||
@DynamicSerialize
|
||||
public class WFSPointDataSet extends PointDataSet {
|
||||
|
||||
|
@ -50,4 +53,5 @@ public class WFSPointDataSet extends PointDataSet {
|
|||
public ServiceType getServiceType() {
|
||||
return ServiceType.WFS;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import javax.persistence.Transient;
|
|||
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataDeliveryRegistryObjectTypes;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.registry.IMultipleResultFormatter;
|
||||
|
@ -46,7 +47,7 @@ public class DataLevelTypeDescriptionQuery extends
|
|||
RegistryObjectType registryObjectType, IRegistryEncoder encoder)
|
||||
throws SerializationException {
|
||||
|
||||
Parameter object = (Parameter) encoder.decodeObject(registryObjectType);
|
||||
Parameter object = (Parameter) DataDeliveryRegistryObjectTypes.getObject(registryObjectType, encoder);
|
||||
|
||||
if (alreadyFound == null) {
|
||||
alreadyFound = new HashSet<String>();
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.Map;
|
|||
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataDeliveryRegistryObjectTypes;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
|
@ -59,7 +60,7 @@ public class DataLevelTypeQuery extends
|
|||
RegistryObjectType registryObjectType, IRegistryEncoder encoder)
|
||||
throws SerializationException {
|
||||
|
||||
Object object = encoder.decodeObject(registryObjectType);
|
||||
Object object = DataDeliveryRegistryObjectTypes.getObject(registryObjectType, encoder);
|
||||
|
||||
if (object instanceof DataSet) {
|
||||
|
||||
|
|
|
@ -11,11 +11,12 @@ import org.geotools.geometry.jts.ReferencedEnvelope;
|
|||
import org.opengis.referencing.operation.TransformException;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataDeliveryRegistryObjectTypes;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.registry.IResultFormatter;
|
||||
import com.raytheon.uf.common.registry.ebxml.encoder.IRegistryEncoder;
|
||||
|
@ -66,8 +67,7 @@ public class DataSetWithFiltersQuery extends DataSetQuery implements
|
|||
IRegistryEncoder encoder)
|
||||
throws SerializationException {
|
||||
DataSet retVal = null;
|
||||
DataSet object = (DataSet) encoder
|
||||
.decodeObject(registryObjectType);
|
||||
DataSet object = (DataSet) DataDeliveryRegistryObjectTypes.getObject(registryObjectType, encoder);
|
||||
|
||||
if (satisfiesFilterCriteria(object, levels, envelope)) {
|
||||
retVal = object;
|
||||
|
|
|
@ -29,9 +29,9 @@ import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.MsgRegistryExceptio
|
|||
|
||||
import org.geotools.geometry.jts.ReferencedEnvelope;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.ebxml.DataSetQuery;
|
||||
import com.raytheon.uf.common.datadelivery.registry.ebxml.DataSetWithFiltersQuery;
|
||||
import com.raytheon.uf.common.registry.RegistryQueryResponse;
|
||||
|
|
|
@ -24,8 +24,8 @@ import java.util.Set;
|
|||
|
||||
import org.geotools.geometry.jts.ReferencedEnvelope;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.registry.handler.IRegistryObjectHandler;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.uf.common.datadelivery.registry.handlers;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.SiteSubscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.registry.handler.IRegistryObjectHandler;
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
package com.raytheon.uf.common.registry;
|
||||
/**
|
||||
* 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.
|
||||
**/
|
||||
/**
|
||||
* Convert a different version of the Registry Object to this version.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
*Dec 08, 2013 2584 dhladky Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public interface IConvert {
|
||||
|
||||
/**
|
||||
* Convert a Registry Object between versions
|
||||
*
|
||||
* @param o
|
||||
*/
|
||||
public void convert(Object o);
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* 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.registry.annotations;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
*
|
||||
* Denotes Version of the Registry Object
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 4, 2013 2584 dhladky Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@Documented
|
||||
public @interface RegistryObjectVersion {
|
||||
|
||||
public float value() default 1.0f;
|
||||
}
|
|
@ -23,6 +23,7 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectListType;
|
|||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType;
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.StringValueType;
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.VersionInfoType;
|
||||
|
||||
import com.raytheon.uf.common.comm.CommunicationException;
|
||||
import com.raytheon.uf.common.registry.OperationStatus;
|
||||
|
@ -36,6 +37,7 @@ import com.raytheon.uf.common.registry.annotations.RegistryObjectAssociation;
|
|||
import com.raytheon.uf.common.registry.annotations.RegistryObjectDescription;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectName;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectOwner;
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttribute;
|
||||
import com.raytheon.uf.common.registry.annotations.SlotAttributeConverter;
|
||||
import com.raytheon.uf.common.registry.constants.Languages;
|
||||
|
@ -76,6 +78,7 @@ import com.raytheon.uf.common.util.ReflectionUtil;
|
|||
* 4/9/2013 1802 bphillip Pulled constants out into existing constants package that was moved into common
|
||||
* Jun 03, 2013 2038 djohnson Allow setting the same encoder strategy.
|
||||
* Jun 24, 2013 2106 djohnson Remove encoder strategy from instance variables.
|
||||
* Dec 04, 2013 2584 dhladky Versions for Registry objects
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -89,6 +92,10 @@ public final class RegistryUtil {
|
|||
}
|
||||
|
||||
public static String LOCAL_REGISTRY_ADDRESS = null;
|
||||
|
||||
public static final String registryObjectClassName = "registryObjectClassName";
|
||||
|
||||
public static final String registryObjectDefaultVersion = "1.0";
|
||||
|
||||
static {
|
||||
if (System.getenv("EBXML_REGISTRY_HOST") != null
|
||||
|
@ -375,6 +382,28 @@ public final class RegistryUtil {
|
|||
.setDescription(getInternationalString(ReflectionUtil
|
||||
.getAnnotatedField(registryObject,
|
||||
RegistryObjectDescription.class)));
|
||||
// Try to harvest the current version from the PayloadObject
|
||||
// if none exists, default to encoder provided numeric.
|
||||
VersionInfoType version = new VersionInfoType();
|
||||
String val = null;
|
||||
RegistryObjectVersion rov = ReflectionUtil
|
||||
.getAnnotationFromClass(object.getClass(),
|
||||
RegistryObjectVersion.class);
|
||||
if (rov != null) {
|
||||
val = String.valueOf(rov.value());
|
||||
}
|
||||
// no value set in annotation field, apply version default.
|
||||
if (val == null) {
|
||||
// default
|
||||
val = registryObjectDefaultVersion;
|
||||
}
|
||||
version.setUserVersionName(val);
|
||||
registryObject.setVersionInfo(version);
|
||||
|
||||
// We need the actual payload class, not just it's ID for version comparisons
|
||||
String clazz = object.getClass().getCanonicalName();
|
||||
SlotType classNameSlot = new SlotType(registryObjectClassName, new StringValueType(clazz));
|
||||
slots.add(classNameSlot);
|
||||
}
|
||||
|
||||
// Look through all fields that need to be persisted to the
|
||||
|
|
|
@ -24,10 +24,12 @@ import java.util.List;
|
|||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType;
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ValueType;
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.VersionInfoType;
|
||||
|
||||
import org.apache.commons.lang.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
|
||||
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
|
||||
/**
|
||||
|
@ -45,6 +47,7 @@ import com.raytheon.uf.common.serialization.SerializationException;
|
|||
* Sep 07, 2012 1102 djohnson Initial creation
|
||||
* Jun 03, 2013 2038 djohnson Add equals/hashcode.
|
||||
* 12/2/2013 1829 bphillip Changed slot field in ExtensibleObjectType to be List instead of Set
|
||||
* Dec 04, 2013 2584 dhladky Versioning for registry objects
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -79,15 +82,18 @@ abstract class ContentSlotBasedEncoder<SLOT_VALUE_TYPE extends ValueType, CONTEN
|
|||
public final Object decodeObject(RegistryObjectType registryObjectType)
|
||||
throws SerializationException {
|
||||
Object object = null;
|
||||
|
||||
List<SlotType> returnedSlots = registryObjectType.getSlot();
|
||||
// Figure out which version we have and it's class
|
||||
VersionInfoType vit = registryObjectType.getVersionInfo();
|
||||
String className = registryObjectType.getSlotValue(RegistryUtil.registryObjectClassName);
|
||||
|
||||
// Walk the returned slots looking for the "content" slot
|
||||
for (SlotType s : returnedSlots) {
|
||||
if (CONTENT_SLOT.equals(s.getName())) {
|
||||
SLOT_VALUE_TYPE sv = getSlotValueTypeClass().cast(
|
||||
s.getSlotValue());
|
||||
CONTENT_TYPE content = getContent(sv);
|
||||
object = decodeContent(content);
|
||||
object = decodeContent(content, className, vit.getUserVersionName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -167,11 +173,13 @@ abstract class ContentSlotBasedEncoder<SLOT_VALUE_TYPE extends ValueType, CONTEN
|
|||
*
|
||||
* @param content
|
||||
* the content
|
||||
* @param the className
|
||||
* @param the version for serialization
|
||||
* @return the decoded object
|
||||
* @throws SerializationException
|
||||
* on error decoding the string into an object
|
||||
*/
|
||||
abstract Object decodeContent(CONTENT_TYPE content)
|
||||
abstract Object decodeContent(CONTENT_TYPE content, String className, String version)
|
||||
throws SerializationException;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,75 +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.common.registry.ebxml.encoder;
|
||||
|
||||
import static com.raytheon.uf.common.registry.ebxml.encoder.RegistryEncoders.Type.DYNAMIC_SERIALIZE;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
/**
|
||||
* A {@link StringBasedEncoder} implementation that uses
|
||||
* {@link DynamicSerialize} annotations. Package-private as it is not directly
|
||||
* accessibly in the public API.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 07, 2012 1102 djohnson Initial creation
|
||||
* Jun 03, 2013 2038 djohnson Add equals/hashcode.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author djohnson
|
||||
* @version 1.0
|
||||
*/
|
||||
class DynamicSerializeEncoder extends StringBasedEncoder {
|
||||
|
||||
/**
|
||||
* @param type
|
||||
*/
|
||||
DynamicSerializeEncoder() {
|
||||
super(DYNAMIC_SERIALIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
Object decodeContent(String content) throws SerializationException {
|
||||
return SerializationUtil.transformFromThrift(Object.class,
|
||||
Base64.decodeBase64(content));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
String encodeContent(Object objectToEncode) throws SerializationException {
|
||||
return new String(Base64.encodeBase64(SerializationUtil
|
||||
.transformToThrift(objectToEncode)));
|
||||
}
|
||||
}
|
|
@ -23,8 +23,13 @@ import static com.raytheon.uf.common.registry.ebxml.encoder.RegistryEncoders.Typ
|
|||
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
||||
import com.raytheon.uf.common.registry.annotations.RegistryObjectVersion;
|
||||
import com.raytheon.uf.common.registry.schemas.ebxml.util.EbxmlJaxbManager;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
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.common.util.ReflectionUtil;
|
||||
|
||||
/**
|
||||
* A {@link StringBasedEncoder} implementation that uses JAXB. Package-private
|
||||
|
@ -40,6 +45,7 @@ import com.raytheon.uf.common.serialization.SerializationException;
|
|||
* Jun 03, 2013 2038 djohnson Add equals/hashcode.
|
||||
* Oct 31, 2013 2361 njensen Use specific JAXBManager instead of SerializationUtil
|
||||
* Nov 14, 2013 2552 bkowal EbxmlJaxbManager is now accessed via getInstance
|
||||
* Dec 08, 2013 2584 dhladky Versions for JAXB objects, Only use the JAXb encoder now.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -48,7 +54,11 @@ import com.raytheon.uf.common.serialization.SerializationException;
|
|||
*/
|
||||
|
||||
class JaxbEncoder extends StringBasedEncoder {
|
||||
|
||||
|
||||
/** The logger */
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(JaxbEncoder.class);
|
||||
|
||||
/**
|
||||
* @param type
|
||||
*/
|
||||
|
@ -60,12 +70,24 @@ class JaxbEncoder extends StringBasedEncoder {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
Object decodeContent(String content) throws SerializationException {
|
||||
try {
|
||||
return EbxmlJaxbManager.getInstance().getJaxbManager()
|
||||
.unmarshalFromXml(content);
|
||||
} catch (JAXBException e) {
|
||||
throw new SerializationException("Unable to decode the object!", e);
|
||||
Object decodeContent(String content, String className, String version)
|
||||
throws SerializationException {
|
||||
|
||||
String classVersion = getClassVersion(className);
|
||||
|
||||
if (classVersion.equals(version)) {
|
||||
try {
|
||||
return EbxmlJaxbManager.getInstance().getJaxbManager()
|
||||
.unmarshalFromXml(content);
|
||||
} catch (JAXBException e) {
|
||||
throw new SerializationException(
|
||||
"Unable to decode the object!", e);
|
||||
}
|
||||
} else {
|
||||
statusHandler.handle(Priority.INFO,
|
||||
"Mismatching class versions, returning content. "
|
||||
+ className + " version: " + version);
|
||||
return content;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,10 +97,41 @@ class JaxbEncoder extends StringBasedEncoder {
|
|||
@Override
|
||||
String encodeContent(Object objectToEncode) throws SerializationException {
|
||||
try {
|
||||
// We always encode using our current version
|
||||
return new String(EbxmlJaxbManager.getInstance().getJaxbManager()
|
||||
.marshalToXml(objectToEncode));
|
||||
} catch (JAXBException e) {
|
||||
throw new SerializationException("Unable to encode the object!", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the version of the class
|
||||
*
|
||||
* @param className
|
||||
* @return version
|
||||
*/
|
||||
public String getClassVersion(String className) {
|
||||
|
||||
String version = EbxmlJaxbManager.getInstance().getVersion(className);
|
||||
|
||||
if (version == null) {
|
||||
|
||||
Class<?> clazz = EbxmlJaxbManager.getInstance().getClass(className);
|
||||
RegistryObjectVersion rov = ReflectionUtil.getAnnotationFromClass(
|
||||
clazz, RegistryObjectVersion.class);
|
||||
if (rov != null) {
|
||||
version = String.valueOf(rov.value());
|
||||
EbxmlJaxbManager.getInstance().addVersion(className, version);
|
||||
} else {
|
||||
throw new IllegalArgumentException(
|
||||
"Unable to extract RegistryObjectVersion tag from class! "
|
||||
+ className);
|
||||
}
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import java.util.Collections;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 7, 2012 1102 djohnson Initial creation
|
||||
* Dec 4, 2013 2584 dhladky Only a JAXB encoder for registry
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -45,14 +46,7 @@ public final class RegistryEncoders {
|
|||
* An enumeration of valid {@link IRegistryEncoder} types.
|
||||
*/
|
||||
public static enum Type {
|
||||
/**
|
||||
* An encoder that uses dynamic serialization.
|
||||
*/
|
||||
DYNAMIC_SERIALIZE(new DynamicSerializeEncoder()),
|
||||
|
||||
/**
|
||||
* An encoder that uses JAXB marshalling.
|
||||
*/
|
||||
JAXB(new JaxbEncoder());
|
||||
|
||||
private final IRegistryEncoder encoder;
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
**/
|
||||
package com.raytheon.uf.common.registry.schemas.ebxml.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
@ -34,6 +36,8 @@ import org.reflections.util.ConfigurationBuilder;
|
|||
import com.raytheon.uf.common.serialization.JAXBManager;
|
||||
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.common.util.ReflectionUtil;
|
||||
|
||||
/**
|
||||
* A JAXB Manager for transforming EBXML objects to/from XML.
|
||||
|
@ -44,11 +48,8 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 30, 2013 2361 njensen Initial creation
|
||||
* Nov 14, 2013 2252 bkowal Added the ability to dynamically inject packages
|
||||
* that this jaxb implementation should support.
|
||||
* Eliminated use of System.out.
|
||||
*
|
||||
* Nov 12, 2013 ---- njensen Initial release.
|
||||
* Nov 24, 2013 2584 dhladky versioning
|
||||
* </pre>
|
||||
*
|
||||
* @author njensen
|
||||
|
@ -61,21 +62,31 @@ public class EbxmlJaxbManager {
|
|||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(EbxmlJaxbManager.class);
|
||||
|
||||
private JAXBManager jaxb;
|
||||
|
||||
private Set<Class<?>> jaxables;
|
||||
|
||||
private Map<String, Class<?>> convertables = new HashMap<String, Class<?>>(1);
|
||||
|
||||
private Map<String, String> versions = new HashMap<String, String>(1);
|
||||
|
||||
private static EbxmlJaxbManager instance;
|
||||
|
||||
private static JAXBManager jaxb;
|
||||
|
||||
private static Set<Class<?>> jaxables;
|
||||
|
||||
/**
|
||||
* Get the desired version of the EbxmlJaxbManager
|
||||
* @param version
|
||||
* @return
|
||||
*/
|
||||
public static synchronized EbxmlJaxbManager getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new EbxmlJaxbManager();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
public String findJaxables(String packageName) {
|
||||
statusHandler.info("Scanning package ... " + packageName);
|
||||
|
||||
statusHandler.info(" Scanning package ... " + packageName);
|
||||
|
||||
long t0 = System.currentTimeMillis();
|
||||
ConfigurationBuilder cb = new ConfigurationBuilder();
|
||||
|
@ -124,4 +135,86 @@ public class EbxmlJaxbManager {
|
|||
|
||||
statusHandler.info("Initialization Complete.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the set of classes for this encoder.
|
||||
* @return
|
||||
*/
|
||||
public Set<Class<?>> getJaxables() {
|
||||
return jaxables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the class from the convertables
|
||||
*
|
||||
* @param className
|
||||
* @return
|
||||
*/
|
||||
public Class<?> getClass(String className) {
|
||||
|
||||
Class<?> clazz = convertables.get(className);
|
||||
|
||||
if (clazz == null) {
|
||||
|
||||
for (Class<?> pclazz : jaxables) {
|
||||
if (pclazz.getCanonicalName().equals(className)) {
|
||||
clazz = pclazz;
|
||||
addClass(className, clazz);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Didn't find it, now we have a possible problem.
|
||||
// Try reflecting a version of it.
|
||||
if (clazz == null) {
|
||||
statusHandler.handle(Priority.WARN,
|
||||
"Didn't find class in list of jaxables! class: "
|
||||
+ className);
|
||||
try {
|
||||
clazz = ReflectionUtil.forName(className);
|
||||
addClass(className, clazz);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Can not reflect a version of this class. class: "
|
||||
+ className, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return clazz;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the class to the cache
|
||||
*
|
||||
* @param className
|
||||
* @param clazz
|
||||
*/
|
||||
private void addClass(String className, Class<?> clazz) {
|
||||
synchronized (convertables) {
|
||||
convertables.put(className, clazz);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the version to the cache
|
||||
*
|
||||
* @param className
|
||||
* @param clazz
|
||||
*/
|
||||
public void addVersion(String className, String version) {
|
||||
synchronized (versions) {
|
||||
versions.put(className, version);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the version of the class
|
||||
*
|
||||
* @param className
|
||||
* @return version
|
||||
*/
|
||||
public String getVersion(String className) {
|
||||
return versions.get(className);
|
||||
}
|
||||
|
||||
}
|
|
@ -43,6 +43,7 @@ import org.hibernate.usertype.UserType;
|
|||
* --/--/---- Initial creation
|
||||
* Oct 31, 2013 2361 njensen Use specific JAXBManager instead of SerializationUtil
|
||||
* Nov 14, 2013 2552 bkowal EbxmlJaxbManager is now accessed via getInstance
|
||||
* Dec 04, 2013 2584 dhladky Version based EbxmlJaxbManager
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -93,7 +94,7 @@ public class SerializedType implements UserType {
|
|||
String obj = resultSet.getString(names[0]);
|
||||
|
||||
if (obj != null) {
|
||||
try {
|
||||
try { // We always marshall to current version for to XML conversions
|
||||
return EbxmlJaxbManager.getInstance().getJaxbManager()
|
||||
.unmarshalFromXml(obj);
|
||||
} catch (Exception e) {
|
||||
|
@ -110,8 +111,7 @@ public class SerializedType implements UserType {
|
|||
if (value == null) {
|
||||
statement.setString(index, null);
|
||||
} else {
|
||||
try {
|
||||
;
|
||||
try { // We always marshall to current version for to XML conversions
|
||||
statement.setString(index, EbxmlJaxbManager.getInstance()
|
||||
.getJaxbManager().marshalToXml(value));
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.apache.commons.beanutils.PropertyUtils;
|
|||
* Jul 10, 2012 455 djohnson Move in methods from RegistryUtil,
|
||||
* fix setter method to use parameter types.
|
||||
* Sep 28, 2012 1195 djohnson Add {@link #forName(String)}.
|
||||
* Jan 23, 2014 2584 dhladky Versions for JAXB objects.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -220,6 +221,26 @@ public final class ReflectionUtil {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this annotation from this class if it exists
|
||||
*
|
||||
* @param clazz
|
||||
* The class to check
|
||||
* @param annotation
|
||||
* The annotation class to look for
|
||||
* @return Annotation
|
||||
*/
|
||||
public static <T extends Annotation>T getAnnotationFromClass(Class<?> clazz,
|
||||
Class<T> annotation) throws ReflectionException {
|
||||
|
||||
T ann = clazz.getAnnotation(annotation);
|
||||
if (ann != null) {
|
||||
return ann;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a class instance from its name.
|
||||
|
|
|
@ -22,10 +22,10 @@ package com.raytheon.uf.edex.datadelivery.retrieval;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.PendingSubscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.SubscriptionBundle;
|
||||
import com.raytheon.uf.common.datadelivery.retrieval.xml.Retrieval;
|
||||
|
|
|
@ -31,6 +31,7 @@ import java.util.TreeSet;
|
|||
import com.raytheon.uf.common.datadelivery.registry.Collection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
||||
|
@ -43,7 +44,6 @@ import com.raytheon.uf.common.datadelivery.registry.OpenDapGriddedDataSet;
|
|||
import com.raytheon.uf.common.datadelivery.registry.OpenDapGriddedDataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
import com.raytheon.uf.common.datadelivery.retrieval.util.HarvesterServiceManager;
|
||||
import com.raytheon.uf.common.datadelivery.retrieval.util.LookupManager;
|
||||
|
|
|
@ -38,11 +38,11 @@ import com.raytheon.uf.common.datadelivery.registry.Levels;
|
|||
import com.raytheon.uf.common.datadelivery.registry.OpenDapGriddedDataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.ProviderType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.SubscriptionBundle;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
|
||||
import com.raytheon.uf.common.datadelivery.retrieval.xml.Retrieval;
|
||||
import com.raytheon.uf.common.datadelivery.retrieval.xml.RetrievalAttribute;
|
||||
|
|
|
@ -21,10 +21,8 @@ package com.raytheon.uf.edex.plugin.madis.ogc.feature;
|
|||
**/
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
|
|
@ -36,6 +36,7 @@ import java.util.Map;
|
|||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
import javax.persistence.Version;
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
||||
import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.LifecycleManager;
|
||||
|
@ -91,6 +92,7 @@ import com.raytheon.uf.edex.registry.ebxml.init.RegistryInitializedListener;
|
|||
* Nov 01, 2013 2361 njensen Use EbxmlJaxbManager instead of SerializationUtil
|
||||
* Nov 14, 2013 2552 bkowal EbxmlJaxbManager is now accessed via getInstance
|
||||
* Dec 20, 2013 2636 mpduff Set initialized to true before postInitialized is called.
|
||||
* Dec 04, 2013 2584 dhladky Version based EbxmlJaxbManager
|
||||
* </pre>
|
||||
*
|
||||
* @author bphillip
|
||||
|
@ -202,6 +204,7 @@ public class DbInit extends com.raytheon.uf.edex.database.init.DbInit implements
|
|||
*
|
||||
* @throws EbxmlRegistryException
|
||||
*/
|
||||
@SuppressWarnings("resource")
|
||||
private void executeRegistrySql() throws EbxmlRegistryException {
|
||||
JarFile jar = null;
|
||||
|
||||
|
|
|
@ -1,121 +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.registry.ebxml.services.query.adhoc;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.registry.schemas.ebxml.util.EbxmlJaxbManager;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
||||
/**
|
||||
*
|
||||
* This class manages the adhoc queries stored under
|
||||
* edex_static/base/ebxml/adhocQueries
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 29, 2012 bphillip Initial creation
|
||||
* Nov 14, 2013 2552 bkowal EbxmlJaxbManager is now accessed via getInstance
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bphillip
|
||||
* @version 1.0
|
||||
*/
|
||||
public class AdhocQueryExpressionManager {
|
||||
|
||||
/** The logger */
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(AdhocQueryExpressionManager.class);
|
||||
|
||||
/** The map of available adhocqueries */
|
||||
private Map<String, AdhocQueryExpression> expressionMap = new HashMap<String, AdhocQueryExpression>();
|
||||
|
||||
/** The singleton instance */
|
||||
private static AdhocQueryExpressionManager instance;
|
||||
|
||||
/**
|
||||
* Creates a new manager and initializes the prepared adhoc queries
|
||||
*/
|
||||
private AdhocQueryExpressionManager() {
|
||||
loadQueries();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the predefined queries
|
||||
*/
|
||||
private void loadQueries() {
|
||||
LocalizationFile[] files = PathManagerFactory.getPathManager()
|
||||
.listStaticFiles("ebxml/adhocQueries", new String[] { ".xml" },
|
||||
true, true);
|
||||
File[] fileList = new File[files.length];
|
||||
for (int i = 0; i < fileList.length; i++) {
|
||||
fileList[i] = files[i].getFile();
|
||||
}
|
||||
|
||||
for (int i = 0; i < fileList.length; i++) {
|
||||
|
||||
AdhocQueryExpression obj = null;
|
||||
try {
|
||||
obj = EbxmlJaxbManager
|
||||
.getInstance()
|
||||
.getJaxbManager()
|
||||
.unmarshalFromXmlFile(AdhocQueryExpression.class,
|
||||
fileList[i]);
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Error getting predefined adhoc queries.",
|
||||
e);
|
||||
}
|
||||
this.expressionMap.put(obj.getQueryName(), obj);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the singleton instance
|
||||
*
|
||||
* @return The singleton instance
|
||||
*/
|
||||
public static AdhocQueryExpressionManager getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new AdhocQueryExpressionManager();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the adhoc query with the given name
|
||||
*
|
||||
* @param name
|
||||
* The name of the adhoc query to get
|
||||
* @return The adhoc query, null if not present
|
||||
*/
|
||||
public AdhocQueryExpression getAdhocQueryExpression(String name) {
|
||||
return expressionMap.get(name);
|
||||
}
|
||||
}
|
|
@ -43,13 +43,13 @@ import com.raytheon.uf.common.datadelivery.registry.Connection;
|
|||
import com.raytheon.uf.common.datadelivery.registry.Coverage;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Encryption;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Encryption.Algorithim;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Encryption.Padding;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.EnvelopeUtils;
|
||||
import com.raytheon.uf.common.datadelivery.registry.PointTime;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Projection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.ProviderType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
import com.raytheon.uf.common.datadelivery.retrieval.xml.RetrievalAttribute;
|
||||
|
|
|
@ -28,8 +28,8 @@ import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
|||
import com.raytheon.uf.common.datadelivery.registry.Collection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Connection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Projection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Projection.ProjectionType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Projection.ProjectionType;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.common.util.AbstractFixture;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.junit.Ignore;
|
|||
import org.junit.Test;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test {@link GriddedDataSetMetaData}.
|
||||
*
|
||||
|
|
|
@ -21,6 +21,7 @@ package com.raytheon.uf.common.datadelivery.registry;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
/**
|
||||
* Fixture for {@link PendingSharedSubscription} objects.
|
||||
*
|
||||
|
|
|
@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Test {@link PendingSubscription}.
|
||||
*
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
package com.raytheon.uf.common.datadelivery.registry;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Fixture for {@link SharedSubscription} objects.
|
||||
*
|
||||
|
|
|
@ -29,11 +29,11 @@ import org.geotools.geometry.jts.ReferencedEnvelope;
|
|||
import org.junit.Test;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.GriddedCoverage;
|
||||
import com.raytheon.uf.common.datadelivery.registry.OpenDapGriddedDataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.GriddedCoverage;
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.gridcoverage.Corner;
|
||||
import com.raytheon.uf.common.gridcoverage.LatLonGridCoverage;
|
||||
|
|
|
@ -25,8 +25,8 @@ import java.util.Set;
|
|||
|
||||
import org.geotools.geometry.jts.ReferencedEnvelope;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.ebxml.DataSetWithFiltersQuery;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public class FactoryRegistryHandlerTest {
|
|||
RegistryErrorMessage.DATABASE_ERROR_MESSAGE);
|
||||
|
||||
private static final IRegistryEncoder encoderStrategy = RegistryEncoders
|
||||
.ofType(Type.DYNAMIC_SERIALIZE);
|
||||
.ofType(Type.JAXB);
|
||||
|
||||
private static final FactoryRegistryHandler registryHandler = new FactoryRegistryHandler();
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class RegistryUtilTest {
|
|||
|
||||
RegistryObjectType type = RegistryUtil
|
||||
.newRegistryObject(registryObject,
|
||||
RegistryEncoders.ofType(Type.DYNAMIC_SERIALIZE));
|
||||
RegistryEncoders.ofType(Type.JAXB));
|
||||
|
||||
SlotType slotToCheck = null;
|
||||
for (SlotType slot : type.getSlot()) {
|
||||
|
|
|
@ -41,8 +41,8 @@ import com.raytheon.uf.common.datadelivery.registry.DataType;
|
|||
import com.raytheon.uf.common.datadelivery.registry.OpenDapGriddedDataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Projection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Projection.ProjectionType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Projection.ProjectionType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.gridcoverage.LatLonGridCoverage;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactoryTest;
|
||||
|
|
|
@ -42,8 +42,8 @@ import com.raytheon.uf.common.datadelivery.registry.DataType;
|
|||
import com.raytheon.uf.common.datadelivery.registry.OpenDapGriddedDataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Projection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Projection.ProjectionType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Projection.ProjectionType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.gridcoverage.LatLonGridCoverage;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactoryTest;
|
||||
|
|
|
@ -29,8 +29,8 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.SiteSubscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.units.DataSizeUnit;
|
||||
import com.raytheon.uf.viz.datadelivery.system.CreateEditRuleDlg.FreqUnitOptions;
|
||||
import com.raytheon.uf.viz.datadelivery.system.Operator;
|
||||
|
|
Loading…
Add table
Reference in a new issue