Package chemaxon.checkers.result
Class DefaultStructureCheckerResult
java.lang.Object
chemaxon.checkers.result.DefaultStructureCheckerResult
- All Implemented Interfaces:
StructureCheckerResult
- Direct Known Subclasses:
AromaticityCheckerResult
,AtomQueryPropertyCheckerResult
,BondAngleCheckerResult
,BondLengthCheckerResult
,DefaultExternalStructureCheckerResult
,ExplicitHydrogenResult
,MetalloceneCheckerResult
,ReactionCheckerResult
,RgroupCheckerResult
,SgroupCheckerResult
,SubstructureCheckerResult
@PublicApi
public class DefaultStructureCheckerResult
extends Object
implements StructureCheckerResult
This class is the default implementation of
StructureCheckerResult
- Since:
- Marvin 5.3
-
Constructor Summary
ConstructorDescriptionDefaultStructureCheckerResult
(StructureChecker source, List<MolAtom> atoms, List<MolBond> bonds, StructureCheckerErrorType errorType, Molecule molecule, String description, String name, String localMenuName, String helpText, Icon icon) Deprecated.DefaultStructureCheckerResult
(StructureChecker source, List<MolAtom> atoms, List<MolBond> bonds, StructureCheckerErrorType errorType, Molecule molecule, String description, String name, String localMenuName, String helpText, Icon icon, int errorCount) Constructor which initialize all the properties.DefaultStructureCheckerResult
(StructureChecker source, List<MolAtom> atoms, List<MolBond> bonds, Molecule molecule) Constructor which initialize all the properties. -
Method Summary
Modifier and TypeMethodDescriptionvoid
This method converts the entities contained in this result according to the convertData.boolean
getAtoms()
getBonds()
int
Return the error count.protected static String
getErrorDescription
(StructureCheckerDescriptor descriptor, int errorCount) getIcon()
getName()
int
hashCode()
void
This method sets the atoms propertyvoid
This method sets the bonds propertyvoid
setMolecule
(Molecule molecule) This method sets the moleculetoString()
-
Constructor Details
-
DefaultStructureCheckerResult
public DefaultStructureCheckerResult(StructureChecker source, List<MolAtom> atoms, List<MolBond> bonds, StructureCheckerErrorType errorType, Molecule molecule, String description, String name, String localMenuName, String helpText, Icon icon, int errorCount) Constructor which initialize all the properties.- Parameters:
source
- is theStructureChecker
instance which identified the problematoms
- aList
ofMolAtom
which contains the affected atoms of the problembonds
- aList
ofMolBond
which contains the affected bonds of the problemerrorType
- is an instance ofStructureCheckerErrorType
which identifies the problemmolecule
- is aMolecule
instance which contains the described problemdescription
- is short information about the problemname
- is the name of the checker which found the described problemlocalMenuName
- is aString
which should be shown in the local menu of Marvin SketchhelpText
- is help message for the problemicon
- is an instance ofIcon
which will be shown in Marvin Sketch checker dialogserrorCount
- count of identified errors
-
DefaultStructureCheckerResult
@Deprecated public DefaultStructureCheckerResult(StructureChecker source, List<MolAtom> atoms, List<MolBond> bonds, StructureCheckerErrorType errorType, Molecule molecule, String description, String name, String localMenuName, String helpText, Icon icon) Deprecated.Constructor which initialize all the properties.- Parameters:
source
- is theStructureChecker
instance which identified the problematoms
- aList
ofMolAtom
which contains the affected atoms of the problembonds
- aList
ofMolBond
which contains the affected bonds of the problemerrorType
- is an instance ofStructureCheckerErrorType
which identifies the problemmolecule
- is aMolecule
instance which contains the described problemdescription
- is short information about the problemname
- is the name of the checker which found the described problemlocalMenuName
- is aString
which should be shown in the local menu of Marvin SketchhelpText
- is help message for the problemicon
- is an instance ofIcon
which will be shown in Marvin Sketch checker dialogs
-
DefaultStructureCheckerResult
public DefaultStructureCheckerResult(StructureChecker source, List<MolAtom> atoms, List<MolBond> bonds, Molecule molecule) Constructor which initialize all the properties.- Parameters:
source
- is theStructureChecker
instance which identified the problematoms
- aList
ofMolAtom
which contains the affected atoms of the problembonds
- aList
ofMolBond
which contains the affected bonds of the problemmolecule
- is aMolecule
instance which contains the described problem
-
-
Method Details
-
getSource
- Specified by:
getSource
in interfaceStructureCheckerResult
- Returns:
- the StructureChecker instance which created this result
-
getHelpText
- Specified by:
getHelpText
in interfaceStructureCheckerResult
- Returns:
- the help text of the problem
-
getLocalMenuName
- Specified by:
getLocalMenuName
in interfaceStructureCheckerResult
- Returns:
- the name should show in the local menu of Marvin Sketch
-
getAtoms
- Specified by:
getAtoms
in interfaceStructureCheckerResult
- Returns:
- a
List
ofMolAtom
which contains the affected atoms of the problem
-
getBonds
- Specified by:
getBonds
in interfaceStructureCheckerResult
- Returns:
- a
List
ofMolBond
which contains the affected bonds of the problem
-
getDescription
- Specified by:
getDescription
in interfaceStructureCheckerResult
- Returns:
- the description of the error
-
getMolecule
- Specified by:
getMolecule
in interfaceStructureCheckerResult
- Returns:
- the molecule which has the current error
-
getErrorType
- Specified by:
getErrorType
in interfaceStructureCheckerResult
- Returns:
- an instance of
StructureCheckerErrorType
which is the errorCode of the problem
-
getName
- Specified by:
getName
in interfaceStructureCheckerResult
- Returns:
- the name of the
StructureChecker
found the problem
-
getIcon
- Specified by:
getIcon
in interfaceStructureCheckerResult
- Returns:
- the icon of the problem
-
getErrorCount
public int getErrorCount()Return the error count.- Returns:
- the error count
-
hashCode
public int hashCode() -
equals
-
toString
-
setAtoms
Description copied from interface:StructureCheckerResult
This method sets the atoms property- Specified by:
setAtoms
in interfaceStructureCheckerResult
- Parameters:
atoms
- is aList
ofMolAtom
-
setBonds
Description copied from interface:StructureCheckerResult
This method sets the bonds property- Specified by:
setBonds
in interfaceStructureCheckerResult
- Parameters:
bonds
- is aList
ofMolBond
-
setMolecule
Description copied from interface:StructureCheckerResult
This method sets the molecule- Specified by:
setMolecule
in interfaceStructureCheckerResult
- Parameters:
molecule
- is aMolecule
instance
-
convert
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 interfaceStructureCheckerResult
- Parameters:
molecule
- the original molecule objectconvertData
- is a map withString
keys and Map values which contains the convert related information
-
getErrorDescription
-
DefaultStructureCheckerResult(StructureChecker, List, List, StructureCheckerErrorType, Molecule, String, String, String, String, Icon, int)
instead