private DocumentResponse getDocumentResponse(XDSDocument doc, String repositoryUniqueId) throws IOException { RetrieveDocumentSetResponseType.DocumentResponse docRsp; docRsp = iheFactory.createRetrieveDocumentSetResponseTypeDocumentResponse(); docRsp.setDocumentUniqueId(doc.getUID()); docRsp.setMimeType(doc.getMimeType()); docRsp.setRepositoryUniqueId(repositoryUniqueId); docRsp.setDocument(doc.getContent()); return docRsp; }
/** * Create an instance of {@link RetrieveDocumentSetResponseType.DocumentResponse } * */ public RetrieveDocumentSetResponseType.DocumentResponse createRetrieveDocumentSetResponseTypeDocumentResponse() { return new RetrieveDocumentSetResponseType.DocumentResponse(); }
private RetrieveDocumentSetResponseType addHomeCommunityID(RetrieveDocumentSetResponseType rsp) { String home = XdsDevice.getXCARespondingGW().getHomeCommunityID(); if (rsp.getDocumentResponse() != null) { for (DocumentResponse docRsp : rsp.getDocumentResponse()) { if (docRsp.getHomeCommunityId() == null) docRsp.setHomeCommunityId(home); } } RegistryResponseType regRsp = rsp.getRegistryResponse(); if (regRsp != null && regRsp.getRegistryErrorList() != null) { for ( RegistryError err : regRsp.getRegistryErrorList().getRegistryError()) { if (err.getLocation() == null) err.setLocation(home); } } return rsp; }
private RetrieveDocumentSetResponseType addHomeCommunityID(RetrieveDocumentSetResponseType rsp) { String home = XdsDevice.getXCARespondingGW().getHomeCommunityID(); if (rsp.getDocumentResponse() != null) { for (DocumentResponse docRsp : rsp.getDocumentResponse()) { docRsp.setHomeCommunityId(home); } } RegistryResponseType regRsp = rsp.getRegistryResponse(); if (regRsp != null && regRsp.getRegistryErrorList() != null) { for ( RegistryError err : regRsp.getRegistryErrorList().getRegistryError()) { err.setLocation(home); } } return rsp; }
private DocumentResponse getDocumentResponse(XDSDocument doc, String repositoryUniqueId) throws IOException { RetrieveDocumentSetResponseType.DocumentResponse docRsp; docRsp = iheFactory.createRetrieveDocumentSetResponseTypeDocumentResponse(); docRsp.setDocumentUniqueId(doc.getUID()); docRsp.setMimeType(doc.getMimeType()); docRsp.setRepositoryUniqueId(repositoryUniqueId); docRsp.setDocument(doc.getContent()); return docRsp; }