public void removeFromRequest() { List<JAXBElement<? extends IdentifiableType>> list = pnrRequest.getRegistryObjectList().getIdentifiable(); for (int i = 0, len = list.size() ; i < len ; i++) { if (list.get(i).getValue().getId().equals(id)) { list.remove(i); } } pnrRequest.removeAssociation(assoc); }
public void removeFromRequest() { pnrRequest.getProvideAndRegisterDocumentSetRequest().getDocument().remove(doc); List<JAXBElement<? extends IdentifiableType>> list = pnrRequest.getRegistryObjectList().getIdentifiable(); for (int i = 0, len = list.size() ; i < len ; i++) { if (list.get(i).getValue().getId().equals(id)) { list.remove(i); } } pnrRequest.removeAssociation(assoc); }
private RegistryObject getCheckedRegistryObject(String id, String errMsg, IdentifiableType parent) throws XDSException { RegistryObject ro = null; try { ro = getRegistryObject(id); } catch (Exception ignore) {} if (ro == null) throw new XDSException(XDSException.XDS_ERR_REGISTRY_ERROR, errMsg+" id="+id+" parent="+parent.getId(), null); return ro; } private RegistryObject getRegistryObject(String id) {
private static void checkSlots(IdentifiableType obj, List<String> requiredSlotNames) throws XDSException { for (SlotType1 s : obj.getSlot()) { requiredSlotNames.remove(s.getName()); } if (requiredSlotNames.size() > 0) throw new XDSException(XDSException.XDS_ERR_REGISTRY_METADATA_ERROR, "Missing attributes in '"+obj.getId()+"'!:"+requiredSlotNames, null); }
public void toPersistenceIdentifiable(IdentifiableType roType, Identifiable ro) { String id = roType.getId(); ro.setId(id.startsWith("urn:") ? id : "urn:uuid:"+UUID.randomUUID().toString()); uuidMapping.put(id, ro); ro.setHome(roType.getHome()); copySlots(roType.getSlot(), ro); }
wrapper.toClassificationNode((ClassificationNodeType)obj, null, objects); } else if (obj instanceof ObjectRefType) {//for initialization Identifiable tmp = getIdentifiableByUUID(obj.getId()); log.info("#### found RegistryObject for ObjectRef:"+tmp); if (tmp == null) { log.info("#### add ObjectRef:"+obj.getId()); objects.add(wrapper.toObjectRef((ObjectRefType)obj));
} else if (!patIDtmp.equals(patID)) { throw new XDSException(XDSException.XDS_ERR_PATID_DOESNOT_MATCH, "PatientID of object"+obj.getId()+" does not match:"+patIDtmp+" vs. "+patID, null); } catch (Exception ignore) { throw new XDSException(XDSException.XDS_ERR_PATID_DOESNOT_MATCH, "PatientID referenced in Association "+obj.getId()+" does not match! SubmissionSet patID not valid!:"+patID, null);