public static LCMSDataSource < ? > create ( Path path ) { path = path . toAbsolutePath ( ) ; String lowerCaseName = path . getFileName ( ) . toString ( ) . toLowerCase ( ) ; if ( lowerCaseName . endsWith ( ".mzxml" ) ) { return new MZXMLFile ( path . toString ( ) ) ; } else if ( lowerCaseName . endsWith ( ".mzml" ) ) { return new MZMLFile ( path . toString ( ) ) ; } return null ; }
Try and create a data source from a given file path .