public static String getCanonical ( HELM2Notation helm2notation ) throws HELM1FormatException , ChemistryException { Map < String , String > convertsortedIdstoIds ; try { Object [ ] temp = setCanonicalHELMFirstSection ( helm2notation ) ; LOG . info ( "First Section of canonical HELM was generated" ) ; convertsortedIdstoIds = ( Map < String , String > ) temp [ 0 ] ; String firstSection = ( String ) temp [ 1 ] ; String secondSection = setCanonicalHELMSecondSection ( convertsortedIdstoIds , helm2notation . getListOfConnections ( ) ) ; LOG . info ( "Second Section of canonical HELM was generated" ) ; return firstSection + "$" + secondSection + "$" + "" + "$" + "" + "$V2.0" ; } catch ( ClassNotFoundException | IOException | HELM1ConverterException | ValidationException | org . helm . notation2 . parser . exceptionparser . NotationException e ) { e . printStackTrace ( ) ; LOG . error ( "Canonical HELM 1 can not be generated due to HELM2 features" ) ; throw new HELM1FormatException ( "Canonical HELM 1 can not be generated due to HELM2 features " + e . getMessage ( ) + e . getCause ( ) ) ; } }
method to generate from a helm2notation a valid canonical HELM1