Skip to content

Commit

Permalink
Add CODA literature references.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Oct 30, 2024
1 parent bac5002 commit c30489f
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2018 Lablicate GmbH.
* Copyright (c) 2011, 2024 Lablicate GmbH.
*
* All rights reserved.
* This program and the accompanying materials are made available under the
Expand All @@ -11,14 +11,22 @@
*******************************************************************************/
package org.eclipse.chemclipse.chromatogram.msd.filter.supplier.coda.settings;

import java.io.IOException;
import java.util.Collections;
import java.util.List;

import org.eclipse.chemclipse.chromatogram.filter.settings.AbstractChromatogramFilterSettings;
import org.eclipse.chemclipse.chromatogram.msd.filter.supplier.coda.preferences.PreferenceSupplier;
import org.eclipse.chemclipse.logging.core.Logger;
import org.eclipse.chemclipse.support.literature.LiteratureReference;
import org.eclipse.chemclipse.support.settings.FloatSettingsProperty;

import com.fasterxml.jackson.annotation.JsonProperty;

public class FilterSettings extends AbstractChromatogramFilterSettings {

private static final Logger logger = Logger.getLogger(FilterSettings.class);
//
@JsonProperty(value = "Coda Threshold", defaultValue = "0.75f")
@FloatSettingsProperty(minValue = PreferenceSupplier.CODA_THRESHOLD_MIN_VALUE, maxValue = PreferenceSupplier.CODA_THRESHOLD_MAX_VALUE, step = 0.05f)
private float codaThreshold;
Expand All @@ -32,4 +40,22 @@ public void setCodaThreshold(float codaThreshold) {

this.codaThreshold = codaThreshold;
}

@Override
public List<LiteratureReference> getLiteratureReferences() {

return Collections.singletonList(createLiteratureReference("ac960435y.ris", "10.1021/ac960435y"));
}

private static LiteratureReference createLiteratureReference(String file, String doi) {

String content;
try {
content = new String(FilterSettings.class.getResourceAsStream(file).readAllBytes());
} catch(IOException | NullPointerException e) {
content = doi;
logger.warn(e);
}
return new LiteratureReference(content);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@




TY - JOUR
T1 - A Noise and Background Reduction Method for Component Detection in Liquid Chromatography/Mass Spectrometry
AU - Windig, Willem
AU - Phalp, J. Martin
AU - Payne, Alan W.
Y1 - 1996/01/01
PY - 1996
DA - 1996/01/01
N1 - doi: 10.1021/ac960435y
DO - 10.1021/ac960435y
T2 - Analytical Chemistry
JF - Analytical Chemistry
JO - Anal. Chem.
SP - 3602
EP - 3606
VL - 68
IS - 20
PB - American Chemical Society
SN - 0003-2700
M3 - doi: 10.1021/ac960435y
UR - https://doi.org/10.1021/ac960435y
ER -

0 comments on commit c30489f

Please sign in to comment.