Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

joelib.io.types
Class ChemicalMarkupLanguage  view ChemicalMarkupLanguage download ChemicalMarkupLanguage.java

java.lang.Object
  extended byjoelib.io.types.ChemicalMarkupLanguage
All Implemented Interfaces:
joelib.io.types.cml.CMLWriterProperties, joelib.io.MoleculeFileType, joelib.io.PropertyWriter

public class ChemicalMarkupLanguage
extends java.lang.Object
implements joelib.io.MoleculeFileType, joelib.io.PropertyWriter, joelib.io.types.cml.CMLWriterProperties

Reader/Writer for Chemical Markup Language (CML) files.


Field Summary
private  joelib.io.types.cml.MoleculeFileCDO cdo
           
static float CML_VERSION_1
           
static float CML_VERSION_2
           
private static float cmlDefaultVersion
           
private  int cmlOutputType
           
private  joelib.io.types.cml.CMLMoleculeWriter cmlOutputWriter
           
static java.lang.String DEFAULT_DELIMITER
           
private static java.lang.String defaultDelimiter
           
private static java.lang.String description
           
private  boolean done
           
private  java.lang.String dtdResourceDir
           
private static java.lang.String[] extensions
           
private  boolean forceFormalCharge
           
private  boolean fragment
           
private  boolean impliciteHydrogens
           
private  java.io.InputStreamReader isr
           
private static org.apache.log4j.Category logger
          Obtain a suitable logger.
private  boolean moleculeReaded
           
static int OUTPUT_ARRAY
           
static java.lang.String OUTPUT_ARRAY_S
           
static int OUTPUT_HUGE
           
static java.lang.String OUTPUT_HUGE_S
           
static int OUTPUT_LARGE
           
static java.lang.String OUTPUT_LARGE_S
           
private  org.xml.sax.XMLReader parser
           
private  boolean partialCharge
           
private  java.io.PrintStream ps
           
private  boolean symmetryInformations
           
 
Constructor Summary
ChemicalMarkupLanguage()
           
 
Method Summary
 void closeReader()
          Description of the Method
 void closeWriter()
          Description of the Method
 boolean forceWriteFormalCharge()
           
 float getCMLversion()
           
static java.lang.String getDefaultDelimiter()
           
private  void initProperties()
          Description of the Method
 void initReader(java.io.InputStream iStream)
          Description of the Method
 void initWriter(java.io.OutputStream os)
          Description of the Method
 java.lang.String inputDescription()
          Description of the Method
 java.lang.String[] inputFileExtensions()
          Description of the Method
 java.lang.String outputDescription()
          Description of the Method
 java.lang.String[] outputFileExtensions()
          Description of the Method
 java.lang.String read()
          Reads an molecule entry as (unparsed) String representation.
 boolean read(joelib.molecule.JOEMol mol)
          Description of the Method
 boolean read(joelib.molecule.JOEMol mol, java.lang.String title)
          Loads an molecule in MDL SD-MOL format and sets the title.
 boolean readable()
          Description of the Method
 boolean skipReaderEntry()
          Skips an molecule or the rest of a molecule entry to grant the next read(JOEMol mol) invocation a proper starting position.
 boolean write(joelib.molecule.JOEMol mol)
          Description of the Method
 boolean write(joelib.molecule.JOEMol mol, java.lang.String title)
          Description of the Method
 boolean write(joelib.molecule.JOEMol mol, java.lang.String title, boolean writePairData, java.util.Vector attribs2write)
          Writes a molecule with his JOEPairData .
 boolean writeable()
          Description of the Method
 boolean writeImpliciteHydrogens()
           
 boolean writePartialCharge()
           
 boolean writeSymmetryInformations()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.log4j.Category logger
Obtain a suitable logger.


description

private static final java.lang.String description

extensions

private static final java.lang.String[] extensions

OUTPUT_HUGE

public static final int OUTPUT_HUGE
See Also:
Constant Field Values

OUTPUT_LARGE

public static final int OUTPUT_LARGE
See Also:
Constant Field Values

OUTPUT_ARRAY

public static final int OUTPUT_ARRAY
See Also:
Constant Field Values

OUTPUT_HUGE_S

public static final java.lang.String OUTPUT_HUGE_S
See Also:
Constant Field Values

OUTPUT_LARGE_S

public static final java.lang.String OUTPUT_LARGE_S
See Also:
Constant Field Values

OUTPUT_ARRAY_S

public static final java.lang.String OUTPUT_ARRAY_S
See Also:
Constant Field Values

CML_VERSION_1

public static final float CML_VERSION_1
See Also:
Constant Field Values

CML_VERSION_2

public static final float CML_VERSION_2
See Also:
Constant Field Values

DEFAULT_DELIMITER

public static final java.lang.String DEFAULT_DELIMITER
See Also:
Constant Field Values

cmlDefaultVersion

private static float cmlDefaultVersion

defaultDelimiter

private static java.lang.String defaultDelimiter

cmlOutputWriter

