-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from Mailaender/animl-msd
Added support for MSD .animl chromatograms
- Loading branch information
Showing
36 changed files
with
1,313 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
openchrom/plugins/net.openchrom.msd.converter.supplier.animl/.classpath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
1 change: 1 addition & 0 deletions
1
openchrom/plugins/net.openchrom.msd.converter.supplier.animl/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/bin |
28 changes: 28 additions & 0 deletions
28
openchrom/plugins/net.openchrom.msd.converter.supplier.animl/.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>net.openchrom.msd.converter.supplier.animl</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
8 changes: 8 additions & 0 deletions
8
...m/plugins/net.openchrom.msd.converter.supplier.animl/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#Wed Apr 21 08:55:45 CEST 2010 | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.8 |
22 changes: 22 additions & 0 deletions
22
openchrom/plugins/net.openchrom.msd.converter.supplier.animl/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Manifest-Version: 1.0 | ||
Automatic-Module-Name: net.openchrom.msd.converter.supplier.gaml | ||
Eclipse-RegisterBuddy: org.eclipse.chemclipse.model, org.eclipse.chemclipse.msd.model | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: AnIML | ||
Bundle-SymbolicName: net.openchrom.msd.converter.supplier.animl;singleton:=true | ||
Bundle-Version: 1.4.0.qualifier | ||
Bundle-Activator: net.openchrom.msd.converter.supplier.animl.Activator | ||
Bundle-Vendor: OpenChrom | ||
Require-Bundle: org.eclipse.core.runtime, | ||
org.eclipse.chemclipse.logging;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.msd.model;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.msd.converter;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.processing;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.converter;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.model;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.support;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.xxd.converter.supplier.chemclipse;bundle-version="0.8.0", | ||
net.openchrom.xxd.converter.supplier.gaml, | ||
net.openchrom.xxd.converter.supplier.animl | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
Bundle-ActivationPolicy: lazy |
12 changes: 12 additions & 0 deletions
12
...rom/plugins/net.openchrom.msd.converter.supplier.animl/OSGI-INF/l10n/bundle_en.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
############################################################################### | ||
# Copyright (c) 2021 Lablicate GmbH. | ||
# | ||
# All rights reserved. This program and the accompanying materials | ||
# are made available under the terms of the Eclipse Public License v1.0 | ||
# which accompanies this distribution, and is available at | ||
# http://www.eclipse.org/legal/epl-v10.html | ||
# | ||
# Contributors: | ||
# Matthias Mailänder - initial API and implementation | ||
############################################################################### | ||
#Properties file |
6 changes: 6 additions & 0 deletions
6
openchrom/plugins/net.openchrom.msd.converter.supplier.animl/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
plugin.xml,\ | ||
OSGI-INF/ |
18 changes: 18 additions & 0 deletions
18
openchrom/plugins/net.openchrom.msd.converter.supplier.animl/plugin.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.4"?> | ||
<plugin> | ||
<extension | ||
point="org.eclipse.chemclipse.msd.converter.chromatogramSupplier"> | ||
<ChromatogramSupplier | ||
description="Reads Analytical Information Markup Language Chromatograms" | ||
fileExtension=".animl" | ||
filterName="AnIML MSD Chromatogram (*.animl)" | ||
id="net.openchrom.msd.converter.supplier.animl.chromatogram" | ||
importConverter="net.openchrom.msd.converter.supplier.animl.converter.ChromatogramImportConverter" | ||
importMagicNumberMatcher="net.openchrom.msd.converter.supplier.animl.converter.MagicNumberMatcher" | ||
exportConverter="net.openchrom.msd.converter.supplier.animl.converter.ChromatogramExportConverter" | ||
isExportable="true" | ||
isImportable="true"> | ||
</ChromatogramSupplier> | ||
</extension> | ||
</plugin> |
43 changes: 43 additions & 0 deletions
43
...sd.converter.supplier.animl/src/net/openchrom/msd/converter/supplier/animl/Activator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2008, 2021 Lablicate GmbH. | ||
* | ||
* All rights reserved. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v1.0 which accompanies this distribution, | ||
* and is available at http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Dr. Philip Wenig - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.msd.converter.supplier.animl; | ||
|
||
import org.osgi.framework.BundleActivator; | ||
import org.osgi.framework.BundleContext; | ||
|
||
public class Activator implements BundleActivator { | ||
|
||
private static BundleContext context; | ||
|
||
public static BundleContext getContext() { | ||
|
||
return context; | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) | ||
*/ | ||
public void start(BundleContext bundleContext) throws Exception { | ||
|
||
Activator.context = bundleContext; | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) | ||
*/ | ||
public void stop(BundleContext bundleContext) throws Exception { | ||
|
||
Activator.context = null; | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
...src/net/openchrom/msd/converter/supplier/animl/converter/ChromatogramExportConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2014, 2021 Lablicate GmbH. | ||
* | ||
* All rights reserved. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v1.0 which accompanies this distribution, | ||
* and is available at http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Dr. Philip Wenig - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.msd.converter.supplier.animl.converter; | ||
|
||
import java.io.File; | ||
|
||
import org.eclipse.chemclipse.converter.chromatogram.AbstractChromatogramExportConverter; | ||
import org.eclipse.chemclipse.converter.chromatogram.IChromatogramExportConverter; | ||
import org.eclipse.chemclipse.logging.core.Logger; | ||
import org.eclipse.chemclipse.model.core.IChromatogram; | ||
import org.eclipse.chemclipse.model.core.IPeak; | ||
import org.eclipse.chemclipse.msd.converter.io.IChromatogramMSDWriter; | ||
import org.eclipse.chemclipse.msd.model.core.IChromatogramMSD; | ||
import org.eclipse.chemclipse.processing.core.IProcessingInfo; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
|
||
import net.openchrom.msd.converter.supplier.animl.io.ChromatogramWriter; | ||
import net.openchrom.xxd.converter.supplier.animl.internal.converter.IConstants; | ||
import net.openchrom.xxd.converter.supplier.animl.internal.converter.SpecificationValidator; | ||
|
||
public class ChromatogramExportConverter extends AbstractChromatogramExportConverter implements IChromatogramExportConverter { | ||
|
||
private static final Logger logger = Logger.getLogger(ChromatogramExportConverter.class); | ||
private static final String DESCRIPTION = "AnIML Export Converter"; | ||
|
||
@Override | ||
public IProcessingInfo<File> convert(File file, IChromatogram<? extends IPeak> chromatogram, IProgressMonitor monitor) { | ||
|
||
file = SpecificationValidator.validateSpecification(file); | ||
IProcessingInfo<File> processingInfo = super.validate(file); | ||
/* | ||
* Don't process if errors have occurred. | ||
*/ | ||
if(!processingInfo.hasErrorMessages() && chromatogram instanceof IChromatogramMSD) { | ||
IChromatogramMSD chromatogramMSD = (IChromatogramMSD)chromatogram; | ||
monitor.subTask(IConstants.EXPORT_CHROMATOGRAM); | ||
IChromatogramMSDWriter writer = new ChromatogramWriter(); | ||
try { | ||
writer.writeChromatogram(file, chromatogramMSD, monitor); | ||
} catch(Exception e) { | ||
logger.warn(e); | ||
processingInfo.addErrorMessage(DESCRIPTION, "Something has definitely gone wrong with the file: " + file.getAbsolutePath()); | ||
} | ||
processingInfo.setProcessingResult(file); | ||
} | ||
return processingInfo; | ||
} | ||
} |
Oops, something went wrong.