org.openscience.nmrshiftdb.om
Class DBAtom

java.lang.Object
  extended by org.apache.torque.om.BaseObject
      extended by org.openscience.nmrshiftdb.om.BaseDBAtom
          extended by org.openscience.nmrshiftdb.om.DBAtom
All Implemented Interfaces:
java.io.Serializable, org.apache.torque.om.Persistent

public class DBAtom
extends BaseDBAtom
implements org.apache.torque.om.Persistent

You should add additional methods to this class to meet the application requirements. This class will only be generated as long as it does not already exist in the output directory.

Author:
shk3
See Also:
Serialized Form

Field Summary
(package private)  DBCoordinateSet2d coords2
           
(package private)  DBCoordinateSet3d coords3
           
private  java.util.Vector couplings
           
 boolean force3d
           
 
Fields inherited from class org.openscience.nmrshiftdb.om.BaseDBAtom
collDBBondDBAtoms, collDBCoordinateSet2ds, collDBCoordinateSet3ds, collDBCouplingsRelatedByAtomId1, collDBCouplingsRelatedByAtomId2, collDBIdentifiers, collDBSignalDBAtoms
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
DBAtom()
          Constructor for the DBAtom object
DBAtom(org.openscience.cdk.interfaces.IAtom atom, org.openscience.cdk.interfaces.IAtomContainer ac, int dbmol, java.lang.String hoseCode, java.lang.String hoseCodeWithRings, boolean visible)
          Constructor for the DBAtom object.
 
Method Summary
 void delete(java.sql.Connection conn)
          Deletes this atom.
 DBSignal getAnySignal(int spectrumId)
          Gets the DBSignal associated with this atom in a certain spectrum.
 org.openscience.cdk.interfaces.IAtom getAsCdkAtom()
          Gets the asCdkAtom attribute of the DBAtom object
 org.openscience.cdk.interfaces.IAtom getAsCdkAtom(SubmittingData subData)
          Gets the cdk atom corresponding with this atom int molWithH of a submittingData.
static java.util.List getAtoms(int molid)
          Gets the atoms of a certain molecules.
static java.util.List getAtomsWithoutHs(int molid)
          Gets the atoms of a certain molecules withouth the Hs.
 java.util.Vector getBonds()
          Gets the bonds of the DBAtom object
 java.util.Vector getConnectedAtoms()
          Gets the atoms connected with this atom
 java.util.Vector getConnectedAtoms(org.openscience.cdk.interfaces.IMolecule mol, DBAtom[] dbatoms)
          Gets the atoms connected with this atom
 double[] getCoordinates(int coordinateSetId)
          Gets the coordinates of this atom in a coordinate set with a certain coordinate set id.
 java.util.Vector getCouplings(DBSpectrum spectrum)
          Gets the couplings of this atom in a certain spectrum.
 java.lang.String getCouplingsString(DBSpectrum spectrum)
          Gets the couplings of this atom in a certain spectrum.as a string
 java.util.List getDBSignals()
          Gets the dBSignals attribute of the DBAtom object
 java.util.List getDBSignals(char type)
          Gets the dBSignals attribute of the DBAtom object.
 java.util.List getDBSignals(DBSpectrum spectrum)
          Gets the dBSignals attribute of the DBAtom object
 java.util.List getDBSignalsBySpectrumType(java.lang.String typname)
           
 int getHydrogenCount()
          Gets the nubmer of hydrogens connected to the DBAtom
 int getHydrogenCount(DBAtom[] atoms, org.openscience.cdk.interfaces.IMolecule cdkmol)
           
 java.lang.String getIdentifier(DBSpectrum spectrum)
          Gets the identifier attribute of the DBAtom object in a certain spectrum.
 java.lang.String getIdentifier(int spectrum)
           
 int getIntegralStuff()
           
 int getIntegralStuff(DBAtom[] atoms, org.openscience.cdk.interfaces.IMolecule cdkmol)
           
 int getMdlNumber()
          Gets the mdl number of the Atom.
 int getMdlNumberPlus1()
          Gets the mdlNumber value + 1
 int getMdlNumberPlus1Heavy()
          Gets the mdlNumber value + 1, if atom is a heavy atom of the atom itself, if a hydrogen, of the heavy atom it is attached to.
 java.lang.String getMultiplicity(DBSpectrum spectrum)
          Gets a string giving the multiplicity and coupling constants of the signal of this atom in a certain spectrum.
 boolean hasCouplings(DBSpectrum spectrum)
          Gets the couplings of this atom in a certain spectrum.as a string
 boolean isCoordinate3d(int coordinateSetId)
           
 void save(java.sql.Connection dbCon)
          Saves this object incl.
 
