View Javadoc
1   package com.acumenvelocity.ath.common;
2   
3   import java.text.DateFormat;
4   import java.text.SimpleDateFormat;
5   import java.util.TimeZone;
6   
7   import org.apache.commons.lang3.math.NumberUtils;
8   
9   import net.sf.okapi.common.Util;
10  import net.sf.okapi.common.filters.IFilter;
11  import net.sf.okapi.common.query.MatchType;
12  
13  /**
14   * Central constants class for the ATH (Acumen Velocity Translation Hub) application.
15   * This class contains all application-wide constants including:
16   * <ul>
17   * <li>Environment variable configurations</li>
18   * <li>Database names and collection names</li>
19   * <li>Default ObjectIds for testing and system operations</li>
20   * <li>Property names and values</li>
21   * <li>Date formatters</li>
22   * <li>Pipeline and MT provider constants</li>
23   * </ul>
24   * 
25   * <p>
26   * All constants are public static final and organized by category for easy navigation.
27   * This class is not meant to be instantiated.
28   * 
29   * @author Acumen Velocity
30   * @version 1.0
31   * @since 1.0
32   */
33  public class Const {
34  
35    // ============================================================================================
36    // ENVIRONMENT VARIABLES
37    // ============================================================================================
38  
39    /**
40     * Port number for the ATH application server.
41     * Defaults to 8080 if ATH_PORT environment variable is not set or invalid.
42     * This value is checked for validity in EnvVarsChecker.
43     */
44    public static final int ATH_PORT = AthUtil.safeToInt(System.getenv("ATH_PORT"), 8080);
45  
46    /**
47     * Storage timeout in minutes for temporary data and cached resources.
48     * Defaults to 15 minutes if ATH_STORAGE_TIMEOUT_MINUTES environment variable is not defined.
49     * This prevents test failures when the environment variable is missing.
50     */
51    public static final long STORAGE_TIMEOUT_MINUTES = Util.isEmpty(
52        System.getenv("ATH_STORAGE_TIMEOUT_MINUTES")) ? 15
53            : Long.valueOf(System.getenv("ATH_STORAGE_TIMEOUT_MINUTES"));
54  
55    /**
56     * Distributed lock timeout in milliseconds for document segment repositioning operations.
57     * Defaults to 30 seconds (30000ms) if ATH_SOLR_DOC_LOCK_TIMEOUT_MS environment variable is not
58     * defined.
59     * This timeout prevents deadlocks when a worker node crashes or becomes unresponsive while
60     * holding a lock. After this duration, the lock is considered expired and can be acquired
61     * by another node.
62     */
63    public static final long SOLR_DOC_LOCK_TIMEOUT_MS = Util.isEmpty(
64        System.getenv("ATH_SOLR_DOC_LOCK_TIMEOUT_MS")) ? 30000
65            : Long.valueOf(System.getenv("ATH_SOLR_DOC_LOCK_TIMEOUT_MS"));
66  
67    /** Google Cloud Storage bucket name */
68    public static final String ATH_GCS_BUCKET = System.getenv("ATH_GCS_BUCKET");
69    
70    // /** Google Cloud Storage bucket name */
71    // public static final String ATH_VERTEX_EVAL_JOB_GCS_BUCKET = System
72    // .getenv("ATH_VERTEX_EVAL_JOB_GCS_BUCKET");
73    //
74    // /** Google Cloud Storage bucket name */
75    // public static final String ATH_VERTEX_EVAL_JOB_GCS_PREFIX = System
76    // .getenv("ATH_VERTEX_EVAL_JOB_GCS_PREFIX");
77  
78    /** Path to Google Cloud Platform service account key file */
79    public static final String ATH_GCP_SECRET_FILE = System.getenv("ATH_GCP_SECRET_FILE");
80  
81    /**
82     * The GCP region
83     */
84    public static final String ATH_GCP_PROJECT_LOCATION = System.getenv("ATH_GCP_PROJECT_LOCATION");
85  
86    /** The Client ID required for authenticating with the Adobe PDF services API. */
87    public static final String ATH_PDF_CLIENT_ID = System.getenv("ATH_PDF_CLIENT_ID");
88  
89    /** The Client Secret for authenticating with the Adobe PDF services API. */
90    public static final String ATH_PDF_CLIENT_SECRET = System.getenv("ATH_PDF_CLIENT_SECRET");
91  
92    /** Apache Solr server URL for search functionality */
93    public static final String ATH_SOLR_URL = System.getenv("ATH_SOLR_URL");
94  
95    /** Logging configuration setting */
96    public static final String ATH_LOGS_CONFIG = System.getenv("ATH_LOGS_CONFIG");
97  
98    /**
99     * ATH Okapi API key
100    */
101   public static final String ATH_API_KEY = System.getenv("ATH_API_KEY");
102   
103   /**
104    * Google Translate API key
105    */
106   public static final String ATH_GCT_API_KEY = System.getenv("ATH_GCT_API_KEY");
107 
108   /**
109    * OpenAI API key
110    */
111   public static final String ATH_OPENAI_API_KEY = System.getenv("ATH_OPENAI_API_KEY");
112 
113   /**
114    * OpenAI model
115    */
116 
117   // public static final String OPENAI_MODEL = "gpt-4o-mini";
118   public static final String OPENAI_MODEL = "gpt-5-mini";
119   // public static final String OPENAI_MODEL = "gpt-5";
120   // public static final String OPENAI_MODEL = "gpt-5-nano"; // fills trgCodes only for the 1st one
121   // public static final String OPENAI_MODEL = "gpt-5-chat-latest";
122 
123   /**
124    * Gemini API key
125    */
126   public static final String ATH_GEMINI_API_KEY = System.getenv("ATH_GEMINI_API_KEY");
127 
128   public static final String GEMINI_CODE_REINSERTION_MODEL = "gemini-2.5-flash";
129   // public static final String GEMINI_CODE_REINSERTION_MODEL = "gemini-2.0-flash-exp";
130   // public static final String GEMINI_CODE_REINSERTION_MODEL = "gemini-2.5-pro";
131 
132   // public static final String GEMINI_ALIGNMENT_MODEL = "gemini-2.5-flash";
133   public static final String GEMINI_ALIGNMENT_MODEL = "gemini-2.5-pro";
134 
135   public static final MatchType AL_MATCH_TYPE = MatchType.EXACT_REPAIRED;
136 
137   // ============================================================================================
138   // MACHINE TRANSLATION DEFAULTS
139   // ============================================================================================
140 
141   /** Default machine translation provider name */
142   public static final String DEFAULT_MT_PROVIDER = ProjectProps
143       .getProjectPropValue("default.mt.provider");
144 
145   /** Default machine translation confidence threshold */
146   public static final int DEFAULT_MT_THRESHOLD = ProjectProps
147       .getProjectPropIntValue("default.mt.threshold");
148 
149   // ============================================================================================
150   // MISCELLANEOUS CONFIGURATION
151   // ============================================================================================
152 
153   /** Temporary file prefix */
154   public static final String TEMP_PREFIX = ProjectProps.getProjectPropValue("temp.prefix");
155 
156   /** Atlas Translation Memory index name for search operations */
157   public static final String ATLAS_TM_INDEX_NAME = ProjectProps
158       .getProjectPropValue("atlas.tm.index.name");
159 
160   // ============================================================================================
161   // DATE FORMATTERS
162   // ============================================================================================
163 
164   /**
165    * ISO 8601 date format for TMX files.
166    * Reference: https://www.gala-global.org/tmx-14b#creationdate
167    * Configured with timezone from project properties.
168    */
169   public static final DateFormat TMX_DATE_FORMAT;
170   public static final DateFormat QUARTZ_DATE_FORMAT;
171 
172   // ============================================================================================
173   // PIPELINE TYPES
174   // ============================================================================================
175 
176   /** Import pipeline type identifier */
177   public static final String ATH_PIPELINE_TYPE_IMPORT = ProjectProps
178       .getProjectPropValue("pipeline.type.name.cat.import");
179 
180   /** Export pipeline type identifier */
181   public static final String ATH_PIPELINE_TYPE_EXPORT = ProjectProps
182       .getProjectPropValue("pipeline.type.name.cat.export");
183 
184   // ============================================================================================
185   // SOLR PROPERTY NAMES
186   // ============================================================================================
187 
188   public static final int ATH_SOLR_BATCH_SIZE = NumberUtils
189       .toInt(System.getenv("ATH_SOLR_BATCH_SIZE"), 10_000);
190 
191   // Core entity identifiers
192   /**
193    * Property name for the Solr ID.
194    */
195   public static final String ATH_PROP_SOLR_ID = "id";
196 
197   public static final String ATH_PROP_TM_SEG_ID = "tmSegId";
198 
199   public static final String ATH_PROP_DOC_SEG_ID = "docSegId";
200 
201   /**
202    * Property name for the TM ID.
203    */
204   public static final String ATH_PROP_TM_ID = "tmId";
205   
206   /**
207    * Property name for the Company ID.
208    */
209   public static final String ATH_PROP_TM_COMPANY_ID = "tmCompanyId";
210   
211   public static final String ATH_PROP_TM_STORAGE_NAME = "tmStorageName";
212 
213   /**
214    * Property name for the TM threshold percentage (byte).
215    */
216   public static final String ATH_PROP_TM_THRESHOLD = "tmThreshold";
217 
218   /**
219    * Property name for the TM name.
220    */
221   public static final String ATH_PROP_TM_FILE_NAME = "tmFileName";
222 
223   /**
224    * Property name for the MT engine ID (string).
225    */
226   public static final String ATH_PROP_MT_ENGINE_ID = "mtEngineId";
227 
228   /**
229    * Property name for the MT-engine-specific parameters (string).
230    */
231   public static final String ATH_PROP_MT_ENGINE_PARAMS = "mtEngineParams";
232 
233   /**
234    * Property name for the MT project location (string).
235    */
236   public static final String ATH_PROP_MT_PROJECT_LOCATION = "mtProjectLocalion";
237 
238   // /**
239   // * Property name for the MT project ID (string).
240   // */
241   // public static final String ATH_PROP_MT_GLOSSARY_PROJECT_ID = "mtGlossaryProjectId";
242   //
243   // /**
244   // * Property name for the MT glossary project ID (string).
245   // */
246   // public static final String ATH_PROP_MT_GLOSSARY_PROJECT_LOCATION = "mtGlossaryProjectLocalion";
247   //
248   // /**
249   // * Property name for the MT glossary ID (string).
250   // */
251   // public static final String ATH_PROP_MT_GLOSSARY_ID = "mtGlossaryId";
252   //
253   // /**
254   // * Property name for the MT model project ID (string).
255   // */
256   // public static final String ATH_PROP_MT_MODEL_PROJECT_ID = "mtModelProjectId";
257   //
258   // /**
259   // * Property name for the MT model project location (string).
260   // */
261   // public static final String ATH_PROP_MT_MODEL_PROJECT_LOCATION = "mtModelProjectLocalion";
262   //
263   // /**
264   // * Property name for the MT model ID (string).
265   // */
266   // public static final String ATH_PROP_MT_MODEL_ID = "mtModelId";
267 
268   /**
269    * Property name for the TM ID.
270    */
271   public static final String ATH_PROP_EXPORT_TM_ID = "exportTmId";
272 
273   /**
274    * Property name for the Solr score.
275    */
276   public static final String ATH_PROP_SOLR_SCORE = "score";
277 
278   /**
279    * Property name for the file ID.
280    */
281   public static final String ATH_PROP_FILE_ID = "fileId";
282 
283   /**
284    * Property name for the file name.
285    */
286   public static final String ATH_PROP_FILE_NAME = "fileName";
287 
288   /** Property name for the document ID (UUID) inside a TM entry. */
289   public static final String ATH_PROP_DOC_ID = "docId";
290 
291   /** Property name for the document file name. */
292   public static final String ATH_PROP_DOC_FILE_NAME = "docFileName";
293 
294   public static final String ATH_PROP_DOC_STORAGE_NAME = "docStorageName";
295 
296   public static final String ATH_PROP_DOC_TRL_STORAGE_NAME = "docTrlStorageName";
297 
298   public static final String ATH_PROP_DOC_OUT_STORAGE_NAME = "docOutStorageName";
299 
300   /** Property name for the document file encoding. */
301   public static final String ATH_PROP_DOC_FILE_ENCODING = "docFileEncoding";
302 
303   /** Property name for the trl (2nd input) document file encoding. */
304   public static final String ATH_PROP_DOC_TRL_FILE_ENCODING = "docTrlFileEncoding";
305 
306   /** Property name for the document output file encoding. */
307   public static final String ATH_PROP_DOC_OUT_FILE_ENCODING = "docOutFileEncoding";
308 
309   /** Property name for the filter ID (string). */
310   public static final String ATH_PROP_FILTER_ID = "filterId";
311 
312   /** Property name for the filter parameters (string). */
313   public static final String ATH_PROP_FILTER_PARAMS = "filterParams";
314 
315   /** Property name for the source segmentation rules (string). */
316   public static final String ATH_PROP_SRC_SRX = "srcSrx";
317 
318   /** Property name for the target segmentation rules (string). */
319   public static final String ATH_PROP_TRG_SRX = "trgSrx";
320 
321   /**
322    * Property name for the source language.
323    */
324   public static final String ATH_PROP_SRC_LANG = "srcLang";
325 
326   /**
327    * Property name for the target language.
328    */
329   public static final String ATH_PROP_TRG_LANG = "trgLang";
330 
331   // General properties
332   /**
333    * Property name for the status.
334    */
335   public static final String ATH_PROP_STATUS = "status";
336 
337   /**
338    * Property name for the error message.
339    */
340   public static final String ATH_PROP_ERROR_MESSAGE = "errorMessage";
341 
342   /**
343    * Property name for the error type.
344    */
345   public static final String ATH_PROP_ERROR_TYPE = "errorType";
346 
347   /**
348    * Property name for the name.
349    */
350   public static final String ATH_PROP_NAME = "name";
351 
352   /**
353    * Property name for the type.
354    */
355   public static final String ATH_PROP_TYPE = "type";
356 
357   /**
358    * Property name for the CAT tool.
359    */
360   public static final String ATH_PROP_CAT_TOOL = "catTool";
361 
362   /**
363    * Property name for the user ID.
364    */
365   public static final String ATH_PROP_USER_ID = "userId";
366 
367   /**
368    * Property name for the user type.
369    */
370   public static final String ATH_PROP_USER_TYPE = "userType";
371 
372   // File and segment properties
373   /**
374    * Property name for the source.
375    */
376   public static final String ATH_PROP_SOURCE = "source";
377 
378   public static final String ATH_PROP_SOURCE_WITH_CODES = "sourceWithCodes";
379 
380   public static final String ATH_PROP_TARGET_WITH_CODES = "targetWithCodes";
381   /**
382    * Property name for the target.
383    */
384   public static final String ATH_PROP_TARGET = "target";
385 
386   // Context properties
387   /**
388    * Property name for the source JSON.
389    */
390   public static final String ATH_PROP_SOURCE_JSON = "sourceJson";
391   /**
392    * Property name for the target JSON.
393    */
394   public static final String ATH_PROP_TARGET_JSON = "targetJson";
395   
396   public static final String ATH_PROP_ALT_TRANS_JSON = "altTransJson";
397   
398   public static final String ATH_PROP_ALT_TRANS_INDEX = "altTransIndex";
399 
400   // ============================================================================================
401   // SEGMENT PROPERTIES
402   // ============================================================================================
403 
404   /** Translation Unit ID */
405   public static final String ATH_PROP_TU_ID = "tuId";
406 
407   /** Segment ID within a translation unit */
408   public static final String ATH_PROP_SEG_ID = "segId";
409 
410   /** Indicates if this segment was merged from multiple segments */
411   public static final String ATH_PROP_MERGED = "merged";
412 
413   /** JSON data about segments this was merged from */
414   public static final String ATH_PROP_MERGED_FROM_SEGMENTS_JSON = "mergedFromSegmentsJson";
415 
416   /** Translator/reviewer notes for the segment */
417   public static final String ATH_PROP_NOTE = "note";
418 
419   /** Indicates if this segment was split from a larger segment */
420   public static final String ATH_PROP_SPLIT = "split";
421 
422   /** JSON data about the segment this was split from */
423   public static final String ATH_PROP_SPLIT_FROM_SEGMENTS_JSON = "splitFromSegmentJson";
424 
425   /** Indicates if the segment is locked for editing */
426   public static final String ATH_PROP_LOCKED = "locked";
427 
428   /** Indicates if the segment has translation memory matches */
429   public static final String ATH_PROP_MATCHED = "matched";
430 
431   /** JSON data about translation memory match information */
432   public static final String ATH_PROP_TM_MATCH_INFO_JSON = "tmMatchInfoJson";
433 
434   /** Position/order of the segment in the document */
435   public static final String ATH_PROP_POSITION = "position";
436 
437   /** Origin/source of the segment (human, MT, TM, etc.) */
438   public static final String ATH_PROP_ORIGIN = "origin";
439   public static final String ATH_PROP_TM_MATCH_SCORE = "tmMatchScore";
440   public static final String ATH_PROP_MT_CONFIDENCE_SCORE = "mtConfidenceScore";
441 
442   // Audit trail properties
443 
444   /**
445    * Property name for created by.
446    */
447   public static final String ATH_PROP_CREATED_BY = "createdBy";
448 
449   /**
450    * Property name for created at.
451    */
452   public static final String ATH_PROP_CREATED_AT = "createdAt";
453 
454   /**
455    * Property name for updated by.
456    */
457   public static final String ATH_PROP_UPDATED_BY = "updatedBy";
458 
459   /**
460    * Property name for updated at.
461    */
462   public static final String ATH_PROP_UPDATED_AT = "updatedAt";
463 
464   /**
465    * Property name for processed by.
466    */
467   public static final String ATH_PROP_PROCESSED_BY = "processedBy";
468 
469   /**
470    * Property name for started at.
471    */
472   public static final String ATH_PROP_STARTED_AT = "startedAt";
473 
474   /**
475    * Property name for finished at.
476    */
477   public static final String ATH_PROP_FINISHED_AT = "finishedAt";
478 
479   // ============================================================================================
480   // MACHINE TRANSLATION PROVIDERS
481   // ============================================================================================
482 
483   /** Google Machine Translation provider identifier */
484   public static final String MT_PROVIDER_GOOGLE_MT = "GoogleMT";
485 
486   /** Google Cloud Translation v3 provider identifier */
487   public static final String MT_PROVIDER_GOOGLE_MT_V3 = "GoogleMTv3";
488   // public static final String PROJECT_ID = "ath-okapi";
489   public static final String US_CENTRAL1_PROJECT_LOCATION = "us-central1";
490 
491   /**
492    * Determines if a machine translation provider requires an API key.
493    * Currently Google MT v2 and v3 require API keys for authentication.
494    * 
495    * @param mtProvider the MT provider name to check
496    * @return true if the provider requires an API key, false otherwise
497    */
498   public static boolean requireApiKey(String mtProvider) {
499     return MT_PROVIDER_GOOGLE_MT.equalsIgnoreCase(mtProvider);
500   }
501 
502   // ============================================================================================
503   // APPLICATION PROPERTY NAMES
504   // ============================================================================================
505 
506   /**
507    * Property name for the CAT name.
508    */
509   public static final String ATH_PROP_CAT_NAME = "cat.name";
510 
511   private static final String ATH_PROP_CAT_SYSTEM_USER_NAME = "cat.system.user.name";
512   private static final String ATH_PROP_CAT_SYSTEM_TEST_USER_NAME = "cat.system.user.name.test";
513   /**
514    * Property name for the CAT version.
515    */
516   public static final String ATH_PROP_CAT_VERSION = "catVersion";
517 
518   /**
519    * Property name for the CAT framework name.
520    */
521   public static final String ATH_PROP_CAT_FRAMEWORK_NAME = "catFrameworkName";
522 
523   /**
524    * Property name for the CAT framework version.
525    */
526   public static final String ATH_PROP_CAT_FRAMEWORK_VERSION = "catFrameworkVersion";
527 
528   /**
529    * Property name for the CAT Solr version.
530    */
531   public static final String ATH_PROP_CAT_SOLR_VERSION = "cat.solr.version";
532 
533   // System properties
534   /**
535    * Property name for the server Java home.
536    */
537   public static final String ATH_PROP_SERVER_JAVA_HOME = "java.home";
538 
539   /**
540    * Property name for the server Java vendor.
541    */
542   public static final String ATH_PROP_SERVER_JAVA_VENDOR = "java.vendor";
543 
544   /**
545    * Property name for the server Java version.
546    */
547   public static final String ATH_PROP_SERVER_JAVA_VERSION = "java.version";
548 
549   /**
550    * Property name for the server Java runtime version.
551    */
552   public static final String ATH_PROP_SERVER_JAVA_RUNTIME_VERSION = "java.runtime.version";
553 
554   /**
555    * Property name for the server OS architecture.
556    */
557   public static final String ATH_PROP_SERVER_OS_ARCHITECTURE = "os.arch";
558 
559   /**
560    * Property name for the server OS name.
561    */
562   public static final String ATH_PROP_SERVER_OS_NAME = "os.name";
563 
564   /**
565    * Property name for the server OS version.
566    */
567   public static final String ATH_PROP_SERVER_OS_VERSION = "os.version";
568 
569   /**
570    * Property name for the server user name.
571    */
572   public static final String ATH_PROP_SERVER_USER_NAME = "user.name";
573 
574   /**
575    * Property name for the server OS user name.
576    */
577   public static final String ATH_PROP_SERVER_OS_USER_NAME = "os.user.name";
578 
579   /**
580    * Property name for the server web name.
581    */
582   public static final String ATH_PROP_SERVER_WEB_NAME = "server.web.name";
583 
584   /**
585    * Property name for the server web version.
586    */
587   public static final String ATH_PROP_SERVER_WEB_VERSION = "server.web.version";
588 
589   /**
590    * Property name for the segment TM score.
591    */
592   public static final String ATH_PROP_SEGMENT_TM_SCORE = "segment.tm.score";
593 
594   // ============================================================================================
595   // RUNTIME PROPERTY VALUES
596   // ============================================================================================
597 
598   // Application identification (loaded from project properties)
599   public static final String CAT_NAME = ProjectProps.getProjectPropValue(ATH_PROP_CAT_NAME);
600 
601   public static final String CAT_SYSTEM_USER_NAME = ProjectProps
602       .getProjectPropValue(ATH_PROP_CAT_SYSTEM_USER_NAME);
603 
604   public static final String CAT_SYSTEM_TEST_USER_NAME = ProjectProps
605       .getProjectPropValue(ATH_PROP_CAT_SYSTEM_TEST_USER_NAME);
606 
607   public static final String CAT_VERSION = ProjectProps.getProjectPropValue("cat.version");
608 
609   public static final String CAT_FRAMEWORK_NAME = ProjectProps
610       .getProjectPropValue("cat.framework.name");
611 
612   public static final String CAT_FRAMEWORK_VERSION = ProjectProps
613       .getProjectPropValue("cat.framework.version");
614 
615   public static final String CAT_SOLR_VERSION = ProjectProps
616       .getProjectPropValue(ATH_PROP_CAT_SOLR_VERSION);
617 
618   // Server environment (loaded from system properties)
619   public static final String SERVER_JAVA_HOME = System.getProperty(ATH_PROP_SERVER_JAVA_HOME);
620   public static final String SERVER_JAVA_VENDOR = System.getProperty(ATH_PROP_SERVER_JAVA_VENDOR);
621   public static final String SERVER_JAVA_VERSION = System.getProperty(ATH_PROP_SERVER_JAVA_VERSION);
622 
623   public static final String SERVER_JAVA_RUNTIME_VERSION = System
624       .getProperty(ATH_PROP_SERVER_JAVA_RUNTIME_VERSION);
625 
626   public static final String SERVER_OS_ARCHITECTURE = System
627       .getProperty(ATH_PROP_SERVER_OS_ARCHITECTURE);
628 
629   public static final String SERVER_OS_NAME = System.getProperty(ATH_PROP_SERVER_OS_NAME);
630   public static final String SERVER_OS_VERSION = System.getProperty(ATH_PROP_SERVER_OS_VERSION);
631   public static final String SERVER_OS_USER_NAME = System.getProperty(ATH_PROP_SERVER_USER_NAME);
632 
633   public static final String SERVER_WEB_NAME = ProjectProps
634       .getProjectPropValue(ATH_PROP_SERVER_WEB_NAME);
635 
636   public static final String SERVER_WEB_VERSION = ProjectProps
637       .getProjectPropValue(ATH_PROP_SERVER_WEB_VERSION);
638 
639   public static final String SEGMENT_TM_SCORE = ProjectProps
640       .getProjectPropValue(ATH_PROP_SEGMENT_TM_SCORE);
641 
642   // ============================================================================================
643   // USER AND SYSTEM VALUES
644   // ============================================================================================
645 
646   /** Default value for unassigned user fields */
647   public static final String USER_UNASSIGNED = "unassigned";
648 
649   /**
650    * Application identifier string combining name, version, framework name and version.
651    * Used in the "createdWith" field to track which version of the application created data.
652    * Dots are replaced with underscores to avoid conflicts in some contexts.
653    */
654   public static final String ATH_CREATED_WITH = Log.format("{}.{}.{}.{}",
655       Const.CAT_NAME.replaceAll(".", "_"), Const.CAT_VERSION.replaceAll(".", "_"),
656       Const.CAT_FRAMEWORK_NAME.replaceAll(".", "_"),
657       Const.CAT_FRAMEWORK_VERSION.replaceAll(".", "_"));
658 
659   // ============================================================================================
660   // STATIC INITIALIZATION
661   // ============================================================================================
662 
663   static {
664     // Initialize TMX date formatter with ISO 8601 format and configured timezone
665     TMX_DATE_FORMAT = new SimpleDateFormat(ProjectProps.getProjectPropValue("date.format.tmx"));
666 
667     TMX_DATE_FORMAT.setTimeZone(
668         TimeZone.getTimeZone(ProjectProps.getProjectPropValue("date.format.tmx.timezone")));
669 
670     QUARTZ_DATE_FORMAT = new SimpleDateFormat(
671         ProjectProps.getProjectPropValue("date.format.quartz"));
672 
673     QUARTZ_DATE_FORMAT.setTimeZone(
674         TimeZone.getTimeZone(ProjectProps.getProjectPropValue("date.format.quartz.timezone")));
675   }
676 
677   // ============================================================================================
678   // FILTER CONFIGURATION BUILDERS
679   // ============================================================================================
680 
681   /**
682    * Builds a default configuration ID for a given filter.
683    * Combines the filter name with a suffix from project properties.
684    * 
685    * @param filter the Okapi filter to build configuration ID for
686    * @return configuration ID string
687    */
688   public static String buildDefConfigId(IFilter filter) {
689     return buildDefConfigId(filter.getName());
690   }
691 
692   /**
693    * Builds a default configuration ID for a given filter name.
694    * 
695    * @param filterName the name of the filter
696    * @return configuration ID string
697    */
698   public static String buildDefConfigId(String filterName) {
699     return filterName + ProjectProps.getProjectPropValue("default.config.id.suffix");
700   }
701 
702   /**
703    * Builds a default configuration name for a given filter.
704    * 
705    * @param filter the Okapi filter (parameter not used, loads from properties)
706    * @return default configuration name from properties
707    */
708   public static String buildDefConfigName(IFilter filter) {
709     return ProjectProps.getProjectPropValue("default.config.name");
710   }
711 
712   /**
713    * Builds a default configuration note/description for a given filter.
714    * Combines the filter's display name with a suffix from project properties.
715    * 
716    * @param filter the Okapi filter to build note for
717    * @return configuration note string
718    */
719   public static String buildDefConfigNote(IFilter filter) {
720     return filter.getDisplayName() + ProjectProps.getProjectPropValue("default.config.note.suffix");
721   }
722 
723   /**
724    * Gets the MIME type for a filter's default configuration.
725    * 
726    * @param filter the Okapi filter
727    * @return the filter's MIME type
728    */
729   public static String buildDefConfigMimeType(IFilter filter) {
730     return filter.getMimeType();
731   }
732 
733   /**
734    * Gets the file extensions for a filter's default configuration.
735    * Currently returns "*" (all extensions) for all filters.
736    * 
737    * @param filter the Okapi filter (parameter not used)
738    * @return "*" indicating all file extensions are supported
739    */
740   public static String buildDefConfigFileExtensions(IFilter filter) {
741     return "*";
742   }
743 
744   // ============================================================================================
745   // MICROSOFT OFFICE DOCUMENT CONSTANTS
746   // ============================================================================================
747 
748   /** Office Open XML core document relationship type */
749   public static final String CORE_DOCUMENT = "http://schemas.openxmlformats.org/officeDocument/2006/"
750       + "relationships/officeDocument";
751 
752   /** Office Open XML styles part relationship type */
753   public static final String STYLE_PART = "http://schemas.openxmlformats.org/officeDocument/2006/"
754       + "relationships/styles";
755 
756   // ============================================================================================
757   // SOLR CORES
758   // ============================================================================================
759   public static final String SOLR_CORE_ATH_AUTOML_JOBS = "ath_automl_jobs";
760   public static final String SOLR_CORE_ATH_DOCS = "ath_docs";
761   public static final String SOLR_CORE_ATH_DOC_SEGMENTS = "ath_doc_segments";
762 
763   public static final String SOLR_CORE_ATH_TMS = "ath_tms";
764   public static final String SOLR_CORE_ATH_TM_SEGMENTS = "ath_tm_segments";
765 }