Package chemaxon.checkers
Class InvalidChecker
java.lang.Object
chemaxon.checkers.InvalidChecker
- All Implemented Interfaces:
StructureChecker
An extremal checker implementation
indicating error in the configuration imported from XML or action string
- Since:
- 5.11
-
Field Summary
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
-
Constructor Summary
ConstructorDescriptionInvalidChecker
(String errorMessage) Initializes an invalid structure checker instance -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a PropertyChangeListener to the listener list.void
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.Detects a specific error in the molecule.Returns a clone of this StructureChecker instanceReturns aStructureCheckerDescriptor
instance which represents the user interface related informations of the checkerDeprecated, for removal: This API element is subject to removal in a future version.Returns theString
represented error code of the checker (this error code should be used for external implementation support instead ofStructureChecker.getErrorType()
)Gets the error message of the checker instanceGets the help text of the checkergetIcon()
Gets theIcon
of the current checkerGets the local menu name of the checkergetName()
Gets the name of the checkerboolean
Returns true if the checker is available, and can be usedboolean
isValid()
Returns true if the checker's configuration is valid, false otherwisevoid
Remove a PropertyChangeListener from the listener list.void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.void
setDescription
(String description) Deprecated, for removal: This API element is subject to removal in a future version.void
setHelpText
(String helpText) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.void
setLocalMenuName
(String localMenuName) Deprecated, for removal: This API element is subject to removal in a future version.void
setMoreErrorMessage
(String moreError) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.void
setNoErrorMessage
(String noError) Deprecated, for removal: This API element is subject to removal in a future version.void
setOneErrorMessage
(String oneError) Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
InvalidChecker
Initializes an invalid structure checker instance- Parameters:
errorMessage
- the error message of the instance.
-
-
Method Details
-
check
Description copied from interface:StructureChecker
Detects a specific error in the molecule.- Specified by:
check
in interfaceStructureChecker
- Parameters:
molecule
- aMolecule
instance have to be checked- Returns:
- an instance of
StructureCheckerResult
(which contains all data needed to fix the problem) if the molecule contains the examined error,null
otherwise - Throws:
NullPointerException
- if molecule is null
-
getName
Description copied from interface:StructureChecker
Gets the name of the checker- Specified by:
getName
in interfaceStructureChecker
- Returns:
- a human readable name
-
setName
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:StructureChecker
Sets the name of the checker- Specified by:
setName
in interfaceStructureChecker
- Parameters:
name
- the human-readable name of the checker
-
getLocalMenuName
Description copied from interface:StructureChecker
Gets the local menu name of the checker- Specified by:
getLocalMenuName
in interfaceStructureChecker
- Returns:
- the name for the local menu
-
setLocalMenuName
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setLocalMenuName(String localMenuName) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:StructureChecker
Set the local menu name of the checker- Specified by:
setLocalMenuName
in interfaceStructureChecker
- Parameters:
localMenuName
- aString
to be shown in the local menu
-
getHelpText
Description copied from interface:StructureChecker
Gets the help text of the checker- Specified by:
getHelpText
in interfaceStructureChecker
- Returns:
- the help text of the checker
-
setHelpText
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setHelpText(String helpText) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:StructureChecker
Sets the detailed help of the checker which will shown in the tooltip on the GUI- Specified by:
setHelpText
in interfaceStructureChecker
- Parameters:
helpText
- aString
to be shown in the tooltip
-
setNoErrorMessage
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setNoErrorMessage(String noError) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:StructureChecker
Sets the message which will given in the result if no error found- Specified by:
setNoErrorMessage
in interfaceStructureChecker
- Parameters:
noError
- the error message if no error found
-
setOneErrorMessage
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setOneErrorMessage(String oneError) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:StructureChecker
Sets the message which will given in the result if one error found- Specified by:
setOneErrorMessage
in interfaceStructureChecker
- Parameters:
oneError
- the error message if one error found
-
setMoreErrorMessage
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setMoreErrorMessage(String moreError) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:StructureChecker
Sets the message which will given in the result if two or more error found- Specified by:
setMoreErrorMessage
in interfaceStructureChecker
- Parameters:
moreError
- the error message if two or more error found
-
getIcon
Description copied from interface:StructureChecker
Gets theIcon
of the current checker- Specified by:
getIcon
in interfaceStructureChecker
- Returns:
- the
Icon
of the current checker
-
setIcon
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:StructureChecker
Sets the icon of the checker- Specified by:
setIcon
in interfaceStructureChecker
- Parameters:
icon
- is an instance ofIcon
-
getErrorType
- Specified by:
getErrorType
in interfaceStructureChecker
- Returns:
- the error type of this checker
-
getErrorCode
Description copied from interface:StructureChecker
Returns theString
represented error code of the checker (this error code should be used for external implementation support instead ofStructureChecker.getErrorType()
)- Specified by:
getErrorCode
in interfaceStructureChecker
- Returns:
- the
String
represented error code of the checker (this error code should be used for external implementation support instead ofStructureChecker.getErrorType()
)
-
getEditorClassName
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getEditorClassName
in interfaceStructureChecker
- Returns:
- the name of the editor class of the checker
-
setDescription
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setDescription(String description) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:StructureChecker
Sets the description of the checker- Specified by:
setDescription
in interfaceStructureChecker
- Parameters:
description
- the description of the checker
-
getDescription
- Specified by:
getDescription
in interfaceStructureChecker
- Returns:
- the description of the checker
-
cloneItem
Description copied from interface:StructureChecker
Returns a clone of this StructureChecker instance- Specified by:
cloneItem
in interfaceStructureChecker
- Returns:
- a clone of this StructureChecker instance
-
isValid
public boolean isValid()Description copied from interface:StructureChecker
Returns true if the checker's configuration is valid, false otherwise- Specified by:
isValid
in interfaceStructureChecker
- Returns:
- true if the checker's configuration is valid, false otherwise
-
isAvailable
public boolean isAvailable()Description copied from interface:StructureChecker
Returns true if the checker is available, and can be used- Specified by:
isAvailable
in interfaceStructureChecker
- Returns:
- true if the checker is available, and can be used
-
getDescriptor
Description copied from interface:StructureChecker
Returns aStructureCheckerDescriptor
instance which represents the user interface related informations of the checker- Specified by:
getDescriptor
in interfaceStructureChecker
- Returns:
- a
StructureCheckerDescriptor
instance which represents the user interface related informations of the checker
-
removePropertyChangeListener
Description copied from interface:StructureChecker
Remove a PropertyChangeListener for a specific property. Iflistener
was added more than once to the same event source for the specified property, it will be notified one less time after being removed. IfpropertyName
is null, no exception is thrown and no action is taken. Iflistener
is null, or was never added for the specified property, no exception is thrown and no action is taken.- Specified by:
removePropertyChangeListener
in interfaceStructureChecker
- Parameters:
propertyName
- The name of the property that was listened on.listener
- The PropertyChangeListener to be removed- See Also:
-
addPropertyChangeListener
Description copied from interface:StructureChecker
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property. IfpropertyName
orlistener
is null, no exception is thrown and no action is taken.- Specified by:
addPropertyChangeListener
in interfaceStructureChecker
- Parameters:
propertyName
- The name of the property to listen on.listener
- The PropertyChangeListener to be added- See Also:
-
removePropertyChangeListener
Description copied from interface:StructureChecker
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. Iflistener
was added more than once to the same event source, it will be notified one less time after being removed. Iflistener
is null, or was never added, no exception is thrown and no action is taken.- Specified by:
removePropertyChangeListener
in interfaceStructureChecker
- Parameters:
listener
- The PropertyChangeListener to be removed- See Also:
-
addPropertyChangeListener
Description copied from interface:StructureChecker
Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. Iflistener
is null, no exception is thrown and no action is taken.- Specified by:
addPropertyChangeListener
in interfaceStructureChecker
- Parameters:
listener
- The PropertyChangeListener to be added- See Also:
-
getErrorMessage
Gets the error message of the checker instance- Returns:
- the error message of the checker instance
-