Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

public class EPMCConverter implements CellCalculator {


private static final Logger LOG = Logger.getLogger(EPMCConverter.class);
static {
LOG.setLevel(Level.DEBUG);
Expand Down Expand Up @@ -114,10 +115,13 @@ public void readAndProcessEntry() throws IOException {

private void writeCurrentCTree(JsonElement entry) {
if (currentCTree != null && currentCTree.getDirectory() != null) {
File metaSourceDir = currentCTree.ensureMetaChildDirectory(CTree.SOURCE_DIR_NAME);
File entryFile = new File(currentCTree.getDirectory(), CProject.EUPMC_RESULTS_JSON);
entry = stripOneElementArrays(entry);
try {
DefaultArgProcessor.CM_LOG.debug("wrote: "+entryFile);
LOG.debug("wrote: "+entryFile);
File metaSourceMetadataFile = new File(metaSourceDir, CTree.METADATA_JSON);
FileUtils.writeStringToFile(metaSourceMetadataFile, entry.toString(), Charset.forName("UTF-8"));
FileUtils.writeStringToFile(entryFile, entry.toString(), Charset.forName("UTF-8"));
} catch (IOException e) {
throw new RuntimeException("Cannot write "+entryFile);
Expand Down Expand Up @@ -212,6 +216,7 @@ public void setDataTablesTool(DataTablesTool dataTablesTool) {
this.dataTablesTool = dataTablesTool;
}

@Deprecated // move tyo separate class
public DataTablesTool getOrCreateDataTablesTool() {
if (dataTablesTool == null) {
dataTablesTool = new DataTablesTool();
Expand All @@ -223,6 +228,7 @@ public HtmlHtml createHtml() {
getOrCreateDataTablesTool();
dataTablesTool.setTitle("METADATA");
dataTablesTool.setCellCalculator(this);
LOG.warn("change link");
this.setRemoteLink0("../../src/test/resources/org/xmlcml/ami2/zika/");
this.setRemoteLink1("/scholarly.html");
this.setRowHeadingName("EPMCID");
Expand Down