();
-
- for (RegistryObjectType obj : regObjects) {
- String id = obj.getId();
- if (id == null && mode != Mode.CREATE_ONLY) {
- InvalidRequestExceptionType e = rsFactory
- .createInvalidRequestExceptionType();
- e.setMessage("ID value is not specified");
- return e;
- }
-
- String lid = obj.getLid();
- if (lid == null) {
- InvalidRequestExceptionType e = rsFactory
- .createInvalidRequestExceptionType();
- e.setMessage("LID value is not specified");
- return e;
- }
-
- switch (mode) {
- case CREATE_OR_REPLACE:
- try {
- if (registry.containsId(id)) {
- toReplace.add(obj);
- } else {
- toCreate.add(obj);
- }
- } catch (IOException ioe) {
- StringWriter writer = new StringWriter();
- ioe.printStackTrace(new PrintWriter(writer));
-
- RegistryExceptionType e = rsFactory
- .createRegistryExceptionType();
- e.setMessage("Error contacting registry.");
- e.setDetail(writer.toString());
- e.setCode(ioe.getClass().toString());
- return e;
- }
- break;
- case CREATE_OR_VERSION:
- try {
- if (!registry.containsId(id)) {
- if (!registry.containsLid(lid)) {
- toCreate.add(obj);
- } else {
- InvalidRequestExceptionType e = rsFactory
- .createInvalidRequestExceptionType();
- e.setMessage("Object LID exists in registry: "
- + lid);
- return e;
- }
- } else {
- toVersion.add(obj);
- }
- } catch (IOException ioe) {
- RegistryExceptionType e = rsFactory
- .createRegistryExceptionType();
- e.setMessage("Error contacting registry.");
- e.setDetail(ioe.toString());
- e.setCode(ioe.getClass().toString());
- return e;
- }
- break;
- case CREATE_ONLY:
- try {
- if (registry.containsLid(lid)) {
- ObjectExistsExceptionType e = rsFactory
- .createObjectExistsExceptionType();
- e.setMessage("Object LID exitsts in registry: " + lid);
- return e;
- }
- if (id == null) {
- // "If unspecified Server MUST generate UUID URN"
- // TODO Generate UUID.
- }
- if (registry.containsId(id)) {
- ObjectExistsExceptionType e = rsFactory
- .createObjectExistsExceptionType();
- e.setMessage("Object ID exitsts in registry: " + id);
- return e;
- } else {
- toCreate.add(obj);
- }
- } catch (IOException ioe) {
- RegistryExceptionType e = rsFactory
- .createRegistryExceptionType();
- e.setMessage("Error contacting registry.");
- e.setDetail(ioe.toString());
- e.setCode(ioe.getClass().toString());
- return e;
- }
- break;
- }
- }
-
- RegistryExceptionType e = null;
- if (toCreate.size() > 0) {
- for (RegistryObjectType obj : toCreate) {
- statusHandler.info("Creating entry (" + "id: " + obj.getId()
- + " lid: " + obj.getLid());
- }
- e = registry.create(toCreate);
- if (e != null)
- return e;
- }
- if (toReplace.size() > 0) {
- for (RegistryObjectType obj : toReplace) {
- statusHandler.info("Replacing entry (" + "id: " + obj.getId()
- + " lid: " + obj.getLid());
- }
- e = registry.replace(toReplace);
- if (e != null)
- return e;
- }
- if (toVersion.size() > 0) {
- for (RegistryObjectType obj : toVersion) {
- statusHandler.info("Versioning entry (" + "id: " + obj.getId()
- + " lid: " + obj.getLid());
- }
- e = registry.version(toVersion);
- if (e != null)
- return e;
- }
- statusHandler.info("Entries successfully submitted to registry");
- return null;
- }
-
- /**
- * The Remove Objects protocol allows a client to remove or delete one or
- * more RegistryObject instances from the server.
- *
- * A client initiates the RemoveObjects protocol by sending a
- * RemoveObjectsRequest message to the LifecycleManager endpoint.
- *
- * The LifecycleManager sends a RegistryResponse back to the client as
- * response.
- *
- * @param partRemoveObjectsRequest
- * The partRemoveObjectsRequest is a container class containing
- * details of the objects to be deleted from the registry. The
- * protocol for handling such requests is describe herein. This
- * object contains the following information:
- *
- * checkReferences – Specifies the reference checking behavior
- * expected of the server:
- *
- * true - Specifies that a server MUST check objects being
- * removed and make sure that there are no references to them
- * from other objects via reference attributes and slots. If a
- * reference exists then the server MUST return
- * {@link ReferencesExistsException}
- * false (default) – Specifies that a server MUST NOT
- * check objects being removed to make sure that there are no
- * references to them from other objects via reference attributes
- * and slots. If a reference exists then the server MUST NOT
- * return {@link ReferencesExistsException}
- *
- * deleteChildren – This attribute specifies whether or not to
- * delete children of the objects being deleted according to the
- * following behavior:
- *
- * false – Specifies the server MUST NOT delete the
- * children of objects that are specified to be deleted
- *
- * true – Specifies the server MUST delete children of
- * objects being deleted if and only if those children are not
- * children of any other parent objects
- *
- * deletionScope - This attribute specifies the scope of impact
- * of the RemoveObjectsRequest. The value of the deletionScope
- * attribute MUST be a reference to a ClassificationNode within
- * the canonical DeletionScopeType ClassificationScheme as
- * described in ebRIM. A server MUST support the deletionScope
- * types as defined by the canonical DeletionScopeType
- * ClassificationScheme. The canonical DeletionScopeType
- * ClassificationScheme may be extended by adding additional
- * ClassificationNodes to it
- *
- * The following canonical ClassificationNodes are defined for
- * the DeletionScopeType ClassificationScheme:
- *
- * DeleteRepositoryItemOnly - Specifies that the server
- * MUST delete the RepositoryItem for the specified
- * ExtrinsicObjects but MUST NOT delete the specified
- * ExtrinsicObjects
- *
- * DeleteAll (default) - Specifies that the request MUST
- * delete both the RegistryObject and the RepositoryItem (if any)
- * for the specified objects
- *
- * Query - Specifies a query to be invoked. A server MUST remove
- * all objects that match the specified query in addition to any
- * other objects identified by the ObjectRefList element.
- *
- * ObjectRefList - Specifies a collection of references to
- * existing RegistryObject instances in the server. A server MUST
- * remove all objects that are referenced by this element in
- * addition to any other objects identified by the Query element.
- * @returns {@link RegistryResponseType} - The response contains the status
- * of the request. This is returned only upon success
- * @throws MsgRegistryException
- * The MsgRegistryException is returned if the request failed
- * and wraps the following exceptions for the following reasons:
- *
- * {@link ReferencesExistsException} Returned in the following
- * cases:
- *
- * · If checkReferences is true and a reference exists to them
- *
- *
- * {@link UnresolvedReferenceException} Returned in the
- * following cases:
- *
- * · If the requestor referenced an object within the request
- * that was not resolved during the processing of the request.
- */
- @Override
- public RegistryResponseType removeObjects(
- RemoveObjectsRequest partRemoveObjectsRequest)
- throws MsgRegistryException {
-
- boolean checkReferences = partRemoveObjectsRequest.isCheckReferences();
- if (checkReferences) {
- statusHandler
- .info("Checking object references is currently unimplemented!");
- // TODO Implement. See section 4.3.1.2
- }
-
- boolean deleteChildren = partRemoveObjectsRequest.isDeleteChildren();
- if (deleteChildren) {
- statusHandler
- .warn("The deleteChildren option is currently unimplemented");
- // TODO: Implement deleteChildren behavior
- }
-
- String deletionScope = partRemoveObjectsRequest.getDeletionScope();
- if (deletionScope != null) {
- statusHandler
- .warn("The deletionScope option is currently unimplemented");
- // TODO: Implement deletionScope behavior
- }
-
- // TODO Exceptions. See section 4.3.1.4
-
- ObjectRefListType objRefList = partRemoveObjectsRequest
- .getObjectRefList();
- List objRefs = new ArrayList();
- if (objRefList != null) {
- objRefs.addAll(objRefList.getObjectRef());
- }
-
- List queriedRefs = new ArrayList();
- try {
- QueryType query = partRemoveObjectsRequest.getQuery();
- if (query != null) {
- queriedRefs = performQuery(query);
- }
- } catch (IllegalStateException e) {
- oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory rsFactory = new oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory();
- StringWriter writer = new StringWriter();
- e.printStackTrace(new PrintWriter(writer));
- RegistryExceptionType re = rsFactory.createRegistryExceptionType();
- re.setMessage(e.getMessage());
- re.setDetail(writer.toString());
- re.setCode(e.getClass().toString());
-
- throw new MsgRegistryException("Request not implemented", re, e);
- }
-
- statusHandler.info("Object references specified: " + objRefs.size());
- statusHandler.info("Object references returned from query: "
- + queriedRefs.size());
- objRefs.addAll(queriedRefs);
- statusHandler.info("Attempting to remove " + objRefs.size()
- + " objects.");
- RegistryExceptionType e = internalRemoveObjects(objRefs);
- if (e != null) {
- throw new MsgRegistryException("Request failed: " + e.getMessage(),
- e);
- }
-
- // TODO Implement Audit Trails. See section 4.1.2
- statusHandler.info("Notifying listeners..");
- for (LifecycleListener listener : listeners) {
- listener.objectsRemoved(objRefs);
- }
-
- oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory rsFactory = new oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory();
-
- RegistryResponseType response = rsFactory.createRegistryResponseType();
- response.setRequestId(partRemoveObjectsRequest.getId());
- response.setStatus("Success");
- statusHandler
- .info("removeObjects complete. Returning success response.");
- return response;
- }
-
- /**
- * @See {@link LifecycleManagerImpl#removeObjects} for details
- */
- private RegistryExceptionType internalRemoveObjects(
- List objectRefs) {
- oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory rsFactory = new oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory();
-
- try {
- for (ObjectRefType ref : objectRefs) {
- if (!registry.containsId(ref.getId())) {
- UnresolvedReferenceExceptionType e = rsFactory
- .createUnresolvedReferenceExceptionType();
- e.setMessage("ID not found in registry: " + ref.getId());
- return e;
- }
- }
- } catch (IOException ioe) {
- StringWriter writer = new StringWriter();
- ioe.printStackTrace(new PrintWriter(writer));
-
- RegistryExceptionType e = rsFactory.createRegistryExceptionType();
- e.setMessage("Error contacting registry.");
- e.setDetail(writer.toString());
- e.setCode(ioe.getClass().toString());
- return e;
- }
-
- return registry.remove(objectRefs);
- }
-
- /**
- * The UpdateObjectsRequest protocol allows a client to make partial updates
- * to one or more RegistryObjects that already exist in the server. This
- * protocol enables partial update of RegistryObjects rather than a complete
- * replacement. A client SHOULD use the SubmitObjects protocol for complete
- * replacement of RegistryObjects.
- *
- * A server MUST return InvalidRequestException fault message if the client
- * attempts to update the id, lid or objectType attribute of a
- * RegistryObject.
- *
- * Query - Specifies a query to be invoked. A server MUST use all objects
- * that match the specified query in addition to any other objects
- * identified by the ObjectRefList element as targets of the update action.
- *
- * ObjectRefList - Specifies a collection of references to existing
- * RegistryObject instances in the server. A server MUST use all objects
- * that are referenced by this element in addition to any other objects
- * identified by the Query element as targets of the update action.
- *
- * UpdateAction – Specifies the details of how to update the target objects
- *
- * checkReferences – Specifies the reference checking behavior expected of
- * the server:
- *
- * true - Specifies that a server MUST check updated objects and make
- * sure that all references via reference attributes and slots to other
- * RegistryObjects are resolvable. If a reference does not resolve then the
- * server MUST return UnresolvedReferenceException
- *
- * false (default) – Specifies that a server MUST NOT check updated
- * objects to make sure that all references via reference attributes and
- * slots to other RegistryObjects are resolvable. If a reference does not
- * resolve then the server MUST NOT return UnresolvedReferenceException
- *
- * mode – Specifies the semantics for how the server should handle
- * RegistryObjects being updated in the server:
- *
- * CreateOrReplace (default) - If an object does not exist, server
- * MUST return ObjectNotFoundException. If an object already exists, server
- * MUST update the existing object without creating a new version
- *
- * CreateOrVersion - If an object does not exist, server MUST return
- * ObjectNotFoundException. If an object already exists, server MUST create
- * a new version of the existing object before applying the requested update
- * action
- *
- * CreateOnly – This mode does not apply to UpdateObjectsRequest. If
- * specified, server MUST return an InvalidRequestException
- *
- * @param partUpdateObjectsRequest
- * @returns {@link RegistryResponseType}
- * @throws MsgRegistryException
- */
- public RegistryResponseType updateObjects(
- UpdateObjectsRequest partUpdateObjectsRequest)
- throws MsgRegistryException {
- boolean checkReferences = partUpdateObjectsRequest.isCheckReferences();
- if (checkReferences) {
- statusHandler
- .info("Checking object references is currently unimplemented!");
- // TODO Implement. See section 4.3.1.2
- }
- Mode mode = partUpdateObjectsRequest.getMode();
- ObjectRefListType objRefList = partUpdateObjectsRequest
- .getObjectRefList();
- List objRefs = new ArrayList();
- if (objRefList != null) {
- objRefs.addAll(objRefList.getObjectRef());
- }
-
- List queriedRefs = new ArrayList();
- try {
- QueryType query = partUpdateObjectsRequest.getQuery();
- if (query != null) {
- queriedRefs = performQuery(query);
- objRefs.addAll(queriedRefs);
- }
- } catch (IllegalStateException e) {
- oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory rsFactory = new oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory();
- StringWriter writer = new StringWriter();
- e.printStackTrace(new PrintWriter(writer));
- RegistryExceptionType re = rsFactory.createRegistryExceptionType();
- re.setMessage(e.getMessage());
- re.setDetail(writer.toString());
- re.setCode(e.getClass().toString());
- throw new MsgRegistryException("Error executing query for update",
- re, e);
- }
- List updateActions = partUpdateObjectsRequest
- .getUpdateAction();
- RegistryExceptionType e = registry.update(objRefs, updateActions, mode);
- if (e != null) {
- throw new MsgRegistryException("Request failed: " + e.getMessage(),
- e);
- }
-
- // TODO Implement Audit Trails. See section 4.1.2
- statusHandler.info("Notifying listeners..");
- for (LifecycleListener listener : listeners) {
- listener.objectsUpdated(objRefs);
- }
-
- oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory rsFactory = new oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory();
-
- RegistryResponseType response = rsFactory.createRegistryResponseType();
- response.setRequestId(partUpdateObjectsRequest.getId());
- response.setStatus("Success");
- statusHandler
- .info("updateObjects complete. Returning success response.");
- return response;
- }
-
- /**
- * Perform the given query to retrieve a list of references.
- *
- * @param query
- * @return
- * @throws MsgRegistryException
- * if the query exceptioned.
- * @throws IllegalStateException
- * if the QueryManager is not defined.
- */
- protected List performQuery(QueryType query)
- throws MsgRegistryException, IllegalStateException {
- oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory queryFactory = new oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory();
-
- if (queryManager == null) {
- throw new IllegalStateException("QueryManager must not be null");
- }
-
- QueryRequest request = queryFactory.createQueryRequest();
- request.setQuery(query);
- request.setId(Long.toString(System.currentTimeMillis())); // TODO better
- // ID.
-
- ResponseOptionType responseOption = queryFactory
- .createResponseOptionType();
- responseOption.setReturnType("ObjectRef");
- request.setResponseOption(responseOption);
-
- List refList = new ArrayList();
- QueryResponse response = queryManager.executeQuery(request);
- if (response != null) {
- // TODO Replace the following with the commented out code below when
- // QueryManager works right.
- RegistryObjectListType objList = response.getRegistryObjectList();
- if (objList != null) {
- oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory rimFactory = new oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory();
- for (RegistryObjectType obj : objList.getRegistryObject()) {
- ObjectRefType ref = rimFactory.createObjectRefType();
- ref.setId(obj.getLid());
- refList.add(ref);
- }
- }
- /*
- * TODO This should be the actual way to do it, but QueryManager
- * doesn't support references yet. ObjectRefListType objRefList =
- * response.getObjectRefList(); if (objRefList != null) {
- * refList.addAll(objRefList.getObjectRef()); }
- */
- }
-
- return refList;
- }
-
- /**
- * @return the queryManager
- */
- public QueryManager getQueryManager() {
- return queryManager;
- }
-
- /**
- * @param queryManager
- * the queryManager to set
- */
- public void setQueryManager(QueryManager queryManager) {
- this.queryManager = queryManager;
- }
-
- /**
- * @param listener
- * the {@link LifecycleListener} to add.
- */
- public void addListener(LifecycleListener listener) {
- listeners.add(listener);
- }
-
- /**
- * @param listener
- * the {@link LifecycleListener} to remove.
- */
- public void removeListener(LifecycleListener listener) {
- listeners.remove(listener);
- }
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/services/QueryManagerImpl.java b/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/services/QueryManagerImpl.java
deleted file mode 100644
index 3fd18d82e7..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/services/QueryManagerImpl.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- *
- */
-package com.raytheon.uf.edex.ebxml.services;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.MsgRegistryException;
-import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.QueryManager;
-import oasis.names.tc.ebxml.regrep.xsd.query.v4.QueryRequest;
-import oasis.names.tc.ebxml.regrep.xsd.query.v4.QueryResponse;
-import oasis.names.tc.ebxml.regrep.xsd.query.v4.ResponseOptionType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType;
-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.rs.v4.RegistryExceptionType;
-import oasis.names.tc.ebxml.regrep.xsd.rs.v4.UnsupportedCapabilityExceptionType;
-
-import com.raytheon.uf.edex.ebxml.query.AdhocQueryHandler;
-import com.raytheon.uf.edex.ebxml.query.BasicQueryHandler;
-import com.raytheon.uf.edex.ebxml.query.IQueryHandler;
-
-/**
- * Implementation of the {@link QueryManager}.
- *
- *
- *
- * Note: Quoted comments come from regrep-rs.pdf
- *
- * @author jsherida
- */
-public class QueryManagerImpl implements QueryManager {
-
- protected Map queryHandlers = Collections
- .synchronizedMap(new HashMap());
-
- /** Default Constructor. */
- public QueryManagerImpl() {
- queryHandlers.put(BasicQueryHandler.QUERY_DEFINITION,
- new BasicQueryHandler());
- queryHandlers.put(AdhocQueryHandler.QUERY_DEFINITION,
- new AdhocQueryHandler());
- }
-
- /** {@inheritDoc} */
- @Override
- public QueryResponse executeQuery(QueryRequest partQueryRequest)
- throws MsgRegistryException {
-
- ResponseOptionType responseOption = partQueryRequest
- .getResponseOption();
-
- long depth = partQueryRequest.getDepth().longValue();
- boolean federated = partQueryRequest.isFederated();
- String federation = partQueryRequest.getFederation();
- String lang = partQueryRequest.getLang();
- boolean matchOlderVersions = partQueryRequest.isMatchOlderVersions();
- long maxResults = partQueryRequest.getMaxResults().longValue();
- long startIndex = partQueryRequest.getStartIndex().longValue();
-
- QueryType query = partQueryRequest.getQuery();
- IQueryHandler handler = queryHandlers.get(query.getQueryDefinition());
- List matchingObjects = new ArrayList();
- if (handler == null) {
- oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory rsFactory = new oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory();
-
- UnsupportedCapabilityExceptionType e = rsFactory
- .createUnsupportedCapabilityExceptionType();
- e.setMessage("Query type not supported: "
- + query.getQueryDefinition());
- e.setDetail(query.getQueryDefinition());
- throw new MsgRegistryException("Query not supported", e);
- } else {
- try {
- matchingObjects.addAll(handler.handleQuery(query, federated,
- federation, startIndex, maxResults, depth,
- matchOlderVersions));
- } catch (IOException ioe) {
- oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory rsFactory = new oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory();
-
- StringWriter writer = new StringWriter();
- ioe.printStackTrace(new PrintWriter(writer));
-
- RegistryExceptionType e = rsFactory
- .createRegistryExceptionType();
- e.setMessage(ioe.getMessage());
- e.setDetail(writer.toString());
- e.setCode(ioe.getClass().toString());
- throw new MsgRegistryException("Query failed", e, ioe);
- }
- }
-
- oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory queryFactory = new oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory();
- oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory rimFactory = new oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory();
-
- QueryResponse response = queryFactory.createQueryResponse();
- response.setRequestId(partQueryRequest.getId());
- response.setStatus("urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success");
- response.setTotalResultCount(new BigInteger(Integer
- .toString(matchingObjects.size())));
-
- RegistryObjectListType objList = rimFactory
- .createRegistryObjectListType();
- List objects = objList.getRegistryObject();
- objects.addAll(matchingObjects);
-
- response.setRegistryObjectList(objList);
-
- return response;
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/services/ValidatorImpl.java b/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/services/ValidatorImpl.java
deleted file mode 100644
index 947fc14e39..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/services/ValidatorImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *
- */
-package com.raytheon.uf.edex.ebxml.services;
-
-import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.MsgRegistryException;
-import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.Validator;
-import oasis.names.tc.ebxml.regrep.xsd.spi.v4.ObjectFactory;
-import oasis.names.tc.ebxml.regrep.xsd.spi.v4.ValidateObjectsRequest;
-import oasis.names.tc.ebxml.regrep.xsd.spi.v4.ValidateObjectsResponse;
-
-/**
- * @author jsherida
- *
- */
-public class ValidatorImpl implements Validator {
-
- /** {@inheritDoc} */
- @Override
- public ValidateObjectsResponse validateObjects(
- ValidateObjectsRequest partValidateObjectsRequest)
- throws MsgRegistryException {
- // TODO Auto-generated method stub
-
- ObjectFactory factory = new ObjectFactory();
- ValidateObjectsResponse response = factory.createValidateObjectsResponse();
- response.setRequestId(partValidateObjectsRequest.getId());
- response.setStatus("Request Not Implemented");
- return response;
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/InsertMarshaller.java b/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/InsertMarshaller.java
deleted file mode 100644
index 0acd6476b8..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/InsertMarshaller.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- *
- */
-package com.raytheon.uf.edex.ebxml.test;
-
-import java.util.List;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-
-import com.raytheon.uf.edex.ebxml.util.EbxmlJaxbManager;
-import com.raytheon.uf.edex.ebxml.util.EbxmlUtil;
-
-import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.Mode;
-import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.SubmitObjectsRequest;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ClassificationType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.CollectionValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.DateTimeValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.DurationValueType;
-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;
-
-/**
- * @author jsherida
- */
-public class InsertMarshaller {
-
- /**
- * @param args none
- */
- public static void main(String[] args) {
- oasis.names.tc.ebxml.regrep.xsd.lcm.v4.ObjectFactory lcmFactory =
- new oasis.names.tc.ebxml.regrep.xsd.lcm.v4.ObjectFactory();
- oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory rimFactory =
- new oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory();
-
- // Construct an example message
- /* Based on solr schema:
-
-
-
-
-
-
-
-
-
-
- */
- SubmitObjectsRequest request = lcmFactory.createSubmitObjectsRequest();
- request.setId("123");
- request.setComment("Test SubmitObjects");
- request.setMode(Mode.CREATE_OR_REPLACE);
-
- // Metar registry object
- RegistryObjectType metarRegObj = rimFactory.createRegistryObjectType();
- metarRegObj.setId("serviceUID0001");
- metarRegObj.setLid("serviceUID0001");
- metarRegObj.setName(EbxmlUtil.getIntlString("National Weather Service Metar"));
- metarRegObj.setDescription(EbxmlUtil.getIntlString(
- "Metar point data from the National Weather Service (NWS)."));
- metarRegObj.setObjectType("MetarService");
-
- ClassificationType pointClass = rimFactory.createClassificationType();
- pointClass.setClassificationNode("point");
- ClassificationType metarClass = rimFactory.createClassificationType();
- metarClass.setClassificationNode("metar");
- ClassificationType wfsClass = rimFactory.createClassificationType();
- wfsClass.setClassificationNode("wfs");
- metarRegObj.getClassification().add(pointClass);
- metarRegObj.getClassification().add(metarClass);
- metarRegObj.getClassification().add(wfsClass);
-
- SlotType locationSlot = rimFactory.createSlotType();
- locationSlot.setName("location");
- StringValueType locationValue = rimFactory.createStringValueType();
- locationValue.setValue("35.2452,-122.3845");
- locationSlot.setSlotValue(locationValue);
-
- SlotType metarLinkSlot = rimFactory.createSlotType();
- metarLinkSlot.setName("link");
- StringValueType metarLinkValue = rimFactory.createStringValueType();
- metarLinkValue.setValue("http://metarland.org:8080/wfs");
- metarLinkSlot.setSlotValue(metarLinkValue);
-
- metarRegObj.getSlot().add(locationSlot);
- metarRegObj.getSlot().add(metarLinkSlot);
-
- // Satellite registry object
- RegistryObjectType satelliteRegObj = rimFactory.createRegistryObjectType();
- satelliteRegObj.setId("serviceUID0002");
- satelliteRegObj.setLid("serviceUID0002");
- satelliteRegObj.setName(EbxmlUtil.getIntlString("NASA GOES Imagery"));
- satelliteRegObj.setDescription(EbxmlUtil.getIntlString(
- "Satellite raster data from NASA. Includes water vapor, infrared, and visible images."));
- satelliteRegObj.setObjectType("SatelliteService");
-
- ClassificationType rasterClass = rimFactory.createClassificationType();
- rasterClass.setClassificationNode("raster");
- ClassificationType satelliteClass = rimFactory.createClassificationType();
- satelliteClass.setClassificationNode("satellite");
- ClassificationType wcsClass = rimFactory.createClassificationType();
- wcsClass.setClassificationNode("wfs");
- satelliteRegObj.getClassification().add(rasterClass);
- satelliteRegObj.getClassification().add(satelliteClass);
- satelliteRegObj.getClassification().add(wcsClass);
-
- SlotType ulLocationSlot = rimFactory.createSlotType();
- ulLocationSlot.setName("location"); //"ulLocation");
- StringValueType ulValue = rimFactory.createStringValueType();
- ulValue.setValue("45.00,-122.00");
- ulLocationSlot.setSlotValue(ulValue);
-
-// SlotType lrLocationSlot = rimFactory.createSlotType();
-// lrLocationSlot.setName("lrLocation");
-// StringValueType lrValue = rimFactory.createStringValueType();
-// lrValue.setValue("20.00,-100.00");
-// lrLocationSlot.setSlotValue(lrValue);
-
- SlotType satLinkSlot = rimFactory.createSlotType();
- satLinkSlot.setName("link");
- StringValueType satLinkValue = rimFactory.createStringValueType();
- satLinkValue.setValue("http://satellicious.com:8080/wcs");
- satLinkSlot.setSlotValue(satLinkValue);
-
- // Testing output:
- SlotType timePeriodSlot = rimFactory.createSlotType();
- timePeriodSlot.setName("timePeriod");
- DurationValueType timePeriodValue = rimFactory.createDurationValueType();
- try {
- timePeriodValue.setValue(DatatypeFactory.newInstance().newDuration(30000));
- } catch (DatatypeConfigurationException e1) {
- e1.printStackTrace();
- }
- timePeriodSlot.setSlotValue(timePeriodValue);
-
- // Testing output:
- SlotType dateSlot = rimFactory.createSlotType();
- dateSlot.setName("timePeriod");
- DateTimeValueType dateValue = rimFactory.createDateTimeValueType();
- try {
- dateValue.setValue(DatatypeFactory.newInstance().newXMLGregorianCalendar());
- } catch (DatatypeConfigurationException e1) {
- e1.printStackTrace();
- }
- dateSlot.setSlotValue(dateValue);
-
- // Testing output:
- SlotType collSlot = rimFactory.createSlotType();
- collSlot.setName("timePeriod");
- CollectionValueType collValue = rimFactory.createCollectionValueType();
- collValue.setCollectionType("StringValueType");
- collValue.getElement().add(satLinkValue);
- collSlot.setSlotValue(collValue);
-
- satelliteRegObj.getSlot().add(ulLocationSlot);
-// satelliteRegObj.getSlot().add(lrLocationSlot);
- satelliteRegObj.getSlot().add(satLinkSlot);
- satelliteRegObj.getSlot().add(timePeriodSlot);
- satelliteRegObj.getSlot().add(dateSlot);
- satelliteRegObj.getSlot().add(collSlot);
-
- // Fill list
- RegistryObjectListType regObjList = rimFactory.createRegistryObjectListType();
- List objects = regObjList.getRegistryObject();
- objects.add(metarRegObj);
- objects.add(satelliteRegObj);
-
- request.setRegistryObjectList(regObjList);
-
- EbxmlJaxbManager manager = EbxmlJaxbManager.getInstance();
- try {
- // Marshal it
- String requestStr = manager.marshal(request);
- // Print it
- System.out.println(requestStr);
- } catch (JAXBException e) {
- // Or, print error
- e.printStackTrace();
- }
-
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/QueryMarshaller.java b/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/QueryMarshaller.java
deleted file mode 100644
index 3781386090..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/QueryMarshaller.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- *
- */
-package com.raytheon.uf.edex.ebxml.test;
-
-import java.math.BigInteger;
-import java.util.Collection;
-
-import javax.xml.bind.JAXBException;
-
-import oasis.names.tc.ebxml.regrep.xsd.query.v4.QueryRequest;
-import oasis.names.tc.ebxml.regrep.xsd.query.v4.ResponseOptionType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.StringValueType;
-
-import com.raytheon.uf.edex.ebxml.util.EbxmlJaxbManager;
-
-/**
- * @author jsherida
- */
-public class QueryMarshaller {
-
- /**
- * @param args
- * none
- */
- public static void main(String[] args) {
- oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory queryFactory = new oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory();
- oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory rimFactory = new oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory();
-
- // Construct an example query
- QueryRequest request = queryFactory.createQueryRequest();
- request.setId("123");
- request.setComment("Test Request");
- request.setStartIndex(new BigInteger("0"));
- request.setMaxResults(new BigInteger("-1"));
-
- ResponseOptionType responseOption = queryFactory
- .createResponseOptionType();
- responseOption.setReturnComposedObjects(Boolean.TRUE);
- responseOption.setReturnType("RegistryObject");
- request.setResponseOption(responseOption);
-
- QueryType queryType = rimFactory.createQueryType();
- queryType
- .setQueryDefinition("urn:oasis:names:tc:ebxml-regrep:query:BasicQuery");
-
- SlotType descSlot = rimFactory.createSlotType();
- descSlot.setName("description");
- StringValueType descValue = rimFactory.createStringValueType();
- descValue.setValue("satellite");
- descSlot.setSlotValue(descValue);
-
- SlotType nameSlot = rimFactory.createSlotType();
- nameSlot.setName("name");
- StringValueType nameValue = rimFactory.createStringValueType();
- nameValue.setValue("GOES");
- nameSlot.setSlotValue(nameValue);
-
- SlotType expressionSlot = rimFactory.createSlotType();
- expressionSlot.setName("queryExpression");
- StringValueType expressionValue = rimFactory.createStringValueType();
- expressionValue.setValue("*:*");
- expressionSlot.setSlotValue(expressionValue);
-
- SlotType languageSlot = rimFactory.createSlotType();
- languageSlot.setName("queryLanguage");
- StringValueType languageValue = rimFactory.createStringValueType();
- languageValue.setValue("solr");
- languageSlot.setSlotValue(languageValue);
-
- Collection slots = queryType.getSlot();
- slots.add(descSlot);
- slots.add(nameSlot);
- slots.add(expressionSlot);
- slots.add(languageSlot);
-
- request.setQuery(queryType);
-
- EbxmlJaxbManager manager = EbxmlJaxbManager.getInstance();
- try {
- // Marshal it
- String requestStr = manager.marshal(request);
- // Print it
- System.out.println(requestStr);
- } catch (JAXBException e) {
- // Or, print error
- e.printStackTrace();
- }
-
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/RemoveMarshaller.java b/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/RemoveMarshaller.java
deleted file mode 100644
index cf7ddf1222..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/RemoveMarshaller.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- *
- */
-package com.raytheon.uf.edex.ebxml.test;
-
-import javax.xml.bind.JAXBException;
-
-import com.raytheon.uf.edex.ebxml.util.EbxmlJaxbManager;
-
-import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.RemoveObjectsRequest;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectRefListType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectRefType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.StringValueType;
-
-/**
- * @author jsherida
- *
- */
-public class RemoveMarshaller {
-
- /**
- * @param args none
- */
- public static void main(String[] args) {
- oasis.names.tc.ebxml.regrep.xsd.lcm.v4.ObjectFactory lcmFactory =
- new oasis.names.tc.ebxml.regrep.xsd.lcm.v4.ObjectFactory();
- oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory rimFactory =
- new oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory();
-
- // Construct an example message
- RemoveObjectsRequest request = lcmFactory.createRemoveObjectsRequest();
- request.setId("123");
- request.setComment("Test RemoveObjects");
- request.setDeleteChildren(true);
- request.setDeletionScope("DeleteRepositoryItemOnly");
-
- // List ID #2
- ObjectRefType ref = rimFactory.createObjectRefType();
- ref.setId("serviceUID0002");
-
- ObjectRefListType refList = rimFactory.createObjectRefListType();
- refList.getObjectRef().add(ref);
-
- request.setObjectRefList(refList);
-
- // Query for "metar" (ID #1)
- QueryType query = rimFactory.createQueryType();
- query.setQueryDefinition("urn:oasis:names:tc:ebxml-regrep:query:BasicQuery");
-
- SlotType descSlot = rimFactory.createSlotType();
- descSlot.setName("description");
- StringValueType descValue = rimFactory.createStringValueType();
- descValue.setValue("metar");
- descSlot.setSlotValue(descValue);
-
- query.getSlot().add(descSlot);
-
- request.setQuery(query);
-
-
- EbxmlJaxbManager manager = EbxmlJaxbManager.getInstance();
- try {
- // Marshal it
- String requestStr = manager.marshal(request);
- // Print it
- System.out.println(requestStr);
- } catch (JAXBException e) {
- // Or, print error
- e.printStackTrace();
- }
-
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/UpdateMarshaller.java b/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/UpdateMarshaller.java
deleted file mode 100644
index b3b7194dec..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/test/UpdateMarshaller.java
+++ /dev/null
@@ -1,116 +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.ebxml.test;
-
-import java.util.List;
-
-import javax.xml.bind.JAXBException;
-
-import com.raytheon.uf.edex.ebxml.util.EbxmlJaxbManager;
-import com.raytheon.uf.edex.ebxml.util.EbxmlUtil;
-
-import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.Mode;
-import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.UpdateActionType;
-import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.UpdateObjectsRequest;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.AnyValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ClassificationType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.InternationalStringType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.InternationalStringValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.LocalizedStringType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectRefListType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectRefType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryExpressionType;
-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.StringQueryExpressionType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.StringValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.VersionInfoType;
-
-/**
- * TODO Add Description
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Dec 16, 2011 bphillip Initial creation
- *
- *
- *
- * @author bphillip
- * @version 1.0
- */
-
-public class UpdateMarshaller {
-
- /**
- * @param args
- * none
- */
- public static void main(String[] args) {
- oasis.names.tc.ebxml.regrep.xsd.lcm.v4.ObjectFactory lcmFactory = new oasis.names.tc.ebxml.regrep.xsd.lcm.v4.ObjectFactory();
- oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory rimFactory = new oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory();
- oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory queryFactory = new oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory();
-
- UpdateObjectsRequest request = lcmFactory.createUpdateObjectsRequest();
- request.setId("0");
- request.setComment("Test SubmitObjects");
- request.setMode(Mode.CREATE_OR_REPLACE);
-
-
- ObjectRefListType objRefList = new ObjectRefListType();
- ObjectRefType ref = new ObjectRefType();
- ref.setId("0");
- objRefList.getObjectRef().add(ref);
- request.setObjectRefList(objRefList);
-
-
- UpdateActionType updateAction = new UpdateActionType();
- updateAction.setMode("UPDATE");
- InternationalStringValueType val = new InternationalStringValueType();
- InternationalStringType t = new InternationalStringType();
- LocalizedStringType lst = new LocalizedStringType();
- lst.setLang("en-US");
- lst.setValue("New Description");
- t.getLocalizedString().add(lst);
- val.setValue(t);
- updateAction.setValueHolder(val);
- StringQueryExpressionType queryType = rimFactory
- .createStringQueryExpressionType();
- queryType.setQueryLanguage("XPath");
- queryType.setValue("./rim:Name");
- updateAction.setSelector(queryType);
- request.getUpdateAction().add(updateAction);
-
- EbxmlJaxbManager manager = EbxmlJaxbManager.getInstance();
- try {
- // Marshal it
- String requestStr = manager.marshal(request);
- // Print it
- System.out.println(requestStr);
- } catch (JAXBException e) {
- // Or, print error
- e.printStackTrace();
- }
- }
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/util/EbxmlJaxbManager.java b/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/util/EbxmlJaxbManager.java
deleted file mode 100644
index a026d56eb2..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/util/EbxmlJaxbManager.java
+++ /dev/null
@@ -1,242 +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.ebxml.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Map;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-import org.apache.cxf.helpers.IOUtils;
-
-/**
- * TODO Add Description
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Dec 14, 2011 bphillip Initial creation
- *
- *
- *
- * @author bphillip
- * @version 1.0
- */
-
-public class EbxmlJaxbManager {
-
- public static final String JAXB_NAMESPACE_MAPPER = "com.sun.xml.bind.namespacePrefixMapper";
-
- private static JAXBContext defaultCtx = null;
-
- private JAXBContext context = null;
-
- // private NamespacePrefixMapper mapper;
-
- /**
- * Private constructor
- *
- * @param prefixmap
- * A map of URI to namespace prefix to use when marshalling or
- * umarshalling.
- */
- private EbxmlJaxbManager(final Map prefixmap) {
- this.context = getDefaultContext();
- // this.mapper = new NamespacePrefixMapper() {
- // @Override
- // public String getPreferredPrefix(String namespaceUri,
- // String suggestion, boolean requirePrefix) {
- // return prefixmap.get(namespaceUri);
- // }
- // };
- }
-
- /** Private default constructor. */
- private EbxmlJaxbManager() {
- this.context = getDefaultContext();
- }
-
- /**
- * @return A new instance of {@link EbxmlJaxbManager} that does not use a
- * prefix map.
- */
- public static EbxmlJaxbManager getInstance() {
- return new EbxmlJaxbManager();
- }
-
- /**
- * @param prefixmap
- * A map of URI to namespace prefix to use when marshalling or
- * umarshalling.
- * @return A new instance of {@link EbxmlJaxbManager} that uses a prefix
- * map.
- */
- public static EbxmlJaxbManager getInstance(
- final Map prefixmap) {
- return new EbxmlJaxbManager(prefixmap);
- }
-
- /**
- * @return The default context.
- */
- private JAXBContext getDefaultContext() {
- if (defaultCtx == null) {
- defaultCtx = createContext();
- }
- return defaultCtx;
- }
-
- /** Create the context based on ObjectFactories that will be needed. */
- private JAXBContext createContext() {
- ArrayList> classList = new ArrayList>();
- classList
- .add(oasis.names.tc.ebxml.regrep.xsd.lcm.v4.ObjectFactory.class);
- classList
- .add(oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory.class);
- classList
- .add(oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory.class);
- classList
- .add(oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory.class);
- classList
- .add(oasis.names.tc.ebxml.regrep.xsd.spi.v4.ObjectFactory.class);
-
- JAXBContext rval = null;
- try {
- rval = JAXBContext.newInstance(classList
- .toArray(new Class[classList.size()]));
- } catch (JAXBException e) {
- e.printStackTrace();
- }
- return rval;
- }
-
- /**
- * Create Java objects from the given XML string.
- *
- * @param xml
- * The xml to unmarshal.
- * @return The Java objects created from the XML.
- * @throws JAXBException
- * if a problem occurred.
- */
- public Object unmarshal(String xml) throws JAXBException {
- Object rval = null;
- Unmarshaller u = context.createUnmarshaller();
- rval = u.unmarshal(new StringReader(xml));
- if (rval instanceof JAXBElement>) {
- rval = ((JAXBElement>) rval).getValue();
- }
- return rval;
- }
-
- /**
- * Create an xml string from the given object.
- *
- * @param obj
- * The object to marshal.
- * @return The XML string created from the Java.
- * @throws JAXBException
- * if a problem occured.
- */
- public String marshal(Object obj) throws JAXBException {
- return marshal(obj, true);
- }
-
- /**
- * Create an xml string from the given object.
- *
- * @param obj
- * The object to marshal.
- * @param formatted
- * whether or not the output should be formatted.
- * @return The XML string created from the Java.
- * @throws JAXBException
- * if a problem occured.
- */
- public String marshal(Object obj, boolean formatted) throws JAXBException {
- return marshal(obj, null, formatted);
- }
-
- /**
- * Create an xml string from the given object.
- *
- * @param obj
- * The object to marshal.
- * @param schemaLocation
- * The location of a schema to use. May be null.
- * @param formatted
- * whether or not the output should be formatted.
- * @return The XML string created from the Java.
- * @throws JAXBException
- * if a problem occured.
- */
- public String marshal(Object obj, String schemaLocation, boolean formatted)
- throws JAXBException {
- String rval = null;
- Marshaller m = context.createMarshaller();
- StringWriter writer = new StringWriter();
-
- m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, formatted);
- // if (mapper != null) {
- // m.setProperty(JAXB_NAMESPACE_MAPPER, mapper);
- // }
- if (schemaLocation != null && !schemaLocation.isEmpty()) {
- m.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, schemaLocation);
- }
- m.marshal(obj, writer);
- rval = writer.toString();
- return rval;
- }
-
- /**
- * @return The current context.
- */
- public JAXBContext getContext() {
- return context;
- }
-
- /**
- * Create Java objects from the given {@link InputStream} containing XML.
- *
- * @param stream
- * The stream to umarshal from.
- * @return The Java objects created from the XMl stream.
- * @throws IOException
- * if there was a problem with the stream.
- * @throws JAXBException
- * if a problem occured.
- */
- public Object unmarshal(InputStream stream) throws JAXBException,
- IOException {
- return unmarshal(IOUtils.toString(stream));
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/util/EbxmlUtil.java b/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/util/EbxmlUtil.java
deleted file mode 100644
index 29827e3a71..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/util/EbxmlUtil.java
+++ /dev/null
@@ -1,221 +0,0 @@
-package com.raytheon.uf.edex.ebxml.util;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import javax.xml.datatype.XMLGregorianCalendar;
-
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.AnyValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.BooleanValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.CollectionValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.DateTimeValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.DurationValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.FloatValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.IntegerValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.InternationalStringType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.InternationalStringValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.LocalizedStringType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.MapValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.StringValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rim.v4.VocabularyTermValueType;
-import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryExceptionType;
-
-/**
- * Utility class containing functions commonly used with ebXML.
- *
- * @author jsherida
- */
-public class EbxmlUtil {
-
- public static List UPDATE_MODES = new ArrayList();
- static {
- UPDATE_MODES.add("Insert");
- UPDATE_MODES.add("Update");
- UPDATE_MODES.add("Delete");
- }
-
- /**
- * Create an {@link InternationalStringType} from the given string.
- * Currently this method assumes the "en-US" language.
- *
- * @param string
- * The string to convert.
- * @return An internationalized string object.
- */
- public static InternationalStringType getIntlString(String string) {
- oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory rimFactory = new oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory();
-
- InternationalStringType intlString = rimFactory
- .createInternationalStringType();
-
- LocalizedStringType localString = rimFactory
- .createLocalizedStringType();
- localString.setLang("en-US");
- localString.setValue(string);
-
- List localizedList = intlString
- .getLocalizedString();
- localizedList.add(localString);
-
- return intlString;
- }
-
- /**
- * Get the {@link String} of the given language from an
- * {@link InternationalStringType}.
- *
- * @param intlString
- * The international string.
- * @param lang
- * The language to retrieve the {@link String} for.
- * @return The {@link String} of the given language, or null if a string for
- * the language could not be found.
- */
- public static String getLocalizedString(InternationalStringType intlString,
- String lang) {
- List localStrings = intlString
- .getLocalizedString();
- String localizedString = null;
- for (LocalizedStringType localStrType : localStrings) {
- if (lang.equals(localStrType.getLang())) {
- localizedString = localStrType.getValue();
- }
- }
- return localizedString;
- }
-
- /**
- * Convenience method for converting a known string {@link ValueType} into a
- * {@link String}.
- *
- * @param value
- * The ValueType
- * @return The String value contained.
- */
- public static String getStringValue(ValueType value) {
- if (value == null) {
- return null;
- }
- return ((StringValueType) value).getValue();
- }
-
- /**
- * Convenience method for converting a known date {@link ValueType} into a
- * {@link Date}.
- *
- * @param value
- * The ValueType
- * @return The Date value contained.
- */
- public static Date getDateValue(ValueType value) {
- if (value == null) {
- return null;
- }
- XMLGregorianCalendar cal = ((DateTimeValueType) value).getValue();
- return cal.toGregorianCalendar().getTime();
- }
-
- /**
- * Convenience method for converting a known float {@link ValueType} into a
- * {@link Float}.
- *
- * @param value
- * The ValueType
- * @return The Float value contained.
- */
- public static Float getFloatValue(ValueType value) {
- if (value == null) {
- return null;
- }
- return ((FloatValueType) value).getValue();
- }
-
- /**
- * Convenience method for converting a known long {@link ValueType} into a
- * {@link Long}.
- *
- * @param value
- * The ValueType
- * @return The Long value contained.
- */
- public static Long getLongValue(ValueType value) {
- if (value == null) {
- return null;
- }
- BigInteger bigint = ((IntegerValueType) value).getValue();
- return Long.valueOf(bigint.longValue());
- }
-
- /**
- * Convenience method for converting a known boolean {@link ValueType} into
- * a {@link Boolean}.
- *
- * @param value
- * The ValueType
- * @return The Boolean value contained.
- */
- public static Boolean getBooleanValue(ValueType value) {
- if (value == null) {
- return null;
- }
- return ((BooleanValueType) value).isValue();
- }
-
- public static String translateException(
- RegistryExceptionType registryException) {
- StringBuilder msg = new StringBuilder();
- msg.append("Registry Exception");
- msg.append("\nCode: ").append(registryException.getCode());
- msg.append("\nDetail: ").append(registryException.getDetail());
- msg.append("\nMessage: ").append(registryException.getMessage());
- msg.append("\nSeverity: ").append(registryException.getSeverity());
- return msg.toString();
- }
-
- public static Object getValue(ValueType value) {
- Object retVal = null;
-
- if (value instanceof AnyValueType) {
- return ((AnyValueType) value).getAny();
- } else if (value instanceof AnyValueType) {
- return ((AnyValueType) value).getAny();
- } else if (value instanceof BooleanValueType) {
- return ((BooleanValueType) value).isValue();
- } else if (value instanceof CollectionValueType) {
- return ((CollectionValueType) value).getElement();
- } else if (value instanceof DateTimeValueType) {
- return ((DateTimeValueType) value).getValue();
- } else if (value instanceof DurationValueType) {
- return ((DurationValueType) value).getValue();
- } else if (value instanceof FloatValueType) {
- return ((FloatValueType) value).getValue();
- } else if (value instanceof IntegerValueType) {
- return ((IntegerValueType) value).getValue();
- } else if (value instanceof InternationalStringValueType) {
- return ((InternationalStringValueType) value).getValue();
- } else if (value instanceof MapValueType) {
- return ((MapValueType) value).getMap();
- } else if (value instanceof SlotValueType) {
- return ((SlotValueType) value).getSlot();
- } else if (value instanceof StringValueType) {
- return ((StringValueType) value).getValue();
- } else if (value instanceof VocabularyTermValueType) {
- return ((VocabularyTermValueType) value).getValue();
- }
- return retVal;
- }
-
- public static boolean isUpdateModeValid(String updateMode) {
- for (String mode : UPDATE_MODES) {
- if (mode.equalsIgnoreCase(updateMode)) {
- return true;
- }
- }
- return false;
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/META-INF/jax-ws-catalog.xml b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/META-INF/jax-ws-catalog.xml
similarity index 100%
rename from edexOsgi/com.raytheon.uf.edex.ebxml/META-INF/jax-ws-catalog.xml
rename to edexOsgi/com.raytheon.uf.edex.registry.ebxml/META-INF/jax-ws-catalog.xml
diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-impl.xml b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-impl.xml
index 8fc4387562..d703377800 100644
--- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-impl.xml
+++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-impl.xml
@@ -15,7 +15,7 @@
+ class="com.raytheon.uf.edex.registry.ebxml.services.notification.NotificationListenerImpl" />
diff --git a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/services/NotificationListenerImpl.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/NotificationListenerImpl.java
similarity index 75%
rename from edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/services/NotificationListenerImpl.java
rename to edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/NotificationListenerImpl.java
index 9ad13ee4cd..b3486f1c2d 100644
--- a/edexOsgi/com.raytheon.uf.edex.ebxml/src/com/raytheon/uf/edex/ebxml/services/NotificationListenerImpl.java
+++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/NotificationListenerImpl.java
@@ -1,18 +1,10 @@
-/**
- *
- */
-package com.raytheon.uf.edex.ebxml.services;
+package com.raytheon.uf.edex.registry.ebxml.services.notification;
import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.NotificationListener;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.NotificationType;
-/**
- * @author jsherida
- *
- */
public class NotificationListenerImpl implements NotificationListener {
- /** {@inheritDoc} */
@Override
public void onNotification(NotificationType notification) {
// TODO Auto-generated method stub
diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/utility/edex_static/base/ebxml/minDB/ext/SubmitObjectsRequest_DataDelivery_OrganizationRoleScheme.xml b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/utility/edex_static/base/ebxml/minDB/ext/SubmitObjectsRequest_DataDelivery_OrganizationRoleScheme.xml
new file mode 100644
index 0000000000..dfcb57bc8a
--- /dev/null
+++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/utility/edex_static/base/ebxml/minDB/ext/SubmitObjectsRequest_DataDelivery_OrganizationRoleScheme.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/edexOsgi/com.raytheon.uf.edex.registry.feature/feature.xml b/edexOsgi/com.raytheon.uf.edex.registry.feature/feature.xml
index cc3daf7d53..8b1e771c4b 100644
--- a/edexOsgi/com.raytheon.uf.edex.registry.feature/feature.xml
+++ b/edexOsgi/com.raytheon.uf.edex.registry.feature/feature.xml
@@ -45,13 +45,6 @@
version="0.0.0"
unpack="false"/>
-
-
-