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 ofStructureCheckerResult
- Since:
- Marvin 5.3
-
-
Constructor Summary
Constructors Constructor Description DefaultStructureCheckerResult(StructureChecker source, List<MolAtom> atoms, List<MolBond> bonds, StructureCheckerErrorType errorType, Molecule molecule, String description, String name, String localMenuName, String helpText, Icon icon)
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
convert(Molecule molecule, Map<String,Map<? extends Object,? extends Object>> convertData)
This method converts the entities contained in this result according to the convertData.boolean
equals(Object obj)
List<MolAtom>
getAtoms()
List<MolBond>
getBonds()
String
getDescription()
int
getErrorCount()
Return the error count.protected static String
getErrorDescription(StructureCheckerDescriptor descriptor, int errorCount)
StructureCheckerErrorType
getErrorType()
String
getHelpText()
Icon
getIcon()
String
getLocalMenuName()
Molecule
getMolecule()
String
getName()
StructureChecker
getSource()
int
hashCode()
void
setAtoms(List<MolAtom> atoms)
This method sets the atoms propertyvoid
setBonds(List<MolBond> bonds)
This method sets the bonds propertyvoid
setMolecule(Molecule molecule)
This method sets the moleculeString
toString()
-
-
-
Constructor Detail
-
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 Detail
-
getSource
public StructureChecker getSource()
- Specified by:
getSource
in interfaceStructureCheckerResult
- Returns:
- the StructureChecker instance which created this result
-
getHelpText
public String getHelpText()
- Specified by:
getHelpText
in interfaceStructureCheckerResult
- Returns:
- the help text of the problem
-
getLocalMenuName
public String getLocalMenuName()
- Specified by:
getLocalMenuName
in interfaceStructureCheckerResult
- Returns:
- the name should show in the local menu of Marvin Sketch
-
getAtoms
public List<MolAtom> getAtoms()
- Specified by:
getAtoms
in interfaceStructureCheckerResult
- Returns:
- a
List
ofMolAtom
which contains the affected atoms of the problem
-
getBonds
public List<MolBond> getBonds()
- Specified by:
getBonds
in interfaceStructureCheckerResult
- Returns:
- a
List
ofMolBond
which contains the affected bonds of the problem
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceStructureCheckerResult
- Returns:
- the description of the error
-
getMolecule
public Molecule getMolecule()
- Specified by:
getMolecule
in interfaceStructureCheckerResult
- Returns:
- the molecule which has the current error
-
getErrorType
public StructureCheckerErrorType getErrorType()
- Specified by:
getErrorType
in interfaceStructureCheckerResult
- Returns:
- an instance of
StructureCheckerErrorType
which is the errorCode of the problem
-
getName
public String getName()
- Specified by:
getName
in interfaceStructureCheckerResult
- Returns:
- the name of the
StructureChecker
found the problem
-
getIcon
public Icon getIcon()
- Specified by:
getIcon
in interfaceStructureCheckerResult
- Returns:
- the icon of the problem
-
getErrorCount
public int getErrorCount()
Return the error count.- Returns:
- the error count
-
setAtoms
public void setAtoms(List<MolAtom> atoms)
Description copied from interface:StructureCheckerResult
This method sets the atoms property- Specified by:
setAtoms
in interfaceStructureCheckerResult
- Parameters:
atoms
- is aList
ofMolAtom
-
setBonds
public void setBonds(List<MolBond> bonds)
Description copied from interface:StructureCheckerResult
This method sets the bonds property- Specified by:
setBonds
in interfaceStructureCheckerResult
- Parameters:
bonds
- is aList
ofMolBond
-
setMolecule
public void setMolecule(Molecule molecule)
Description copied from interface:StructureCheckerResult
This method sets the molecule- Specified by:
setMolecule
in interfaceStructureCheckerResult
- Parameters:
molecule
- is aMolecule
instance
-
convert
public void convert(Molecule molecule, Map<String,Map<? extends Object,? extends 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 interfaceStructureCheckerResult
- Parameters:
molecule
- the original molecule objectconvertData
- is a map withString
keys and Map values which contains the convert related information
-
getErrorDescription
protected static String getErrorDescription(StructureCheckerDescriptor descriptor, int errorCount)
-
-