public static List<ExtrinsicObjectType> getExtrinsicObjects(SubmitObjectsRequest so) { List<ExtrinsicObjectType> extrObjs = new ArrayList<ExtrinsicObjectType>(); List<JAXBElement<? extends IdentifiableType>> list = so.getRegistryObjectList().getIdentifiable(); IdentifiableType o; for ( int i = 0, len = list.size() ; i < len ; i++ ) { o = list.get(i).getValue(); if ( o instanceof ExtrinsicObjectType) { extrObjs.add((ExtrinsicObjectType) o); } } return extrObjs; }
private String getSourceID(ProvideAndRegisterDocumentSetRequestType req) { List<JAXBElement<? extends IdentifiableType>> objs = req.getSubmitObjectsRequest().getRegistryObjectList().getIdentifiable(); IdentifiableType obj; for (int i = 0, len = objs.size() ; i < len ; i++) { obj = objs.get(i).getValue(); if (obj instanceof RegistryPackageType) { return InfosetUtil.getExternalIdentifierValue(XDSConstants.UUID_XDSSubmissionSet_sourceId, (RegistryPackageType)obj); } } return null; }
private String getSourceID(ProvideAndRegisterDocumentSetRequestType req) throws XDSException { List<JAXBElement<? extends IdentifiableType>> objs = req.getSubmitObjectsRequest().getRegistryObjectList().getIdentifiable(); IdentifiableType obj; for (int i = 0, len = objs.size() ; i < len ; i++) { obj = objs.get(i).getValue(); if (obj instanceof RegistryPackageType) { return InfosetUtil.getExternalIdentifierValue(XDSConstants.UUID_XDSSubmissionSet_sourceId, (RegistryPackageType)obj); } } throw new XDSException(XDSException.XDS_ERR_REPOSITORY_METADATA_ERROR, "Missing XDSSubmissionSet.sourceId!", null); }
public static RegistryPackageType getRegistryPackage(SubmitObjectsRequest sor, String classificationUUID) { List<JAXBElement<? extends IdentifiableType>> list = sor.getRegistryObjectList().getIdentifiable(); String id = null; IdentifiableType identifiable; if ( classificationUUID != null ) { ClassificationType ct; for ( int i = 0, len = list.size() ; i < len ; i++) { identifiable = list.get(i).getValue(); if ( identifiable instanceof ClassificationType) { ct = (ClassificationType) identifiable; if ( classificationUUID.equals( ct.getClassificationNode())) { id = ct.getClassifiedObject(); break; } } } } RegistryPackageType rp; for ( int i = 0, len = list.size() ; i < len ; i++ ) { identifiable = list.get(i).getValue(); if ( identifiable instanceof RegistryPackageType) { rp = (RegistryPackageType) identifiable; if ( id == null || id.equals( rp.getId())) { return rp; } } } return null; }
private String[] getSubmissionUIDandPatID(SubmitObjectsRequest req) { String[] result = new String[2]; List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable(); IdentifiableType obj; whole: for (int i=0,len=objs.size() ; i < len ; i++) { obj = objs.get(i).getValue(); if (obj instanceof RegistryPackageType) { List<ExternalIdentifierType> list = ((RegistryPackageType)obj).getExternalIdentifier(); if (list != null) { for (ExternalIdentifierType eiType : list) { if (XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())) { result[1] = eiType.getValue(); } else if (XDSConstants.UUID_XDSSubmissionSet_uniqueId.equals(eiType.getIdentificationScheme())) { result[0] = eiType.getValue(); } else { continue; } if (result[0] != null && result[1] != null) break whole; } } } } return result; }
private String[] getSubmissionUIDandPatID(SubmitObjectsRequest req) { String[] result = new String[2]; List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable(); IdentifiableType obj; whole: for (int i=0,len=objs.size() ; i < len ; i++) { obj = objs.get(i).getValue(); if (obj instanceof RegistryPackageType) { List<ExternalIdentifierType> list = ((RegistryPackageType)obj).getExternalIdentifier(); if (list != null) { for (ExternalIdentifierType eiType : list) { if (XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())) { result[1] = eiType.getValue(); } else if (XDSConstants.UUID_XDSSubmissionSet_uniqueId.equals(eiType.getIdentificationScheme())) { result[0] = eiType.getValue(); } else { continue; } if (result[0] != null && result[1] != null) break whole; } } } } return result; }
private List<Identifiable> store(SubmitObjectsRequest req, XDSPersistenceWrapper wrapper) throws XDSException { List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable(); IdentifiableType obj; List<Identifiable> objects = new ArrayList<Identifiable>();
private String[] getSubmissionUIDandPatID(SubmitObjectsRequest req) { String[] result = new String[]{UNKNOWN, UNKNOWN}; List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable(); IdentifiableType obj; whole: for (int i=0,len=objs.size() ; i < len ; i++) { obj = objs.get(i).getValue(); if (obj instanceof RegistryPackageType) { List<ExternalIdentifierType> list = ((RegistryPackageType)obj).getExternalIdentifier(); if (list != null) { for (ExternalIdentifierType eiType : list) { if (XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())) { if (eiType.getValue() != null) result[1] = eiType.getValue(); } else if (XDSConstants.UUID_XDSSubmissionSet_uniqueId.equals(eiType.getIdentificationScheme())) { if (eiType.getValue() != null) result[0] = eiType.getValue(); } else { continue; } if (result[0] != UNKNOWN && result[1] != UNKNOWN) break whole; } } } } return result; }
private void preMetadataCheck(SubmitObjectsRequest req) throws XDSException { XdsRegistry cfg = XdsDevice.getXdsRegistry(); List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable(); IdentifiableType obj; List<ExternalIdentifierType> list;