Class XdmContents
java.lang.Object
org.projecthusky.communication.xd.xdm.XdmContents
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 Summary
ConstructorsConstructorDescriptionInstantiates a new xdm contents.XdmContents
(String filePath) Instantiates a new xdm contents with a given filePath, pointing to an existing zip file.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.XdmContents
(ZipFile zipFile) Instantiates a new xdm contents with a given XDM volume as single zip file.XdmContents
(IndexHtm indexHtm, ReadmeTxt readmeTxt) Instantiates a new xdm contents with given INDEX.HTM and README.TXT files as according objects -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.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)Gets a list containing the documents together with the Document Metadata.getDocumentAndMetadataList
(int submissionSetNumber) Gets a list containing the documents together with the Document Metadata for a specific submission set.List<org.openehealth.ipf.commons.ihe.xds.core.metadata.Document>
Gets a list of documents (the actual payload of the XDM volume)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.Gets the index htm.Gets the readme txt.List<org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet>
Gets the XDM contents as OHT submit transaction data.Gets the XDM contents as OHT XDSResponseType.org.openehealth.ipf.commons.ihe.xds.core.requests.ProvideAndRegisterDocumentSet
importXDMMetadata
(org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.lcm.SubmitObjectsRequest txnData)
-
Constructor Details
-
XdmContents
public XdmContents()Instantiates a new xdm contents. -
XdmContents
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
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
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
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
Gets a list containing the documents together with the Document Metadata.- Returns:
- the document and metadata list
-
getDocumentAndMetadataList
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
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
Gets the index htm.- Returns:
- the index htm
-
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
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)
-