Class XdmContents

java.lang.Object
org.projecthusky.communication.xd.xdm.XdmContents

public class XdmContents extends Object
The Class XdmContents represents all content of an XDM volume. This includes human readable informative files like README.TXT or INDEX.HTM and also machine readable files like METADATA.XML
  • Constructor Details

    • XdmContents

      public XdmContents()
      Instantiates a new xdm contents.
    • XdmContents

      public XdmContents(IndexHtm indexHtm, ReadmeTxt readmeTxt)
      Instantiates a new xdm contents with given INDEX.HTM and README.TXT files as according objects
      Parameters:
      indexHtm - the IndexHtm object (contains information about the contents of the volume)
      readmeTxt - the ReadmeTxt object (contains information about the vendor and system that created the volume)
    • XdmContents

      public XdmContents(String filePath)
      Instantiates a new xdm contents with a given filePath, pointing to an existing zip file.
      Parameters:
      filePath - the file path to an existing zip file, which holds the contents of an xdm volume
    • XdmContents

      public XdmContents(String indexHtm, String readmeTxt)
      Instantiates a new xdm contents with given INDEX.HTM and README.TXT files, which will be read from given files paths.
      Parameters:
      indexHtm - the IndexHtm object (contains information about the contents of the volume)
      readmeTxt - the ReadmeTxt object (contains information about the vendor and system that created the volume)
    • XdmContents

      public XdmContents(ZipFile zipFile)
      Instantiates a new xdm contents with a given XDM volume as single zip file.
      Parameters:
      zipFile - the zip file
  • Method Details

    • createZip

      public void createZip(OutputStream outputStream, org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet txnData)
      Creates the XDM volume contents and writes them to the given outputStream.
      Parameters:
      outputStream - the output stream, in which the contents will be written.
      txnData - the SubmitTransactionData data (containing Metadata and the payload files themselves)
    • createZip

      public void createZip(String filePath, org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet txnData)
      Creates the XDM volume contents and writes them to the given File(path)
      Parameters:
      filePath - the path to the file, in which the contents will be written.
      txnData - the SubmitTransactionData data (containing Metadata and the payload files themselves)
    • getDocumentAndMetadataList

      public List<DocumentContentAndMetadata> getDocumentAndMetadataList()
      Gets a list containing the documents together with the Document Metadata.
      Returns:
      the document and metadata list
    • getDocumentAndMetadataList

      public List<DocumentContentAndMetadata> getDocumentAndMetadataList(int submissionSetNumber)
      Gets a list containing the documents together with the Document Metadata for a specific submission set.
      Parameters:
      submissionSetNumber - the submission set number
      Returns:
      the document and metadata list
    • getDocumentList

      public List<org.openehealth.ipf.commons.ihe.xds.core.metadata.Document> getDocumentList()
      Gets a list of documents (the actual payload of the XDM volume)
      Returns:
      the documents
    • getDocumentList

      public List<org.openehealth.ipf.commons.ihe.xds.core.metadata.Document> getDocumentList(int submissionSetNumber)
      Gets a list of documents (the actual payload of the XDM volume) for a specific submission set.
      Parameters:
      submissionSetNumber - the submission set number
      Returns:
      the document list
    • getIndexHtm

      public IndexHtm getIndexHtm()
      Gets the index htm.
      Returns:
      the index htm
    • getReadmeTxt

      public ReadmeTxt getReadmeTxt()
      Gets the readme txt.
      Returns:
      the readme txt
    • getXdmContentsAsIpfSubmitTransactionData

      public List<org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet> getXdmContentsAsIpfSubmitTransactionData()
      Gets the XDM contents as OHT submit transaction data.
      Returns:
      the XDM contents as OHT submit transaction data
    • getXdmContentsAsOhtXdsResponseType

      public XdmRetrieveResponseTypeImpl getXdmContentsAsOhtXdsResponseType()
      Gets the XDM contents as OHT XDSResponseType. This Object contains a flat list of all documents from all submission sets. It does not contain the full XDS Metadata for each document. If you want to get this data, please use the getDocumentAndMetadata method.
      Returns:
      The OHT XDSResponseType
    • importXDMMetadata

      public org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet importXDMMetadata(org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.lcm.SubmitObjectsRequest txnData)