public static byte [ ] convertToBarLine ( String barLine ) { byte [ ] barlineTypes = new byte [ ] { SIMPLE } ; if ( barLine . equals ( "::" ) || barLine . equals ( ":|:" ) || barLine . equals ( ":||:" ) ) { //barlineTypes = new byte[2]; //barlineTypes[0] = BarLine.REPEAT_CLOSE; //barlineTypes[1] = BarLine.REPEAT_OPEN; barlineTypes = new byte [ ] { CLOSE_AND_OPEN_REPEAT } ; } else if ( barLine . equals ( "|" ) ) { barlineTypes = new byte [ ] { SIMPLE } ; } else if ( barLine . equals ( "||" ) ) { barlineTypes = new byte [ ] { DOUBLE } ; } else if ( barLine . equals ( "[|" ) || barLine . equals ( "[||" ) ) { barlineTypes = new byte [ ] { BEGIN } ; } else if ( barLine . equals ( "|]" ) || barLine . equals ( "||]" ) ) { barlineTypes = new byte [ ] { END } ; } else if ( barLine . equals ( ":|" ) || barLine . equals ( ":||" ) || barLine . equals ( ":|]" ) || barLine . startsWith ( ":::" ) ) { barlineTypes = new byte [ ] { REPEAT_CLOSE } ; } else if ( barLine . equals ( "|:" ) || barLine . equals ( "||:" ) || barLine . equals ( "[|:" ) || barLine . endsWith ( ":::" ) ) { barlineTypes = new byte [ ] { REPEAT_OPEN } ; } else if ( barLine . equals ( "|::" ) || barLine . equals ( "[::" ) ) { barlineTypes = new byte [ ] { DOUBLE_REPEAT_OPEN } ; } else if ( barLine . equals ( "::|" ) || barLine . equals ( "::]" ) ) { barlineTypes = new byte [ ] { DOUBLE_REPEAT_CLOSE } ; } else if ( barLine . equals ( ".|" ) || barLine . equals ( ".|." ) || barLine . equals ( ":" ) ) { barlineTypes = new byte [ ] { DOTTED } ; } else if ( barLine . equals ( "[|]" ) || barLine . equals ( "[]" ) ) { barlineTypes = new byte [ ] { INVISIBLE } ; } else if ( barLine . equals ( "|]|" ) || barLine . equals ( "|||" ) || barLine . equals ( "|[|" ) ) { barlineTypes = new byte [ ] { TRIPLE } ; } return barlineTypes ; }
Converts the specified string to a bar line type .