Methods inherited from class org.openscience.nmrshiftdb.om.BaseDBAtom
addDBBondDBAtom, addDBCoordinateSet2d, addDBCoordinateSet3d, addDBCouplingRelatedByAtomId1, addDBCouplingRelatedByAtomId2, addDBIdentifier, addDBSignalDBAtom, copy, copyInto, getAtomicMass, getAtomId, getByName, getByPeerName, getByPosition, getDBBondDBAtoms, getDBBondDBAtoms, getDBBondDBAtoms, getDBBondDBAtoms, getDBBondDBAtomsJoinDBAtom, getDBBondDBAtomsJoinDBBond, getDBCoordinateSet2ds, getDBCoordinateSet2ds, getDBCoordinateSet2ds, getDBCoordinateSet2ds, getDBCoordinateSet2dsJoinDBAtom, getDBCoordinateSet2dsJoinDBCoordinateSetType, getDBCoordinateSet3ds, getDBCoordinateSet3ds, getDBCoordinateSet3ds, getDBCoordinateSet3ds, getDBCoordinateSet3dsJoinDBAtom, getDBCoordinateSet3dsJoinDBCoordinateSetType, getDBCouplingsRelatedByAtomId1, getDBCouplingsRelatedByAtomId1, getDBCouplingsRelatedByAtomId1, getDBCouplingsRelatedByAtomId1, getDBCouplingsRelatedByAtomId1JoinDBAtomRelatedByAtomId2, getDBCouplingsRelatedByAtomId1JoinDBSpectrum, getDBCouplingsRelatedByAtomId2, getDBCouplingsRelatedByAtomId2, getDBCouplingsRelatedByAtomId2, getDBCouplingsRelatedByAtomId2, getDBCouplingsRelatedByAtomId2JoinDBAtomRelatedByAtomId1, getDBCouplingsRelatedByAtomId2JoinDBSpectrum, getDBIdentifiers, getDBIdentifiers, getDBIdentifiers, getDBIdentifiers, getDBIdentifiersJoinDBAtom, getDBIdentifiersJoinDBLiterature, getDBMolecule, getDBSignalDBAtoms, getDBSignalDBAtoms, getDBSignalDBAtoms, getDBSignalDBAtoms, getDBSignalDBAtomsJoinDBAtom, getDBSignalDBAtomsJoinDBSignal, getFieldNames, getFormalCharge, getHetero, getHoseCode, getHoseCodeWithRings, getIsAromatic, getIsVisible, getMoleculeId, getPeer, getPrimaryKey, getSymbol, initDBBondDBAtoms, initDBCoordinateSet2ds, initDBCoordinateSet3ds, initDBCouplingsRelatedByAtomId1, initDBCouplingsRelatedByAtomId2, initDBIdentifiers, initDBSignalDBAtoms, save, save, setAtomicMass, setAtomId, setDBMolecule, setDBMoleculeKey, setFormalCharge, setHetero, setHoseCode, setHoseCodeWithRings, setIsAromatic, setIsVisible, setMoleculeId, setPrimaryKey, setPrimaryKey, setSymbol, toString
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, equals, getLog, hashCode, isModified, isNew, log, resetModified, setModified, setNew, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.torque.om.Persistent
getPrimaryKey, isModified, isNew, save, save, setModified, setNew, setPrimaryKey, setPrimaryKey
 

Field Detail

coords3

DBCoordinateSet3d coords3

coords2

DBCoordinateSet2d coords2

force3d

public boolean force3d

couplings

private java.util.Vector couplings
Constructor Detail

DBAtom

public DBAtom()
Constructor for the DBAtom object


DBAtom

public DBAtom(org.openscience.cdk.interfaces.IAtom atom,
              org.openscience.cdk.interfaces.IAtomContainer ac,
              int dbmol,
              java.lang.String hoseCode,
              java.lang.String hoseCodeWithRings,
              boolean visible)
       throws java.lang.Exception
Constructor for the DBAtom object.

Parameters:
atom - The cdk atom this atom is supposed to represent.
dbmol - The molecule it comes from
hoseCode - The hose code.
visible - Should this atom be visible.
Throws:
java.lang.Exception - Description of Exception.
Method Detail

getAtoms

public static java.util.List getAtoms(int molid)
                               throws org.apache.torque.TorqueException
Gets the atoms of a certain molecules.

Parameters:
molid - The molecule.
Returns:
The atoms.
Throws:
java.lang.Exception - Database problems.
org.apache.torque.TorqueException

getAtomsWithoutHs

public static java.util.List getAtomsWithoutHs(int molid)
                                        throws org.apache.torque.TorqueException
Gets the atoms of a certain molecules withouth the Hs.

Parameters:
molid - The molecule.
Returns:
The atoms.
Throws:
java.lang.Exception - Database problems.
org.apache.torque.TorqueException

getBonds

public java.util.Vector getBonds()
                          throws java.lang.Exception
Gets the bonds of the DBAtom object

Returns:
The bonds
Throws:
java.lang.Exception - Database problems

getConnectedAtoms

public java.util.Vector getConnectedAtoms(org.openscience.cdk.interfaces.IMolecule mol,
                                          DBAtom[] dbatoms)
                                   throws java.lang.Exception
Gets the atoms connected with this atom

Returns:
The connected atoms
Throws:
java.lang.Exception - Database Problems

getConnectedAtoms

public java.util.Vector getConnectedAtoms()
                                   throws java.lang.Exception
Gets the atoms connected with this atom

Returns:
The connected atoms
Throws:
java.lang.Exception - Database Problems

getHydrogenCount

public int getHydrogenCount()
                     throws java.lang.Exception
Gets the nubmer of hydrogens connected to the DBAtom

Returns:
The hydrogenCount value
Throws:
java.lang.Exception - Database problems

getHydrogenCount

public int getHydrogenCount(DBAtom[] atoms,
                            org.openscience.cdk.interfaces.IMolecule cdkmol)
                     throws java.lang.Exception
Throws:
java.lang.Exception

getAnySignal

public DBSignal getAnySignal(int spectrumId)
                      throws java.lang.Exception
Gets the DBSignal associated with this atom in a certain spectrum.

Parameters:
spectrumId - The spectrum of which the signal should be.
Returns:
The DBSignal value.
Throws:
java.lang.Exception - Database problems.

getMdlNumberPlus1Heavy

public int getMdlNumberPlus1Heavy()
                           throws java.lang.Exception
Gets the mdlNumber value + 1, if atom is a heavy atom of the atom itself, if a hydrogen, of the heavy atom it is attached to.

Returns:
The mdlNumberPlus1 value
Throws:
java.lang.Exception - Description of Exception

getIdentifier

public java.lang.String getIdentifier(int spectrum)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getMdlNumberPlus1

public int getMdlNumberPlus1()
                      throws java.lang.Exception
Gets the mdlNumber value + 1

Returns:
The mdlNumberPlus1 value
Throws:
java.lang.Exception - Description of Exception

getMdlNumber

public int getMdlNumber()
                 throws java.lang.Exception
Gets the mdl number of the Atom. The mdl number is the number of the atom in the molecule, in the order as they were in the mdl of the original submit. Starts with 0.

Returns:
The mdlNumber value.
Throws:
java.lang.Exception - Database problems.

getAsCdkAtom

public org.openscience.cdk.interfaces.IAtom getAsCdkAtom()
                                                  throws java.lang.Exception
Gets the asCdkAtom attribute of the DBAtom object

Returns:
The asCdkAtom value
Throws:
java.lang.Exception - Description of Exception

getAsCdkAtom

public org.openscience.cdk.interfaces.IAtom getAsCdkAtom(SubmittingData subData)
                                                  throws java.lang.Exception
Gets the cdk atom corresponding with this atom int molWithH of a submittingData.

Parameters:
subData - The submittingData.
Returns:
The Cdk Atom.
Throws:
java.lang.Exception - Description of Exception

getIdentifier

public java.lang.String getIdentifier(DBSpectrum spectrum)
                               throws java.lang.Exception
Gets the identifier attribute of the DBAtom object in a certain spectrum.

Parameters:
spectrum - The spectrum the identifier should be in.
Returns:
The identifier value.
Throws:
java.lang.Exception - Database problems.

getMultiplicity

public java.lang.String getMultiplicity(DBSpectrum spectrum)
                                 throws java.lang.Exception
Gets a string giving the multiplicity and coupling constants of the signal of this atom in a certain spectrum.

Parameters:
spectrum - Spectrum in which the signal should be.
Returns:
The multiplicity value.
Throws:
java.lang.Exception - Database problems.

hasCouplings

public boolean hasCouplings(DBSpectrum spectrum)
                     throws java.lang.Exception
Gets the couplings of this atom in a certain spectrum.as a string

Parameters:
spectrum - The spectrum.
Returns:
The couplings.
Throws:
java.lang.Exception - Database problems.

getCouplingsString

public java.lang.String getCouplingsString(DBSpectrum spectrum)
                                    throws java.lang.Exception
Gets the couplings of this atom in a certain spectrum.as a string

Parameters:
spectrum - The spectrum.
Returns:
The couplings.
Throws:
java.lang.Exception - Database problems.

getCouplings

public java.util.Vector getCouplings(DBSpectrum spectrum)
                              throws java.lang.Exception
Gets the couplings of this atom in a certain spectrum.

Parameters:
spectrum - The spectrum.
Returns:
The couplings.
Throws:
java.lang.Exception - Database problems.

getCoordinates

public double[] getCoordinates(int coordinateSetId)
                        throws java.lang.Exception
Gets the coordinates of this atom in a coordinate set with a certain coordinate set id.

Parameters:
coordinateSetId - The coordinate set id
Returns:
The coordinates value [0]=x,[1]=y,[2]=z only with 3d coordinates.
Throws:
java.lang.Exception - Description of Exception

isCoordinate3d

public boolean isCoordinate3d(int coordinateSetId)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getDBSignals

public java.util.List getDBSignals()
                            throws java.lang.Exception
Gets the dBSignals attribute of the DBAtom object

Returns:
The dBSignals value
Throws:
java.lang.Exception - Description of Exception

getDBSignals

public java.util.List getDBSignals(char type)
                            throws org.apache.torque.TorqueException
Gets the dBSignals attribute of the DBAtom object.

Parameters:
type - m=only measured signals,c=only calculated signals included
Returns:
The dBSignals value
Throws:
java.lang.Exception - Description of Exception
org.apache.torque.TorqueException

getDBSignals

public java.util.List getDBSignals(DBSpectrum spectrum)
                            throws org.apache.torque.TorqueException
Gets the dBSignals attribute of the DBAtom object

Parameters:
spectrum - The spectrum the signal should come from
Returns:
The dBSignals value
Throws:
java.lang.Exception - Description of Exception
org.apache.torque.TorqueException

save

public void save(java.sql.Connection dbCon)
          throws org.apache.torque.TorqueException
Saves this object incl. coordinates.

Specified by:
save in interface org.apache.torque.om.Persistent
Overrides:
save in class BaseDBAtom
Parameters:
dbCon - A database connection.
Throws:
java.lang.Exception - Description of Exception
org.apache.torque.TorqueException

delete

public void delete(java.sql.Connection conn)
            throws java.lang.Exception
Deletes this atom.

Parameters:
conn - The description to use.
Throws:
java.lang.Exception - Database problems.

getDBSignalsBySpectrumType

public java.util.List getDBSignalsBySpectrumType(java.lang.String typname)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

getIntegralStuff

public int getIntegralStuff(DBAtom[] atoms,
                            org.openscience.cdk.interfaces.IMolecule cdkmol)
                     throws java.lang.Exception
Throws:
java.lang.Exception

getIntegralStuff

public int getIntegralStuff()
                     throws java.lang.Exception
Throws:
java.lang.Exception