Class MDLV2000Converter
java.lang.Object
de.ipb_halle.molecularfaces.converter.MDLV2000Converter
- All Implemented Interfaces:
jakarta.faces.convert.Converter
This
FacesConverter converts MDL Molfile V2000 strings to CDK's
IAtomContainer objects and vice versa.-
Field Summary
Fields inherited from interface jakarta.faces.convert.Converter
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openscience.cdk.interfaces.IAtomContainergetAsObject(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, String value) Converts a MDL Molfile V2000 string to anIAtomContainer.getAsString(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, Object value) Converts anIAtomContainerto a MDL Molfile V2000 string.
-
Constructor Details
-
MDLV2000Converter
public MDLV2000Converter()
-
-
Method Details
-
getAsObject
public org.openscience.cdk.interfaces.IAtomContainer getAsObject(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, String value) throws jakarta.faces.convert.ConverterException Converts a MDL Molfile V2000 string to anIAtomContainer.- Specified by:
getAsObjectin interfacejakarta.faces.convert.Converter- Returns:
- valid
IAtomContainerobject ornullifvalueisnullor empty. - Throws:
jakarta.faces.convert.ConverterException- if reading of the Molfile fails
-
getAsString
public String getAsString(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, Object value) throws jakarta.faces.convert.ConverterException Converts anIAtomContainerto a MDL Molfile V2000 string.- Specified by:
getAsStringin interfacejakarta.faces.convert.Converter- Returns:
- valid MDL Molfile V2000 or empty string if
valueisnullor not anIAtomContainer - Throws:
jakarta.faces.convert.ConverterException- if writing of the Molfile fails
-