MissingRefMetadata metadata = new MissingRefMetadata(); try { if (xmlFile.exists()) { metadata.setProfile(value); continue; metadata.setRunAtDate(value); continue; metadata.setReportLocation(value); continue; metadata.setApiUseScans(value); continue;
@Override IMetadata getMetadata() throws Exception { File xmlFile = new File(getReportsRoot(), "meta" + XML_EXTENSION); //$NON-NLS-1$ if (!xmlFile.exists()) { // try looking in the default 'xml' directory as a raw report root // might have been specified xmlFile = new File(getReportsRoot() + File.separator + "xml", "meta" + XML_EXTENSION); //$NON-NLS-1$//$NON-NLS-2$ } return MissingRefMetadata.getMetadata(xmlFile); }
@Override void writeMetadataSummary(StringBuilder buffer) throws Exception { MissingRefMetadata metadata = (MissingRefMetadata) getMetadata(); buffer.append(OPEN_H4).append(SearchMessages.MissingRefReportConverter_MetadataTitle).append(CLOSE_H4); buffer.append("<table border=\"0px\" title=\"").append(SearchMessages.MissingRefReportConverter_MetadataTableTitle).append("\"width=\"50%\">"); //$NON-NLS-1$ //$NON-NLS-2$ buffer.append(OPEN_TR); buffer.append(openTD(14)).append(SearchMessages.MissingRefReportConverter_ReportDate).append(CLOSE_TD); buffer.append(openTD(36)).append(metadata.getRunAtDate()).append(CLOSE_TD); buffer.append(CLOSE_TR); buffer.append(OPEN_TR); buffer.append(openTD(14)).append(SearchMessages.MissingRefReportConverter_ProfileLocation).append(CLOSE_TD); String value = metadata.getProfile(); buffer.append(openTD(36)).append((value != null ? value : SearchMessages.MissingRefReportConverter_NONE)).append(CLOSE_TD); buffer.append(CLOSE_TR); buffer.append(OPEN_TR); buffer.append(openTD(14)).append(SearchMessages.MissingRefReportConverter_ReportLocation).append(CLOSE_TD); value = metadata.getReportLocation(); buffer.append(openTD(36)).append((value != null ? value : SearchMessages.MissingRefReportConverter_NONE)).append(CLOSE_TD); buffer.append(CLOSE_TR); buffer.append(OPEN_TR); buffer.append(openTD(14)).append(SearchMessages.MissingRefReportConverter_ApiUseScanLocations).append(CLOSE_TD); value = metadata.getApiUseScans(); buffer.append(openTD(36)).append((value != null ? value : SearchMessages.MissingRefReportConverter_NONE)).append(CLOSE_TD); buffer.append(CLOSE_TR); buffer.append(CLOSE_TD); buffer.append(CLOSE_TR); buffer.append(CLOSE_TABLE); }