com.applitools.eyes.universal.mapper.OCRSearchSettingsMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eyes-sdk-core-java5 Show documentation
Show all versions of eyes-sdk-core-java5 Show documentation
Applitools Eyes SDK base for Java
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;
}
}