chemaxon.checkers.result
Class DefaultStructureCheckerResult

java.lang.Object
  extended by chemaxon.checkers.result.DefaultStructureCheckerResult
All Implemented Interfaces:
StructureCheckerResult
Direct Known Subclasses:
AromaticityCheckerResult, ExplicitHydrogenResult, SgroupCheckerResult

public class DefaultStructureCheckerResult
extends java.lang.Object
implements StructureCheckerResult

This class is the default implementation of StructureCheckerResult

Since:
Marvin 5.3
Version:
5.9
Author:
Attila Szabo

Constructor Summary
DefaultStructureCheckerResult(StructureChecker source, java.util.List<MolAtom> atoms, java.util.List<MolBond> bonds, Molecule molecule)
          Constructor which initialize all the properties.
DefaultStructureCheckerResult(StructureChecker source, java.util.List<MolAtom> atoms, java.util.List<MolBond> bonds, StructureCheckerErrorType errorType, Molecule molecule, java.lang.String description, java.lang.String name, java.lang.String localMenuName, java.lang.String helpText, javax.swing.Icon icon)
          Constructor which initialize all the properties.
 
Method Summary
 void convert(Molecule molecule, java.util.Map<java.lang.String,java.util.Map<? extends java.lang.Object,? extends java.lang.Object>> convertData)
          This method converts the entities contained in this result according to the convertData.
 boolean equals(java.lang.Object obj)
           
 java.util.List<MolAtom> getAtoms()
           
 java.util.List<MolBond> getBonds()
           
 java.lang.String getDescription()
           
 StructureCheckerErrorType getErrorType()
           
 java.lang.String getHelpText()
           
 javax.swing.Icon getIcon()
           
 java.lang.String getLocalMenuName()
           
 Molecule getMolecule()
           
 java.lang.String getName()
           
 StructureChecker getSource()
           
 int hashCode()
           
 void setAtoms(java.util.List<MolAtom> atoms)
          This method sets the atoms property
 void setBonds(java.util.List<MolBond> bonds)
          This method sets the bonds property
 void setMolecule(Molecule molecule)
          This method sets the molecule
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultStructureCheckerResult

public DefaultStructureCheckerResult(StructureChecker source,
                                     java.util.List<MolAtom> atoms,
                                     java.util.List<MolBond> bonds,
                                     StructureCheckerErrorType errorType,
                                     Molecule molecule,
                                     java.lang.String description,
                                     java.lang.String name,
                                     java.lang.String localMenuName,
                                     java.lang.String helpText,
                                     javax.swing.Icon icon)
Constructor which initialize all the properties.

Parameters:
source - is the StructureChecker instance which identified the problem
atoms - a List of MolAtom which contains the affected atoms of the problem
bonds - a List of MolBond which contains the affected bonds of the problem
errorType - is an instance of StructureCheckerErrorType which identifies the problem
molecule - is a Molecule instance which contains the described problem
description - is short information about the problem
name - is the name of the checker which found the described problem
localMenuName - is a String which should be shown in the local menu of Marvin Sketch
helpText - is help message for the problem
icon - is an instance of Icon which will be shown in Marvin Sketch checker dialogs

DefaultStructureCheckerResult

public DefaultStructureCheckerResult(StructureChecker source,
                                     java.util.List<MolAtom> atoms,
                                     java.util.List<MolBond> bonds,
                                     Molecule molecule)
Constructor which initialize all the properties.

Parameters:
source - is the StructureChecker instance which identified the problem
atoms - a List of MolAtom which contains the affected atoms of the problem
bonds - a List of MolBond which contains the affected bonds of the problem
molecule - is a Molecule instance which contains the described problem
Method Detail

getSource

public StructureChecker getSource()
Specified by:
getSource in interface StructureCheckerResult
Returns:
the StructureChecker instance which created this result

getHelpText

public java.lang.String getHelpText()
Specified by:
getHelpText in interface StructureCheckerResult
Returns:
the help text of the problem

getLocalMenuName

public java.lang.String getLocalMenuName()
Specified by:
getLocalMenuName in interface StructureCheckerResult
Returns:
the name should show in the local menu of Marvin Sketch

getAtoms

public java.util.List<MolAtom> getAtoms()
Specified by:
getAtoms in interface StructureCheckerResult
Returns:
a List of MolAtom which contains the affected atoms of the problem

getBonds

public java.util.List<MolBond> getBonds()
Specified by:
getBonds in interface StructureCheckerResult
Returns:
a List of MolBond which contains the affected bonds of the problem

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface StructureCheckerResult
Returns:
the description of the error

getMolecule

public Molecule getMolecule()
Specified by:
getMolecule in interface StructureCheckerResult
Returns:
the molecule which has the current error

getErrorType

public StructureCheckerErrorType getErrorType()
Specified by:
getErrorType in interface StructureCheckerResult
Returns:
an instance of StructureCheckerErrorType which is the errorCode of the problem

getName

public java.lang.String getName()
Specified by:
getName in interface StructureCheckerResult
Returns:
the name of the StructureChecker found the problem

getIcon

public javax.swing.Icon getIcon()
Specified by:
getIcon in interface StructureCheckerResult
Returns:
the icon of the problem

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setAtoms

public void setAtoms(java.util.List<MolAtom> atoms)
Description copied from interface: StructureCheckerResult
This method sets the atoms property

Specified by:
setAtoms in interface StructureCheckerResult
Parameters:
atoms - is a List of MolAtom

setBonds

public void setBonds(java.util.List<MolBond> bonds)
Description copied from interface: StructureCheckerResult
This method sets the bonds property

Specified by:
setBonds in interface StructureCheckerResult
Parameters:
bonds - is a List of MolBond

setMolecule

public void setMolecule(Molecule molecule)
Description copied from interface: StructureCheckerResult
This method sets the molecule

Specified by:
setMolecule in interface StructureCheckerResult
Parameters:
molecule - is a Molecule instance

convert

public void convert(Molecule molecule,
                    java.util.Map<java.lang.String,java.util.Map<? extends java.lang.Object,? extends java.lang.Object>> convertData)
Description copied from interface: StructureCheckerResult
This method converts the entities contained in this result according to the convertData. By default this method isn't needed to call from any place.

Specified by:
convert in interface StructureCheckerResult
Parameters:
molecule - the original molecule object
convertData - is a map with String keys and Map values which contains the convert related information