public class MFileFormat extends Object
Modifier and Type | Field and Description |
---|---|
static MFileFormat |
ABBREVGROUP
ChemAxon SMILES Abbreviated Groups.
|
static MFileFormat |
ACCORD
ACCORD file format
|
static MFileFormat |
AWT_IMAGE
Image object (java.awt.Image).
|
static MFileFormat |
BASE64
BASE64 encoded file.
|
static MFileFormat |
CDX
ChemDraw CDX file.
|
static MFileFormat |
CDXML
ChemDraw CDXML file.
|
static MFileFormat |
CML
Chemical Markup Language.
|
static MFileFormat |
CSMDL_IN
ChemAxon Compressed Molfiles, RGfiles, Rgfiles, SDfiles or RDfiles.
|
static MFileFormat |
CSMOL_OUT
ChemAxon Compressed Molfiles and Rgfiles.
|
static MFileFormat |
CSRDF
ChemAxon Compressed RDfiles.
|
static MFileFormat |
CSRXN_OUT
ChemAxon Compressed Rxnfiles.
|
static MFileFormat |
CSSDF_OUT
ChemAxon Compressed SDfiles.
|
static MFileFormat |
CXSMARTS
ChemAxon Extended SMARTS.
|
static MFileFormat |
CXSMILES
ChemAxon Extended SMILES.
|
static MFileFormat |
D2S
Any document format recognized by Document to Structure (doc, odt, ...).
|
static MFileFormat |
DNA
DNA sequence.
|
static MFileFormat |
EMF
Windows Enhanced Metafiles.
|
static MFileFormat |
EPS
Encapsulated PostScript vector image format.
|
static long |
F_ARCHIVE
General archive format that stores a file in another format.
|
static long |
F_BINARY
Import/export module handles binary (byte array) data.
|
static long |
F_COORDS
The format can store atom coordinates if this flag is set.
|
static long |
F_EXPORT
Export is possible if this flag is set.
|
static long |
F_GRAPHICS
File format readable by a graphics program
(image viewer, ray tracer etc.).
|
static long |
F_IMAGE
2D image file format, readable by image viewers.
|
static long |
F_IMPORT
Import is possible if this flag is set.
|
static long |
F_MIXED
Storage of records in different formats is possible if this flag is
set.
|
static long |
F_MOLECULE
The format can store molecule(s) if this flag is set.
|
static long |
F_MULTIPLE_RECORDS_LEGAL
The format is designed to store multiple records if this flag is set.
|
static long |
F_MULTIPLE_RECORDS_POSSIBLE
The import/export modules can handle files with multiple records
if this flag is set, but according to the format definition it is
not legal.
|
static long |
F_OBJECT
Import/export module creates or reads a java object.
|
static long |
F_REACTION
The format can store reaction(s) if this flag is set.
|
static long |
F_RECOGNIZER
Format recognizer exists if this flag is set.
|
static long |
F_SINGLE_LINE
Format uses one line per structure.
|
static long |
F_USER_DEFINED
User defined format.
|
static long |
F_XML
The format is XML based if this flag is set.
|
static MFileFormat |
FASTA
FASTA file format
|
static MFileFormat |
FASTA_DNA
FASTA file format with DNA sequence
|
static MFileFormat |
FASTA_PEPTIDE
FASTA file format with peptide sequence
|
static MFileFormat |
FASTA_RNA
FASTA file format with RNA sequence
|
static MFileFormat |
GAUSSIAN_CUBE
Gaussian Cube files.
|
static MFileFormat |
GAUSSIAN_INPUT
Gaussian Input Format.
|
static MFileFormat |
GAUSSIAN_INPUTZ
Gaussian Input Format: Z-matrix.
|
static MFileFormat |
GAUSSIAN_OUTPUT
Gaussian output format.
|
static MFileFormat |
GZIP
GZIPped file.
|
static MFileFormat |
INCHI
IUPAC InChI files.
|
static MFileFormat |
INCHIKEY
IUPAC InChIKey.
|
static MFileFormat |
JPEG
JPEG format.
|
static MFileFormat |
MOL
MDL Molfiles and Rgfiles.
|
static MFileFormat |
MOL_V3_OUT
MDL Extended Molfiles and Rgfiles.
|
static MFileFormat |
MOL2
Tripos Mol2 files.
|
static MFileFormat |
MRV
Chemaxon Marvin Document.
|
static MFileFormat |
MSBMP
Windows Bitmap format.
|
static MFileFormat |
NAME
IUPAC Name files.
|
static MFileFormat |
OSRA |
static MFileFormat |
PDB
Protein Data Bank format.
|
static MFileFormat |
PDF
Portable Document Format.
|
static MFileFormat |
PEPTIDE_IN
Peptide Sequence.
|
static MFileFormat |
PEPTIDE1_OUT
Peptide Sequence (1-letter).
|
static MFileFormat |
PEPTIDE3_OUT
Peptide Sequence (3-letter).
|
static MFileFormat |
PNG
Portable Network Graphics.
|
static MFileFormat |
POVRAY
POVRay file.
|
static MFileFormat |
RDF
MDL RDfiles.
|
static MFileFormat |
RNA
RNA sequence.
|
static MFileFormat |
RXN
MDL Rxnfiles.
|
static MFileFormat |
RXN_V3_OUT
MDL Extended Rxnfiles.
|
static MFileFormat |
SDF
MDL SDfiles.
|
static MFileFormat |
SKC
SKC file format
|
static MFileFormat |
SMARTS
SMARTS.
|
static MFileFormat |
SMILES
SMILES.
|
static MFileFormat |
SVG
Scalable Vector Graphics.
|
static MFileFormat |
SYBYLMOL
Tripos SYBYL molfiles.
|
static MFileFormat |
TIFF
Tagged Image File Format.
|
static MFileFormat |
XYZ
XYZ files.
|
Constructor and Description |
---|
MFileFormat(String desc,
String format,
String mime,
String exts,
String rrname,
String impname,
String expname,
String recogn,
long f)
Creates a format descriptor.
|
Modifier and Type | Method and Description |
---|---|
MolExportModule |
createExportModule()
Creates the export module.
|
MolExportModule |
createExportModule(String enc)
Creates the export module.
|
MolImportModule |
createImportModule()
Creates the molecule import module.
|
Recognizer |
createRecognizer()
Creates a recognizer module.
|
Recognizer |
createRecognizer(String fmt)
Deprecated.
as of Marvin 2014.07.21.0 use
createRecognizer() instead |
MRecordReader |
createRecordReader(MolInputStream mis,
String opts)
Creates the record reader.
|
MFileFormat |
getAssociatedNonQueryFormat()
Gets the associated non-query format.
|
MFileFormat |
getAssociatedQueryFormat()
Gets the associated query format.
|
String |
getDescription()
Gets the format description.
|
String[] |
getExtensions()
Gets the extension list.
|
long |
getFlags()
Gets the format descriptor flags.
|
String |
getMIMEType()
Deprecated.
as of Marvin 2014.07.21.0 not used
|
String |
getName()
Gets the codename of the format.
|
String[] |
getNames()
Gets all the codenames of the format.
|
int |
getPriority(String subfmt)
Deprecated.
as of Marvin 2014.07.21.0 use
getSubFormatPriority(String) instead |
static int |
getSubFormatPriority(String subFormatName)
Gets the priority of the specified subformat name.
|
boolean |
isFlagSet(long flag)
Checks whether the format has a given (set of) flag(s) set.
|
boolean |
matches(String fmt,
long f,
long mask)
Tests whether the format matches the specified pattern.
|
String |
toString()
Overrides Object.toString() to ease debugging.
|
public static final MFileFormat MRV
public static final MFileFormat CML
public static final MFileFormat MOL
public static final MFileFormat MOL_V3_OUT
public static final MFileFormat RXN
public static final MFileFormat RXN_V3_OUT
public static final MFileFormat SDF
public static final MFileFormat RDF
public static final MFileFormat CSMDL_IN
public static final MFileFormat CSMOL_OUT
public static final MFileFormat CSRXN_OUT
public static final MFileFormat CSSDF_OUT
public static final MFileFormat CSRDF
public static final MFileFormat SMILES
public static final MFileFormat SMARTS
public static final MFileFormat CXSMILES
public static final MFileFormat CXSMARTS
public static final MFileFormat ABBREVGROUP
public static final MFileFormat INCHI
public static final MFileFormat INCHIKEY
public static final MFileFormat NAME
public static final MFileFormat PEPTIDE_IN
public static final MFileFormat PEPTIDE1_OUT
public static final MFileFormat PEPTIDE3_OUT
public static final MFileFormat RNA
public static final MFileFormat DNA
public static final MFileFormat XYZ
public static final MFileFormat GAUSSIAN_CUBE
public static final MFileFormat GAUSSIAN_INPUT
public static final MFileFormat GAUSSIAN_INPUTZ
public static final MFileFormat GAUSSIAN_OUTPUT
public static final MFileFormat SYBYLMOL
public static final MFileFormat MOL2
public static final MFileFormat PDB
public static final MFileFormat GZIP
public static final MFileFormat BASE64
public static final MFileFormat AWT_IMAGE
public static final MFileFormat JPEG
public static final MFileFormat PNG
public static final MFileFormat MSBMP
public static final MFileFormat PDF
public static final MFileFormat SVG
public static final MFileFormat EPS
public static final MFileFormat TIFF
public static final MFileFormat EMF
public static final MFileFormat POVRAY
public static final MFileFormat OSRA
public static final MFileFormat CDX
public static final MFileFormat CDXML
public static final MFileFormat D2S
public static final MFileFormat FASTA
public static final MFileFormat FASTA_DNA
public static final MFileFormat FASTA_RNA
public static final MFileFormat FASTA_PEPTIDE
public static final MFileFormat SKC
public static final MFileFormat ACCORD
public static final long F_EXPORT
public static final long F_IMPORT
public static final long F_RECOGNIZER
null
.public static final long F_BINARY
public static final long F_OBJECT
public static final long F_MOLECULE
public static final long F_REACTION
public static final long F_ARCHIVE
public static final long F_GRAPHICS
public static final long F_IMAGE
public static final long F_COORDS
public static final long F_MULTIPLE_RECORDS_LEGAL
public static final long F_MULTIPLE_RECORDS_POSSIBLE
public static final long F_MIXED
public static final long F_XML
public static final long F_USER_DEFINED
public static final long F_SINGLE_LINE
public MFileFormat(String desc, String format, String mime, String exts, String rrname, String impname, String expname, String recogn, long f)
"format1=priority1 format2=priority2 ..."
.desc
- the format descriptionformat
- the formatmime
- the MIME type or null
if unknownexts
- the file extensions separated by spacesrrname
- name of the record reader moduleimpname
- name of the import moduleexpname
- name of the export modulerecogn
- the file format recognizer module name and the priority
(nonnegative integer)f
- the flagspublic String getName()
public String[] getNames()
public String getDescription()
public String[] getExtensions()
@Deprecated public String getMIMEType()
null
if unknownpublic long getFlags()
public MFileFormat getAssociatedQueryFormat()
null
public MFileFormat getAssociatedNonQueryFormat()
null
@Deprecated public int getPriority(String subfmt)
getSubFormatPriority(String)
insteadsubfmt
- the name of the subformat or null
IllegalArgumentException
- if priority for the specified subformat is not definedpublic static int getSubFormatPriority(String subFormatName)
subFormatName
- the name of the subformatIllegalArgumentException
- if priority for the specified subformat is not definedpublic boolean matches(String fmt, long f, long mask)
fmt
- the format name or null
if not importantf
- these flags must be setmask
- only bits specified here are taken into accounttrue
if it matches, false
otherwisepublic boolean isFlagSet(long flag)
flag
- the flag (or set of flags) to be testpublic MRecordReader createRecordReader(MolInputStream mis, String opts) throws MolFormatException
mis
- the molecule input streamopts
- the options or null
null
if there is no record reader for this formatIllegalCharsetNameException
- if illegal encoding is usedUnsupportedCharsetException
- if unsupported encoding is usedSecurityException
- if the module cannot be loaded because of
a firewall problemMolFormatException
MFileFormatUtil.createRecordReader(InputStream, String)
public MolImportModule createImportModule() throws MolFormatException
null
if there is no importer for this formatSecurityException
- if the module cannot be loaded because of
a firewall problemMolFormatException
public MolExportModule createExportModule() throws MolExportException
null
if there is no exporter for this formatSecurityException
- if the module cannot be loaded because of
a firewall problemMolExportException
MFileFormatUtil.createExportModule(String)
public MolExportModule createExportModule(String enc) throws MolExportException
enc
- the encodingnull
if there is no exporter for this formatSecurityException
- if the module cannot be loaded because of
a firewall problemMolExportException
MFileFormatUtil.createExportModule(String)
public Recognizer createRecognizer() throws MolFormatException
null
if there is no recognizer for this formatSecurityException
- if the module cannot be loaded because of a firewall problemMolFormatException
- if the recognizer module cannot be created@Deprecated public Recognizer createRecognizer(String fmt) throws MolFormatException
createRecognizer()
insteadfmt
- the (sub)format's codenamenull
if there is no recognizer for this formatSecurityException
- if the module cannot be loaded because of
a firewall problemMolFormatException
- if the recognizer module cannot be
createdpublic String toString()
@
', the unsigned
hexadecimal representation of the hash code of the object
and the format name(s) in square brackets.