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
ConstructorsConstructorDescriptionInvalidChecker(String errorMessage) Initializes an invalid structure checker instance -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a PropertyChangeListener to the listener list.voidaddPropertyChangeListener(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 aStructureCheckerDescriptorinstance which represents the user interface related informations of the checkerReturns theStringrepresented 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 theIconof the current checkerGets the local menu name of the checkergetName()Gets the name of the checkerbooleanReturns true if the checker is available, and can be usedbooleanisValid()Returns true if the checker's configuration is valid, false otherwisevoidRemove a PropertyChangeListener from the listener list.voidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.
-
Constructor Details
-
InvalidChecker
Initializes an invalid structure checker instance- Parameters:
errorMessage- the error message of the instance.
-
-
Method Details
-
check
Description copied from interface:StructureCheckerDetects a specific error in the molecule.- Specified by:
checkin interfaceStructureChecker- Parameters:
molecule- aMoleculeinstance 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,nullotherwise - Throws:
NullPointerException- if molecule is null
-
getName
Description copied from interface:StructureCheckerGets the name of the checker- Specified by:
getNamein interfaceStructureChecker- Returns:
- a human readable name
-
getLocalMenuName
Description copied from interface:StructureCheckerGets the local menu name of the checker- Specified by:
getLocalMenuNamein interfaceStructureChecker- Returns:
- the name for the local menu
-
getHelpText
Description copied from interface:StructureCheckerGets the help text of the checker- Specified by:
getHelpTextin interfaceStructureChecker- Returns:
- the help text of the checker
-
getIcon
Description copied from interface:StructureCheckerGets theIconof the current checker- Specified by:
getIconin interfaceStructureChecker- Returns:
- the
Iconof the current checker
-
getErrorType
- Specified by:
getErrorTypein interfaceStructureChecker- Returns:
- the error type of this checker
-
getErrorCode
Description copied from interface:StructureCheckerReturns theStringrepresented error code of the checker (this error code should be used for external implementation support instead ofStructureChecker.getErrorType())- Specified by:
getErrorCodein interfaceStructureChecker- Returns:
- the
Stringrepresented error code of the checker (this error code should be used for external implementation support instead ofStructureChecker.getErrorType())
-
getDescription
- Specified by:
getDescriptionin interfaceStructureChecker- Returns:
- the description of the checker
-
cloneItem
Description copied from interface:StructureCheckerReturns a clone of this StructureChecker instance- Specified by:
cloneItemin interfaceStructureChecker- Returns:
- a clone of this StructureChecker instance
-
isValid
public boolean isValid()Description copied from interface:StructureCheckerReturns true if the checker's configuration is valid, false otherwise- Specified by:
isValidin interfaceStructureChecker- Returns:
- true if the checker's configuration is valid, false otherwise
-
isAvailable
public boolean isAvailable()Description copied from interface:StructureCheckerReturns true if the checker is available, and can be used- Specified by:
isAvailablein interfaceStructureChecker- Returns:
- true if the checker is available, and can be used
-
getDescriptor
Description copied from interface:StructureCheckerReturns aStructureCheckerDescriptorinstance which represents the user interface related informations of the checker- Specified by:
getDescriptorin interfaceStructureChecker- Returns:
- a
StructureCheckerDescriptorinstance which represents the user interface related informations of the checker
-
removePropertyChangeListener
Description copied from interface:StructureCheckerRemove a PropertyChangeListener for a specific property. Iflistenerwas added more than once to the same event source for the specified property, it will be notified one less time after being removed. IfpropertyNameis null, no exception is thrown and no action is taken. Iflisteneris null, or was never added for the specified property, no exception is thrown and no action is taken.- Specified by:
removePropertyChangeListenerin 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:StructureCheckerAdd 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. IfpropertyNameorlisteneris null, no exception is thrown and no action is taken.- Specified by:
addPropertyChangeListenerin interfaceStructureChecker- Parameters:
propertyName- The name of the property to listen on.listener- The PropertyChangeListener to be added- See Also:
-
removePropertyChangeListener
Description copied from interface:StructureCheckerRemove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. Iflistenerwas added more than once to the same event source, it will be notified one less time after being removed. Iflisteneris null, or was never added, no exception is thrown and no action is taken.- Specified by:
removePropertyChangeListenerin interfaceStructureChecker- Parameters:
listener- The PropertyChangeListener to be removed- See Also:
-
addPropertyChangeListener
Description copied from interface:StructureCheckerAdd 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. Iflisteneris null, no exception is thrown and no action is taken.- Specified by:
addPropertyChangeListenerin 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
-