From 23fa5d748d4b3d5a51dd5d7a627f9b27c6bb8db8 Mon Sep 17 00:00:00 2001 From: Oliver Stueker Date: Tue, 10 Jan 2017 09:00:00 -0330 Subject: [PATCH] more MIME-Types for chemical formats Added all MIME-types I could find for CDK supported formats. Sources: [1] https://en.wikipedia.org/wiki/Chemical_file_format#The_Chemical_MIME_Project [2] http://chemical-mime.sourceforge.net/chemical-mime-data.html --- .../src/main/java/org/openscience/cdk/io/formats/CTXFormat.java | 2 +- .../openscience/cdk/io/formats/Chem3D_Cartesian_1Format.java | 2 +- .../openscience/cdk/io/formats/Chem3D_Cartesian_2Format.java | 2 +- .../java/org/openscience/cdk/io/formats/ChemtoolFormat.java | 2 +- .../java/org/openscience/cdk/io/formats/GhemicalMMFormat.java | 2 +- .../main/java/org/openscience/cdk/io/formats/INChIFormat.java | 2 +- .../org/openscience/cdk/io/formats/INChIPlainTextFormat.java | 2 +- .../src/main/java/org/openscience/cdk/io/formats/SVGFormat.java | 2 +- .../main/java/org/openscience/cdk/io/formats/ShelXFormat.java | 2 +- .../java/org/openscience/cdk/io/formats/TurboMoleFormat.java | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/CTXFormat.java b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/CTXFormat.java index 93d301f155..32ba695af4 100644 --- a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/CTXFormat.java +++ b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/CTXFormat.java @@ -44,7 +44,7 @@ public String getFormatName() { /** {@inheritDoc} */ @Override public String getMIMEType() { - return null; + return "chemical/x-ctx"; } /** {@inheritDoc} */ diff --git a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/Chem3D_Cartesian_1Format.java b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/Chem3D_Cartesian_1Format.java index b0bb24d1f8..fa2c7ccaba 100644 --- a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/Chem3D_Cartesian_1Format.java +++ b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/Chem3D_Cartesian_1Format.java @@ -47,7 +47,7 @@ public String getFormatName() { /** {@inheritDoc} */ @Override public String getMIMEType() { - return null; + return "chemical/x-chem3d"; } /** {@inheritDoc} */ diff --git a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/Chem3D_Cartesian_2Format.java b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/Chem3D_Cartesian_2Format.java index f30ce7d771..562822bf33 100644 --- a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/Chem3D_Cartesian_2Format.java +++ b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/Chem3D_Cartesian_2Format.java @@ -45,7 +45,7 @@ public String getFormatName() { @Override public String getMIMEType() { - return null; + return "chemical/x-chem3d"; } @Override diff --git a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/ChemtoolFormat.java b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/ChemtoolFormat.java index f143d27d45..e12de2b59e 100644 --- a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/ChemtoolFormat.java +++ b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/ChemtoolFormat.java @@ -48,7 +48,7 @@ public String getFormatName() { /** {@inheritDoc} */ @Override public String getMIMEType() { - return null; + return "application/x-chemtool"; } /** {@inheritDoc} */ diff --git a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/GhemicalMMFormat.java b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/GhemicalMMFormat.java index e147a7d0b5..d82805038e 100644 --- a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/GhemicalMMFormat.java +++ b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/GhemicalMMFormat.java @@ -46,7 +46,7 @@ public String getFormatName() { /** {@inheritDoc} */ @Override public String getMIMEType() { - return null; + return "application/x-ghemical"; } /** {@inheritDoc} */ diff --git a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/INChIFormat.java b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/INChIFormat.java index d250640119..422bf8e610 100644 --- a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/INChIFormat.java +++ b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/INChIFormat.java @@ -46,7 +46,7 @@ public String getFormatName() { /** {@inheritDoc} */ @Override public String getMIMEType() { - return null; + return "chemical/x-inchi-xml"; } /** {@inheritDoc} */ diff --git a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/INChIPlainTextFormat.java b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/INChIPlainTextFormat.java index c62e9c96e5..7612200491 100644 --- a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/INChIPlainTextFormat.java +++ b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/INChIPlainTextFormat.java @@ -44,7 +44,7 @@ public String getFormatName() { /** {@inheritDoc} */ @Override public String getMIMEType() { - return null; + return "chemical/x-inchi"; } /** {@inheritDoc} */ diff --git a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/SVGFormat.java b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/SVGFormat.java index 5c1dd40e64..b63ff6030b 100644 --- a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/SVGFormat.java +++ b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/SVGFormat.java @@ -42,7 +42,7 @@ public String getFormatName() { /** {@inheritDoc} */ @Override public String getMIMEType() { - return null; + return "image/svg+xml"; } /** {@inheritDoc} */ diff --git a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/ShelXFormat.java b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/ShelXFormat.java index 5e7360a4ce..d4bcd16f22 100644 --- a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/ShelXFormat.java +++ b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/ShelXFormat.java @@ -46,7 +46,7 @@ public String getFormatName() { /** {@inheritDoc} */ @Override public String getMIMEType() { - return null; + return "chemical/x-shelx"; } /** {@inheritDoc} */ diff --git a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/TurboMoleFormat.java b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/TurboMoleFormat.java index 5d9eed1e62..8e826f1e88 100644 --- a/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/TurboMoleFormat.java +++ b/storage/ioformats/src/main/java/org/openscience/cdk/io/formats/TurboMoleFormat.java @@ -48,7 +48,7 @@ public String getFormatName() { /** {@inheritDoc} */ @Override public String getMIMEType() { - return null; + return "chemical/x-turbomole-coord"; } /** {@inheritDoc} */