From 2e8e79b55d1b8346cd7f99c2395df708a802d232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 29 Jan 2025 13:56:39 +0100 Subject: [PATCH] Move peak integrated area to abstract chromatogram. --- .../csd/model/core/AbstractChromatogramCSD.java | 14 ++------------ .../model/core/AbstractChromatogram.java | 10 ++++++++++ .../msd/model/core/AbstractChromatogramMSD.java | 14 ++------------ .../vsd/model/core/AbstractChromatogramVSD.java | 14 ++------------ .../wsd/model/core/AbstractChromatogramWSD.java | 14 ++------------ 5 files changed, 18 insertions(+), 48 deletions(-) diff --git a/chemclipse/plugins/org.eclipse.chemclipse.csd.model/src/org/eclipse/chemclipse/csd/model/core/AbstractChromatogramCSD.java b/chemclipse/plugins/org.eclipse.chemclipse.csd.model/src/org/eclipse/chemclipse/csd/model/core/AbstractChromatogramCSD.java index 3aafbaa436..92c3674462 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.csd.model/src/org/eclipse/chemclipse/csd/model/core/AbstractChromatogramCSD.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.csd.model/src/org/eclipse/chemclipse/csd/model/core/AbstractChromatogramCSD.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2024 Lablicate GmbH. + * Copyright (c) 2012, 2025 Lablicate GmbH. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -68,16 +68,6 @@ public void fireUpdate(IChromatogramSelection chromatogramSelection) { } } - @Override - public double getPeakIntegratedArea() { - - double integratedArea = 0.0d; - for(IChromatogramPeakCSD peak : getPeaks()) { - integratedArea += peak.getIntegratedArea(); - } - return integratedArea; - } - @Override public > ResultType getMeasurementResult(Class type) { @@ -106,4 +96,4 @@ private String getNoiseCalculatorId() { return PreferenceSupplier.getSelectedNoiseCalculatorId(); } } -} \ No newline at end of file +} diff --git a/chemclipse/plugins/org.eclipse.chemclipse.model/src/org/eclipse/chemclipse/model/core/AbstractChromatogram.java b/chemclipse/plugins/org.eclipse.chemclipse.model/src/org/eclipse/chemclipse/model/core/AbstractChromatogram.java index 85a0c50d8f..6bc36e4a02 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.model/src/org/eclipse/chemclipse/model/core/AbstractChromatogram.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.model/src/org/eclipse/chemclipse/model/core/AbstractChromatogram.java @@ -767,6 +767,16 @@ public void setIntegratorDescription(String integratorDescription) { } } + @Override + public double getPeakIntegratedArea() { + + double integratedArea = 0.0d; + for(IPeak peak : getPeaks()) { + integratedArea += peak.getIntegratedArea(); + } + return integratedArea; + } + @Override public double getChromatogramIntegratedArea() { diff --git a/chemclipse/plugins/org.eclipse.chemclipse.msd.model/src/org/eclipse/chemclipse/msd/model/core/AbstractChromatogramMSD.java b/chemclipse/plugins/org.eclipse.chemclipse.msd.model/src/org/eclipse/chemclipse/msd/model/core/AbstractChromatogramMSD.java index 17a5318821..0ff72cfa6a 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.msd.model/src/org/eclipse/chemclipse/msd/model/core/AbstractChromatogramMSD.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.msd.model/src/org/eclipse/chemclipse/msd/model/core/AbstractChromatogramMSD.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2024 Lablicate GmbH. + * Copyright (c) 2008, 2025 Lablicate GmbH. * * All rights reserved. * This program and the accompanying materials are made available under the @@ -252,16 +252,6 @@ public double getStopIon() { return highestIon; } - @Override - public double getPeakIntegratedArea() { - - double integratedArea = 0.0d; - for(IChromatogramPeakMSD peak : getPeaks()) { - integratedArea += peak.getIntegratedArea(); - } - return integratedArea; - } - @Override public IIonTransitionSettings getIonTransitionSettings() { @@ -298,4 +288,4 @@ private String getNoiseCalculatorId() { return PreferenceSupplier.getSelectedNoiseCalculatorId(); } } -} \ No newline at end of file +} diff --git a/chemclipse/plugins/org.eclipse.chemclipse.vsd.model/src/org/eclipse/chemclipse/vsd/model/core/AbstractChromatogramVSD.java b/chemclipse/plugins/org.eclipse.chemclipse.vsd.model/src/org/eclipse/chemclipse/vsd/model/core/AbstractChromatogramVSD.java index 669c657aca..f77bfe3f70 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.vsd.model/src/org/eclipse/chemclipse/vsd/model/core/AbstractChromatogramVSD.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.vsd.model/src/org/eclipse/chemclipse/vsd/model/core/AbstractChromatogramVSD.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023, 2024 Lablicate GmbH. + * Copyright (c) 2023, 2025 Lablicate GmbH. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -25,16 +25,6 @@ public void updateNoiseFactor() { // TODO - Noise Calculation } - @Override - public double getPeakIntegratedArea() { - - double integratedArea = 0.0d; - for(IChromatogramPeakVSD peak : getPeaks()) { - integratedArea += peak.getIntegratedArea(); - } - return integratedArea; - } - @Override public void fireUpdate(IChromatogramSelection chromatogramSelection) { @@ -45,4 +35,4 @@ public void fireUpdate(IChromatogramSelection chromatogramSelection) { chromatogramSelectionISD.update(true); } } -} \ No newline at end of file +} diff --git a/chemclipse/plugins/org.eclipse.chemclipse.wsd.model/src/org/eclipse/chemclipse/wsd/model/core/AbstractChromatogramWSD.java b/chemclipse/plugins/org.eclipse.chemclipse.wsd.model/src/org/eclipse/chemclipse/wsd/model/core/AbstractChromatogramWSD.java index 8c0d02609f..c332630775 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.wsd.model/src/org/eclipse/chemclipse/wsd/model/core/AbstractChromatogramWSD.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.wsd.model/src/org/eclipse/chemclipse/wsd/model/core/AbstractChromatogramWSD.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013, 2024 Lablicate GmbH. + * Copyright (c) 2013, 2025 Lablicate GmbH. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -89,16 +89,6 @@ public void fireUpdate(IChromatogramSelection chromatogramSelection) { } } - @Override - public double getPeakIntegratedArea() { - - double integratedArea = 0.0d; - for(IChromatogramPeakWSD peak : getPeaks()) { - integratedArea += peak.getIntegratedArea(); - } - return integratedArea; - } - @Override public IBaselineModel getBaselineModel(double wavelength) { @@ -152,4 +142,4 @@ private String getNoiseCalculatorId() { return PreferenceSupplier.getSelectedNoiseCalculatorId(); } } -} \ No newline at end of file +}