private joelib.io.types.cml.CMLMoleculeWriter cmlOutputWriter

isr

private java.io.InputStreamReader isr

cdo

private joelib.io.types.cml.MoleculeFileCDO cdo

ps

private java.io.PrintStream ps

dtdResourceDir

private java.lang.String dtdResourceDir

parser

private org.xml.sax.XMLReader parser

done

private boolean done

forceFormalCharge

private boolean forceFormalCharge

fragment

private boolean fragment

impliciteHydrogens

private boolean impliciteHydrogens

moleculeReaded

private boolean moleculeReaded

partialCharge

private boolean partialCharge

symmetryInformations

private boolean symmetryInformations

cmlOutputType

private int cmlOutputType
Constructor Detail

ChemicalMarkupLanguage

public ChemicalMarkupLanguage()
Method Detail

getCMLversion

public float getCMLversion()
Specified by:
getCMLversion in interface joelib.io.types.cml.CMLWriterProperties

getDefaultDelimiter

public static java.lang.String getDefaultDelimiter()

closeReader

public void closeReader()
                 throws java.io.IOException
Description copied from interface: joelib.io.MoleculeFileType
Description of the Method

Specified by:
closeReader in interface joelib.io.MoleculeFileType

closeWriter

public void closeWriter()
                 throws java.io.IOException
Description copied from interface: joelib.io.MoleculeFileType
Description of the Method

Specified by:
closeWriter in interface joelib.io.MoleculeFileType

forceWriteFormalCharge

public boolean forceWriteFormalCharge()
Specified by:
forceWriteFormalCharge in interface joelib.io.types.cml.CMLWriterProperties

initReader

public void initReader(java.io.InputStream iStream)
                throws java.io.IOException
Description of the Method

Specified by:
initReader in interface joelib.io.MoleculeFileType

initWriter

public void initWriter(java.io.OutputStream os)
                throws java.io.IOException
Description of the Method

Specified by:
initWriter in interface joelib.io.MoleculeFileType

inputDescription

public java.lang.String inputDescription()
Description of the Method

Specified by:
inputDescription in interface joelib.io.MoleculeFileType

inputFileExtensions

public java.lang.String[] inputFileExtensions()
Description of the Method

Specified by:
inputFileExtensions in interface joelib.io.MoleculeFileType

outputDescription

public java.lang.String outputDescription()
Description of the Method

Specified by:
outputDescription in interface joelib.io.MoleculeFileType

outputFileExtensions

public java.lang.String[] outputFileExtensions()
Description of the Method

Specified by:
outputFileExtensions in interface joelib.io.MoleculeFileType

read

public java.lang.String read()
                      throws java.io.IOException
Reads an molecule entry as (unparsed) String representation.

Specified by:
read in interface joelib.io.MoleculeFileType

read

public boolean read(joelib.molecule.JOEMol mol)
             throws java.io.IOException
Description of the Method

Specified by:
read in interface joelib.io.MoleculeFileType

read

public boolean read(joelib.molecule.JOEMol mol,
                    java.lang.String title)
             throws java.io.IOException
Loads an molecule in MDL SD-MOL format and sets the title. If title is null the title line in the molecule file is used.

Specified by:
read in interface joelib.io.MoleculeFileType

readable

public boolean readable()
Description of the Method

Specified by:
readable in interface joelib.io.MoleculeFileType

skipReaderEntry

public boolean skipReaderEntry()
                        throws java.io.IOException
Description copied from interface: joelib.io.MoleculeFileType
Skips an molecule or the rest of a molecule entry to grant the next read(JOEMol mol) invocation a proper starting position. This method should always be called if you plan to throw an MoleculeIOException.

Specified by:
skipReaderEntry in interface joelib.io.MoleculeFileType

write

public boolean write(joelib.molecule.JOEMol mol)
              throws java.io.IOException
Description of the Method

Specified by:
write in interface joelib.io.MoleculeFileType

write

public boolean write(joelib.molecule.JOEMol mol,
                     java.lang.String title)
              throws java.io.IOException
Description of the Method

Specified by:
write in interface joelib.io.MoleculeFileType

write

public boolean write(joelib.molecule.JOEMol mol,
                     java.lang.String title,
                     boolean writePairData,
                     java.util.Vector attribs2write)
              throws java.io.IOException
Writes a molecule with his JOEPairData .

Specified by:
write in interface joelib.io.PropertyWriter

writeImpliciteHydrogens

public boolean writeImpliciteHydrogens()
Specified by:
writeImpliciteHydrogens in interface joelib.io.types.cml.CMLWriterProperties

writePartialCharge

public boolean writePartialCharge()
Specified by:
writePartialCharge in interface joelib.io.types.cml.CMLWriterProperties

writeSymmetryInformations

public boolean writeSymmetryInformations()
Specified by:
writeSymmetryInformations in interface joelib.io.types.cml.CMLWriterProperties

writeable

public boolean writeable()
Description of the Method

Specified by:
writeable in interface joelib.io.MoleculeFileType

initProperties

private void initProperties()
Description of the Method