use of org.akaza.openclinica.logic.odmExport.AdminDataCollector in project OpenClinica by OpenClinica.
the class StudyEndpoint method getReport.
private String getReport(StudyBean currentStudy) {
// ServletContext servletContext =
// (ServletContext) context.getMessageContext().get(MessageContext.SERVLET_CONTEXT);
MetaDataCollector mdc = new MetaDataCollector(dataSource, currentStudy, ruleSetRuleDao);
AdminDataCollector adc = new AdminDataCollector(dataSource, currentStudy);
MetaDataCollector.setTextLength(200);
ODMBean odmb = mdc.getODMBean();
odmb.setSchemaLocation("http://www.cdisc.org/ns/odm/v1.3 OpenClinica-ODM1-3-0-OC2-0.xsd");
ArrayList<String> xmlnsList = new ArrayList<String>();
xmlnsList.add("xmlns=\"http://www.cdisc.org/ns/odm/v1.3\"");
//xmlnsList.add("xmlns:OpenClinica=\"http://www.openclinica.org/ns/openclinica_odm/v1.3\"");
xmlnsList.add("xmlns:OpenClinica=\"http://www.openclinica.org/ns/odm_ext_v130/v3.1\"");
xmlnsList.add("xmlns:OpenClinicaRules=\"http://www.openclinica.org/ns/rules/v3.1\"");
odmb.setXmlnsList(xmlnsList);
odmb.setODMVersion("oc1.3");
mdc.setODMBean(odmb);
adc.setOdmbean(odmb);
mdc.collectFileData();
adc.collectFileData();
FullReportBean report = new FullReportBean();
report.setAdminDataMap(adc.getOdmAdminDataMap());
report.setOdmStudyMap(mdc.getOdmStudyMap());
report.setCoreResources(coreResources);
report.setOdmBean(mdc.getODMBean());
report.setODMVersion("oc1.3");
report.createStudyMetaOdmXml(Boolean.FALSE);
return report.getXmlOutput().toString().trim();
}
use of org.akaza.openclinica.logic.odmExport.AdminDataCollector in project OpenClinica by OpenClinica.
the class MetadataCollectorResource method collectODMMetadataForClinicalData.
public FullReportBean collectODMMetadataForClinicalData(String studyOID, String formVersionOID, LinkedHashMap<String, OdmClinicalDataBean> clinicalDataMap) {
StudyBean studyBean = getStudyDao().findByOid(studyOID);
if (studyBean != null)
studyBean = populateStudyBean(studyBean);
MetaDataCollector mdc = new MetaDataCollector(this.dataSource, studyBean, getRuleSetRuleDao());
AdminDataCollector adc = new AdminDataCollector(this.dataSource, studyBean);
MetaDataCollector.setTextLength(200);
ODMBean odmb = mdc.getODMBean();
odmb.setSchemaLocation("http://www.cdisc.org/ns/odm/v1.3 OpenClinica-ODM1-3-0-OC3-0.xsd");
ArrayList<String> xmlnsList = new ArrayList<String>();
xmlnsList.add("xmlns=\"http://www.cdisc.org/ns/odm/v1.3\"");
// xmlnsList.add("xmlns:OpenClinica=\"http://www.openclinica.org/ns/openclinica_odm/v1.3\"");
xmlnsList.add("xmlns:OpenClinica=\"http://www.openclinica.org/ns/odm_ext_v130/v3.1\"");
xmlnsList.add("xmlns:OpenClinicaRules=\"http://www.openclinica.org/ns/rules/v3.1\"");
odmb.setXmlnsList(xmlnsList);
odmb.setODMVersion("oc1.3");
mdc.setODMBean(odmb);
adc.setOdmbean(odmb);
if (studyBean == null)
mdc.collectFileData(formVersionOID);
else
mdc.collectFileData();
adc.collectFileData();
FullReportBean report = new FullReportBean();
report.setAdminDataMap(adc.getOdmAdminDataMap());
report.setOdmStudyMap(mdc.getOdmStudyMap());
report.setCoreResources(getCoreResources());
report.setOdmBean(mdc.getODMBean());
// report.setClinicalData(odmClinicalDataBean);
report.setClinicalDataMap(clinicalDataMap);
report.setODMVersion("oc1.3");
return report;
}
Aggregations