-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71001be
commit 2d7273e
Showing
80 changed files
with
4,334 additions
and
2 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
chemclipse/features/org.eclipse.chemclipse.pcr.converter.supplier.rdml.feature/.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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.eclipse.chemclipse.pcr.converter.supplier.rdml.feature</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.pde.FeatureBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.FeatureNature</nature> | ||
</natures> | ||
</projectDescription> |
2 changes: 2 additions & 0 deletions
2
...chemclipse.pcr.converter.supplier.rdml.feature/.settings/org.eclipse.core.resources.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,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=utf8 |
1 change: 1 addition & 0 deletions
1
...ipse/features/org.eclipse.chemclipse.pcr.converter.supplier.rdml.feature/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 @@ | ||
bin.includes = feature.xml |
34 changes: 34 additions & 0 deletions
34
chemclipse/features/org.eclipse.chemclipse.pcr.converter.supplier.rdml.feature/feature.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,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<feature | ||
id="org.eclipse.chemclipse.pcr.converter.supplier.rdml.feature" | ||
label="RDML Converter" | ||
version="0.9.0.qualifier" | ||
provider-name="ChemClipse" | ||
plugin="org.eclipse.chemclipse.feature.branding" | ||
license-feature="org.eclipse.license" | ||
license-feature-version="1.0.0.qualifier"> | ||
|
||
<description url="http://www.chemclipse.net/"> | ||
This is the Real-Time PCR Data Markup Language qPCR converter. | ||
</description> | ||
|
||
<copyright url="http://www.chemclipse.net/"> | ||
Copyright (c) 2023 Lablicate GmbH. | ||
</copyright> | ||
|
||
<license url="%licenseURL"> | ||
%license | ||
</license> | ||
|
||
<url> | ||
<discovery label="RDML" url="http://rdml.org/"/> | ||
</url> | ||
|
||
<plugin | ||
id="org.eclipse.chemclipse.pcr.converter.supplier.rdml" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
|
||
</feature> |
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
7 changes: 7 additions & 0 deletions
7
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdml/.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,7 @@ | ||
<?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-17"/> | ||
<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
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdml/.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
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdml/.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>org.eclipse.chemclipse.pcr.converter.supplier.rdml</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> |
2 changes: 2 additions & 0 deletions
2
...eclipse.chemclipse.pcr.converter.supplier.rdml/.settings/org.eclipse.core.resources.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,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=utf8 |
7 changes: 7 additions & 0 deletions
7
...s/org.eclipse.chemclipse.pcr.converter.supplier.rdml/.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,7 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 | ||
org.eclipse.jdt.core.compiler.compliance=17 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=17 |
22 changes: 22 additions & 0 deletions
22
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdml/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: org.eclipse.chemclipse.pcr.converter.supplier.rdml | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: RDML PCR Converter | ||
Bundle-SymbolicName: org.eclipse.chemclipse.pcr.converter.supplier.rdml;singleton:=true | ||
Bundle-Version: 0.9.0.qualifier | ||
Bundle-Activator: org.eclipse.chemclipse.pcr.converter.supplier.rdml.Activator | ||
Bundle-Vendor: ChemClipse | ||
Require-Bundle: org.eclipse.core.runtime, | ||
org.eclipse.chemclipse.converter;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.pcr.converter;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.model;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.pcr.model;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.logging;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.processing;bundle-version="0.8.0", | ||
org.eclipse.chemclipse.support;bundle-version="0.8.0", | ||
jakarta.xml.bind-api;bundle-version="4.0.0" | ||
Bundle-RequiredExecutionEnvironment: JavaSE-17 | ||
Bundle-ActivationPolicy: lazy | ||
Import-Package: jakarta.xml.bind, | ||
jakarta.xml.bind.annotation, | ||
jakarta.xml.bind.annotation.adapters |
1 change: 1 addition & 0 deletions
1
...ins/org.eclipse.chemclipse.pcr.converter.supplier.rdml/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 @@ | ||
#Properties file |
6 changes: 6 additions & 0 deletions
6
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdml/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/,\ | ||
.,\ | ||
OSGI-INF/,\ | ||
plugin.xml |
19 changes: 19 additions & 0 deletions
19
chemclipse/plugins/org.eclipse.chemclipse.pcr.converter.supplier.rdml/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,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.4"?> | ||
<plugin> | ||
<extension | ||
point="org.eclipse.chemclipse.pcr.converter.plateSupplier"> | ||
<PlateSupplier | ||
description="Reads Real-time PCR Data Markup Language (RDML) qPCR experiments." | ||
exportConverter="org.eclipse.chemclipse.pcr.converter.supplier.rdml.core.PCRExportConverter" | ||
fileExtension=".rdml" | ||
fileName="" | ||
filterName="qPCR experiments (*.rdml)" | ||
id="org.eclipse.chemclipse.pcr.converter.supplier.rdml" | ||
importConverter="org.eclipse.chemclipse.pcr.converter.supplier.rdml.core.PCRImportConverter" | ||
importMagicNumberMatcher="org.eclipse.chemclipse.pcr.converter.supplier.rdml.core.MagicNumberMatcher" | ||
isExportable="false" | ||
isImportable="true"> | ||
</PlateSupplier> | ||
</extension> | ||
</plugin> |
37 changes: 37 additions & 0 deletions
37
...erter.supplier.rdml/src/org/eclipse/chemclipse/pcr/converter/supplier/rdml/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,37 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 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 | ||
*******************************************************************************/ | ||
package org.eclipse.chemclipse.pcr.converter.supplier.rdml; | ||
|
||
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; | ||
} | ||
|
||
@Override | ||
public void start(BundleContext bundleContext) throws Exception { | ||
|
||
Activator.context = bundleContext; | ||
} | ||
|
||
@Override | ||
public void stop(BundleContext bundleContext) throws Exception { | ||
|
||
Activator.context = null; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
...er.supplier.rdml/src/org/eclipse/chemclipse/pcr/converter/supplier/rdml/PathResolver.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,46 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2016, 2023 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 | ||
* Dr. Philip Wenig - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.chemclipse.pcr.converter.supplier.rdml; | ||
|
||
import java.io.IOException; | ||
import java.net.URL; | ||
|
||
import org.eclipse.core.runtime.FileLocator; | ||
import org.eclipse.core.runtime.IPath; | ||
import org.eclipse.core.runtime.Path; | ||
import org.eclipse.core.runtime.Platform; | ||
import org.osgi.framework.Bundle; | ||
|
||
public class PathResolver { | ||
|
||
/** | ||
* Returns a absolute path of the specified Folder. For example | ||
* TESTDATA_IMPORT_EMPTY as an absolute Path: | ||
* $PluginPath$/testData/test.rdml | ||
* | ||
* @param string | ||
* @return String absolutePath | ||
*/ | ||
public static String getAbsolutePath(String string) { | ||
|
||
Bundle bundle = Platform.getBundle(Activator.getContext().getBundle().getSymbolicName()); | ||
IPath path = new Path(string); | ||
URL url = FileLocator.find(bundle, path, null); | ||
try { | ||
return FileLocator.resolve(url).getPath(); | ||
} catch(IOException e) { | ||
e.printStackTrace(); | ||
} | ||
return null; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
....rdml/src/org/eclipse/chemclipse/pcr/converter/supplier/rdml/core/MagicNumberMatcher.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,26 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 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 | ||
*******************************************************************************/ | ||
package org.eclipse.chemclipse.pcr.converter.supplier.rdml.core; | ||
|
||
import java.io.File; | ||
|
||
import org.eclipse.chemclipse.converter.core.AbstractMagicNumberMatcher; | ||
import org.eclipse.chemclipse.converter.core.IMagicNumberMatcher; | ||
|
||
public class MagicNumberMatcher extends AbstractMagicNumberMatcher implements IMagicNumberMatcher { | ||
|
||
@Override | ||
public boolean checkFileFormat(File file) { | ||
|
||
return checkFileExtension(file, ".rdml"); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
....rdml/src/org/eclipse/chemclipse/pcr/converter/supplier/rdml/core/PCRExportConverter.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,39 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 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 | ||
*******************************************************************************/ | ||
package org.eclipse.chemclipse.pcr.converter.supplier.rdml.core; | ||
|
||
import java.io.File; | ||
|
||
import org.eclipse.chemclipse.pcr.converter.core.AbstractPlateExportConverter; | ||
import org.eclipse.chemclipse.pcr.converter.core.IPlateExportConverter; | ||
import org.eclipse.chemclipse.pcr.model.core.IPlate; | ||
import org.eclipse.chemclipse.processing.core.IProcessingInfo; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
|
||
public class PCRExportConverter extends AbstractPlateExportConverter implements IPlateExportConverter { | ||
|
||
private static IPlateExportConverter instance = null; | ||
|
||
@Override | ||
public IProcessingInfo<File> convert(File file, IPlate plate, IProgressMonitor monitor) { | ||
|
||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
public static IPlateExportConverter getInstance() { | ||
|
||
if(instance == null) { | ||
instance = new PCRExportConverter(); | ||
} | ||
return instance; | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
....rdml/src/org/eclipse/chemclipse/pcr/converter/supplier/rdml/core/PCRImportConverter.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,68 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 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 | ||
*******************************************************************************/ | ||
package org.eclipse.chemclipse.pcr.converter.supplier.rdml.core; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.security.InvalidParameterException; | ||
|
||
import javax.xml.parsers.ParserConfigurationException; | ||
|
||
import org.eclipse.chemclipse.logging.core.Logger; | ||
import org.eclipse.chemclipse.pcr.converter.core.AbstractPlateImportConverter; | ||
import org.eclipse.chemclipse.pcr.converter.core.IPlateImportConverter; | ||
import org.eclipse.chemclipse.pcr.converter.supplier.rdml.io.PCRReader; | ||
import org.eclipse.chemclipse.pcr.model.core.IPlate; | ||
import org.eclipse.chemclipse.processing.core.IProcessingInfo; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
import org.xml.sax.SAXException; | ||
|
||
import jakarta.xml.bind.JAXBException; | ||
|
||
public class PCRImportConverter extends AbstractPlateImportConverter implements IPlateImportConverter { | ||
|
||
private static final Logger logger = Logger.getLogger(PCRImportConverter.class); | ||
private static final String DESCRIPTION = "RDML Converter"; | ||
private static IPlateImportConverter instance = null; | ||
|
||
@Override | ||
public IProcessingInfo<IPlate> convert(File file, IProgressMonitor monitor) { | ||
|
||
IProcessingInfo<IPlate> processingInfo = super.validate(file); | ||
if(!processingInfo.hasErrorMessages()) { | ||
PCRReader qPCR = new PCRReader(); | ||
try { | ||
IPlate plate = qPCR.read(file); | ||
processingInfo.setProcessingResult(plate); | ||
} catch(IOException e) { | ||
logger.warn(e); | ||
processingInfo.addErrorMessage(DESCRIPTION, "Failed to read file: " + file.getAbsolutePath(), e); | ||
} catch(SAXException | JAXBException | ||
| ParserConfigurationException e) { | ||
logger.warn(e); | ||
processingInfo.addErrorMessage(DESCRIPTION, "Failed to read file contents: " + file.getAbsolutePath(), e); | ||
} catch(InvalidParameterException e) { | ||
logger.warn(e); | ||
processingInfo.addErrorMessage(DESCRIPTION, "Unsupported data in file: " + file.getAbsolutePath(), e); | ||
} | ||
} | ||
return processingInfo; | ||
} | ||
|
||
public static IPlateImportConverter getInstance() { | ||
|
||
if(instance == null) { | ||
instance = new PCRImportConverter(); | ||
} | ||
return instance; | ||
} | ||
} |
Oops, something went wrong.