All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.applitools.eyes.universal.mapper.OCRSearchSettingsMapper Maven / Gradle / Ivy

There is a newer version: 5.76.0
Show newest version
package com.applitools.eyes.universal.mapper;

import com.applitools.eyes.locators.TextRegionSettings;
import com.applitools.eyes.universal.dto.OCRSearchSettingsDto;

/**
 * OCR search settings mapper
 */
public class OCRSearchSettingsMapper {

  public static OCRSearchSettingsDto toOCRSearchSettingsDto(TextRegionSettings textRegionSettings) {
    if (textRegionSettings == null) {
      return null;
    }

    OCRSearchSettingsDto ocrSearchSettingsDto = new OCRSearchSettingsDto();
    ocrSearchSettingsDto.setPatterns(textRegionSettings.getPatterns());
    ocrSearchSettingsDto.setIgnoreCase(textRegionSettings.getIgnoreCase());
    ocrSearchSettingsDto.setFirstOnly(textRegionSettings.getFirstOnly());
    ocrSearchSettingsDto.setLanguage(textRegionSettings.getLanguage());

    return ocrSearchSettingsDto;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy