Constructor and Description |
---|
MolConverter() |
@GET @Path(value="convert") @Produces(value="application/json") public ConversionResult convert(@QueryParam(value="mol") String mol, @QueryParam(value="importopts") @DefaultValue(value="") String importOpts, @QueryParam(value="f") String format, @QueryParam(value="binary") @DefaultValue(value="false") boolean binary, @QueryParam(value="clean2d") @DefaultValue(value="false") boolean clean2d)
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
.
The response of this method is an object containing the converted structure and additional information.
Note that it is recommended to use POST
requests with JSON (`application/json`) parameters (passed
in the request body.)
mol
- Molecule to convert. Input is parsed using MolImporter.importMol(java.lang.String)
when no
import option specified; otherwise using MolImporter.importMol(java.lang.String, java.lang.String)
importOpts
- Import options or null/empty stringformat
- Format string to pass to
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
binary
- Use binary format by invoking
MolExporter.exportToBinFormat(chemaxon.struc.Molecule, java.lang.String)
and base64 encoding the resultclean2d
- Invoke Clean2D (Cleaner.clean(chemaxon.struc.MoleculeGraph, int)
) on the imported
structureWuiBadRequestException
- When import or export failed@POST @Path(value="convert") @Produces(value="application/json") @Consumes(value="application/x-www-form-urlencoded") public ConversionResult convertPost(@FormParam(value="mol") String mol, @FormParam(value="importopts") @DefaultValue(value="") String importOpts, @FormParam(value="f") String format, @FormParam(value="binary") @DefaultValue(value="false") boolean binary, @FormParam(value="clean2d") @DefaultValue(value="false") boolean clean2d)
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
.
The response of this method is an object containing the converted structure and additional information.
Note that it is recommended to use POST
requests with JSON (`application/json`) parameters (passed
in the request body.)
mol
- Molecule to convert. Input is parsed using MolImporter.importMol(java.lang.String)
when no
import option specified; otherwise using MolImporter.importMol(java.lang.String, java.lang.String)
importOpts
- Import options or null/empty stringformat
- Format string to pass to
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
binary
- Use binary format by invoking
MolExporter.exportToBinFormat(chemaxon.struc.Molecule, java.lang.String)
and base64 encoding the resultclean2d
- Invoke Clean2D (Cleaner.clean(chemaxon.struc.MoleculeGraph, int)
) on the imported
structureWuiBadRequestException
- When import or export failed@POST @Path(value="convert") @Produces(value="application/json") @Consumes(value="application/json") public ConversionResult convertPost(ConversionRequest req)
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
.
The response of this method is an object containing the converted structure and additional information.req
- Conversion requestWuiBadRequestException
- When import or export failed@POST @Path(value="convert-multiple") @Produces(value="application/json") @Consumes(value="application/json") public MultiConversionResult converMultiplePost(MultiConversionRequest req)
req
- Multiple conversions requestWuiBadRequestException
- on the first failed import or export conversion or when no conversion request is
contained in the request object.@GET @Path(value="cxformat") @Produces(value="text/plain") public String toCxFormat(@QueryParam(value="mol") String mol, @QueryParam(value="importopts") @DefaultValue(value="") String importOpts, @QueryParam(value="f") String format) throws WuiBadRequestException
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
.
The response of this method is the converted structure.mol
- Molecule to convert. Input is parsed using MolImporter.importMol(java.lang.String)
when no
import option specified; otherwise using MolImporter.importMol(java.lang.String, java.lang.String)
importOpts
- Import options or null/empty stringformat
- Format string to pass to
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
WuiBadRequestException
- When import or export failed@POST @Path(value="cxformat") @Consumes(value="application/x-www-form-urlencoded") @Produces(value="text/plain") public String toCxFormatPost(@FormParam(value="mol") String mol, @FormParam(value="importopts") @DefaultValue(value="") String importOpts, @FormParam(value="f") String format) throws WuiBadRequestException
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
.
The response of this method is the converted structure.mol
- Molecule to convert. Input is parsed using MolImporter.importMol(java.lang.String)
when no
import option specified; otherwise using MolImporter.importMol(java.lang.String, java.lang.String)
importOpts
- Import options or null/empty stringformat
- Format string to pass to
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
WuiBadRequestException
- When import or export failed@GET @Path(value="cxbinformat") @Produces(value="application/octet-stream") public byte[] toCxBinFormat(@QueryParam(value="mol") String mol, @QueryParam(value="importopts") @DefaultValue(value="") String importOpts, @QueryParam(value="f") String format) throws WuiBadRequestException
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
.mol
- Molecule to convert. Input is parsed using MolImporter.importMol(java.lang.String)
when no
import option specified; otherwise using MolImporter.importMol(java.lang.String, java.lang.String)
importOpts
- Import options or null/empty stringformat
- Format string to pass to
MolExporter.exportToBinFormat(chemaxon.struc.Molecule, java.lang.String)
WuiBadRequestException
- When import or export failed@POST @Path(value="cxbinformat") @Consumes(value="application/x-www-form-urlencoded") @Produces(value="application/octet-stream") public byte[] toCxBinFormatPost(@FormParam(value="mol") String mol, @FormParam(value="importopts") @DefaultValue(value="") String importOpts, @FormParam(value="f") String format) throws WuiBadRequestException
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
.mol
- Molecule to convert. Input is parsed using MolImporter.importMol(java.lang.String)
when no
import option specified; otherwise using MolImporter.importMol(java.lang.String, java.lang.String)
importOpts
- Import options or null/empty stringformat
- Format string to pass to
MolExporter.exportToBinFormat(chemaxon.struc.Molecule, java.lang.String)
WuiBadRequestException
- When import or export failed