<commit_before>package org.lockss.config;

import java.util.Calendar;
import java.util.Properties;

import org.lockss.config.Tdb.TdbException;

/**
 * A utility class providing static methods for constructing Tdb
 * hierarchies for testing.
 * 
 * @author <NAME>
 *
 */
public class TdbTestUtil {

  private static int paramCount = 0;

  public static String DEFAULT_TITLE_ID = "a_non_issn_title_id";
  public static String DEFAULT_TITLE_ID_RANGE = "a_non_issn_title_id_for_range_title";
  public static String DEFAULT_PUBLISHER = "a_publisher";
  public static String DEFAULT_PLUGIN = "a_plugin";
  public static String DEFAULT_VOLUME = "vol1";
  public static String DEFAULT_WRONG_VOLUME = "This is not a real volume value!";
  public static String DEFAULT_YEAR = "2003";
  public static String DEFAULT_ISSUE = "8";
  
  public static String DEFAULT_ISSN_1 = "0001-0006";
  public static String DEFAULT_EISSN_1 = "0002-0001";
  
  public static String DEFAULT_ISSN_2 = "0010-0005";
  public static String DEFAULT_EISSN_2 = "0020-000X";
  
  public static String DEFAULT_ISSN_3 = "0100-0004";
  public static String DEFAULT_EISSN_3 = "0200-0008";
  
  public static String DEFAULT_ISSN_4 = "1000-0003";
  public static String DEFAULT_EISSN_4 = "2000-0006";

  public static String ISSN_INVALID_FORMAT_1 = "001-006";
  public static String ISSN_INVALID_FORMAT_2 = "0001=0006";
  public static String ISSN_INVALID_CHECK_DIGIT = "0001-0005";
  
  public static String DEFAULT_VOLUME_KEY = "volume";
  public static String DEFAULT_VOLUME_NAME_KEY = "volume_name";

  public static String DEFAULT_URL = "http://www.some.url.com/title";
  
  public static String RANGE_1_START = "2000";
  public static String RANGE_1_END = "MM";  // 2000
  public static String RANGE_1_START_VOL = "1";
  public static String RANGE_1_END_VOL = "1";

  public static String RANGE_2_START = "MMV"; // 2005
  public static String RANGE_2_END = "2006";
  public static String RANGE_2_START_VOL = "2";
  public static String RANGE_2_END_VOL = "3";

  // Parameters for a journal which runs up to now and must therefore produce empty "last*" fields.
  // There is no coverage gap so only a single output title should be produced.
  // Note that the current date is assigned to a static variable; this should be fine unless the tests<commit_msg>Update format of year info<commit_after>package org.lockss.config;

import java.util.Calendar;
import java.util.Properties;

import org.lockss.config.Tdb.TdbException;

/**
 * A utility class providing static methods for constructing Tdb
 * hierarchies for testing.
 * 
 * @author <NAME>
 *
 */
public class TdbTestUtil {

  private static int paramCount = 0;

  public static String DEFAULT_TITLE_ID = "a_non_issn_title_id";
  public static String DEFAULT_TITLE_ID_RANGE = "a_non_issn_title_id_for_range_title";
  public static String DEFAULT_PUBLISHER = "a_publisher";
  public static String DEFAULT_PLUGIN = "a_plugin";
  public static String DEFAULT_VOLUME = "vol1";
  public static String DEFAULT_WRONG_VOLUME = "This is not a real volume value!";
  public static String DEFAULT_YEAR = "2003";
  public static String DEFAULT_ISSUE = "8";
  
  public static String DEFAULT_ISSN_1 = "0001-0006";
  public static String DEFAULT_EISSN_1 = "0002-0001";
  
  public static String DEFAULT_ISSN_2 = "0010-0005";
  public static String DEFAULT_EISSN_2 = "0020-000X";
  
  public static String DEFAULT_ISSN_3 = "0100-0004";
  public static String DEFAULT_EISSN_3 = "0200-0008";
  
  public static String DEFAULT_ISSN_4 = "1000-0003";
  public static String DEFAULT_EISSN_4 = "2000-0006";

  public static String ISSN_INVALID_FORMAT_1 = "001-006";
  public static String ISSN_INVALID_FORMAT_2 = "0001=0006";
  public static String ISSN_INVALID_CHECK_DIGIT = "0001-0005";
  
  public static String DEFAULT_VOLUME_KEY = "volume";
  public static String DEFAULT_VOLUME_NAME_KEY = "volume_name";

  public static String DEFAULT_URL = "http://www.some.url.com/title";
  
  public static String RANGE_1_START = "2000";
  public static String RANGE_1_END = "MM";  // 2000
  public static String RANGE_1_START_VOL = "1";
  public static String RANGE_1_END_VOL = "1";

  public static String RANGE_2_START = "2005";
  public static String RANGE_2_END = "2006";
  public static String RANGE_2_START_VOL = "2";
  public static String RANGE_2_END_VOL = "3";

  // Parameters for a journal which runs up to now and must therefore produce empty "last*" fields.
  // There is no coverage gap so only a single output title should be produced.
  // Note that the current date is assigned to a static variable; this should be fine unless the tests
{'fraction_non_alphanumeric': 0.08103448275862069, 'fraction_numerical': 0.05603448275862069, 'mean_word_length': 4.479338842975206, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4032161', 'n_tokens_mistral': 1675, 'n_tokens_neox': 1447, 'n_words': 474}