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

com.adobe.epubcheck.util.TextSearchDictionaryEntry Maven / Gradle / Ivy

Go to download

EPUBCheck is a tool to validate the conformance of EPUB publications against the EPUB specifications. EPUBCheck can be run as a standalone command-line tool or used as a Java library.

There is a newer version: 5.1.0
Show newest version
package com.adobe.epubcheck.util;

import com.adobe.epubcheck.messages.MessageId;

import java.util.regex.Pattern;

public class TextSearchDictionaryEntry
{

  private String searchedValue;
  private String regexExp;
  private MessageId errorCode;
  private Pattern pattern;

  public TextSearchDictionaryEntry(String searchedValue, String regex, MessageId errorCode)
  {
    this.searchedValue = searchedValue;
    this.regexExp = regex;
    this.errorCode = errorCode;
    this.pattern = null;
  }

  public String getSearchedValue()
  {
    return searchedValue;
  }

  public String getRegexExp()
  {
    return regexExp;
  }

  public MessageId getErrorCode()
  {
    return errorCode;
  }

  public Pattern getPattern()
  {
    if (pattern == null)
    {
      pattern = Pattern.compile(this.getRegexExp());
    }
    return pattern;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy