Search in sources :

Example 6 with IdentifiableType

use of oasis.names.tc.ebxml_regrep.xsd.rim._3.IdentifiableType in project ddf by codice.

the class RegistryPackageTypeHelper method populateLists.

private void populateLists() {
    serviceBindings.clear();
    services.clear();
    extrinsicObjects.clear();
    organizations.clear();
    persons.clear();
    associations.clear();
    if (registryPackageType == null) {
        return;
    }
    if (registryPackageType.isSetRegistryObjectList()) {
        RegistryObjectListType registryObjectList = registryPackageType.getRegistryObjectList();
        for (JAXBElement<? extends IdentifiableType> identifiableType : registryObjectList.getIdentifiable()) {
            RegistryObjectType registryObject = (RegistryObjectType) identifiableType.getValue();
            if (registryObject instanceof ExtrinsicObjectType) {
                extrinsicObjects.add((ExtrinsicObjectType) registryObject);
            } else if (registryObject instanceof ServiceType) {
                ServiceType service = (ServiceType) registryObject;
                services.add(service);
                serviceBindings.addAll(service.getServiceBinding());
            } else if (registryObject instanceof OrganizationType) {
                organizations.add((OrganizationType) registryObject);
            } else if (registryObject instanceof PersonType) {
                persons.add((PersonType) registryObject);
            } else if (registryObject instanceof AssociationType1) {
                associations.add((AssociationType1) registryObject);
            }
        }
    }
}
Also used : RegistryObjectListType(oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryObjectListType) ServiceType(oasis.names.tc.ebxml_regrep.xsd.rim._3.ServiceType) AssociationType1(oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1) ExtrinsicObjectType(oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType) PersonType(oasis.names.tc.ebxml_regrep.xsd.rim._3.PersonType) OrganizationType(oasis.names.tc.ebxml_regrep.xsd.rim._3.OrganizationType) RegistryObjectType(oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryObjectType)

Example 7 with IdentifiableType

use of oasis.names.tc.ebxml_regrep.xsd.rim._3.IdentifiableType in project nhin-d by DirectProject.

the class DefaultXdmXdsTransformer method getDocName.

protected String getDocName(SubmitObjectsRequest submitObjectRequest) {
    if (submitObjectRequest == null) {
        throw new IllegalArgumentException("SubmitObjectRequest must not be null.");
    }
    String ret = null;
    RegistryObjectListType rol = submitObjectRequest.getRegistryObjectList();
    List<JAXBElement<? extends IdentifiableType>> extensible = rol.getIdentifiable();
    for (JAXBElement<? extends IdentifiableType> elem : extensible) {
        String type = elem.getDeclaredType().getName();
        Object value = elem.getValue();
        if (StringUtils.equals(type, "oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType")) {
            String obId = ((ExtrinsicObjectType) value).getId();
            String mimeType = ((ExtrinsicObjectType) value).getMimeType();
            String suffix = "xml";
            if (mimeType.indexOf("xml") >= 0) {
                suffix = "xml";
            } else if (mimeType.indexOf("pdf") >= 0) {
                suffix = "pdf";
            }
            ret = obId + "." + suffix;
            if (LOGGER.isTraceEnabled()) {
                LOGGER.trace(type + " " + value.toString());
            }
        }
    }
    return ret;
}
Also used : RegistryObjectListType(oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryObjectListType) IdentifiableType(oasis.names.tc.ebxml_regrep.xsd.rim._3.IdentifiableType) ExtrinsicObjectType(oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType) JAXBElement(javax.xml.bind.JAXBElement)

Aggregations

ExtrinsicObjectType (oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType)7 RegistryObjectListType (oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryObjectListType)6 JAXBElement (javax.xml.bind.JAXBElement)5 IdentifiableType (oasis.names.tc.ebxml_regrep.xsd.rim._3.IdentifiableType)5 AssociationType1 (oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1)4 RegistryPackageType (oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryPackageType)3 ArrayList (java.util.ArrayList)2 QName (javax.xml.namespace.QName)2 SubmitObjectsRequest (oasis.names.tc.ebxml_regrep.xsd.lcm._3.SubmitObjectsRequest)2 ClassificationType (oasis.names.tc.ebxml_regrep.xsd.rim._3.ClassificationType)2 OrganizationType (oasis.names.tc.ebxml_regrep.xsd.rim._3.OrganizationType)2 PersonType (oasis.names.tc.ebxml_regrep.xsd.rim._3.PersonType)2 RegistryObjectType (oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryObjectType)2 ServiceType (oasis.names.tc.ebxml_regrep.xsd.rim._3.ServiceType)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 ExternalIdentifierType (oasis.names.tc.ebxml_regrep.xsd.rim._3.ExternalIdentifierType)1 SlotType1 (oasis.names.tc.ebxml_regrep.xsd.rim._3.SlotType1)1 DefaultXdmXdsTransformer (org.nhindirect.xd.transform.impl.DefaultXdmXdsTransformer)1