Class ConversionServiceImpl

java.lang.Object
org.dawnsci.conversion.ConversionServiceImpl
All Implemented Interfaces:
IConversionService

public class ConversionServiceImpl extends Object implements IConversionService
  • Constructor Details

    • ConversionServiceImpl

      public ConversionServiceImpl()
  • Method Details

    • open

      public IConversionContext open(String... paths)
      Description copied from interface: IConversionService
      Call to open a conversion context on a given path. The context returned should be configured and then the 'convert' method called to run a conversion.
      Specified by:
      open in interface IConversionService
      Parameters:
      paths - may be a folder path(s), or a regex(s). If a regex all matching files in the directory will be converted, for instance "C:/tmp/(.+).h5". The path separator must always be "/" even on windows. The regex is done after the last / the path preceeding the last / is the directory path and does not support regex. If the path ends with a / then all files in the directory will be processes. Sub-folders will not be traversed.
      Returns:
      context to use as conversion
    • process

      public void process(IConversionContext context) throws Exception
      Description copied from interface: IConversionService
      Call to run the conversion. Process all files matching the filePathRegEx
      Specified by:
      process in interface IConversionService
      Parameters:
      context -
      Throws:
      Exception - if problem processing the conversion.