AnnBatesStampTranslator defines a translator that converts the Bates stamp elements to a string expression. Converts from a string expression to Bates stamp elements that can be saved and loaded using AnnBatesStampComposer.
This class is used by AnnBatesStampComposer when applying save/load. It can also convert Bates stamp elements to/from a string.
A text expression is composed of the following symbols:
To convert AnnBatesDateTime to a string, the expression will appear in the following formatted order: The starting expression ExpressionStartSymbol + the name of the type AnnBatesDateTime + the separating symbol ExpressionSeparatingSymbol + the time format as UTC or local + the separating symbol ExpressionSeparatingSymbol + the date format + ending symbol ExpressionEndSymbol. For example:
{{BatesDateTime*Local*MM/dd/yyyy}}
To convert AnnBatesNumber to a string, the expression will appear in the following order: The starting expression ExpressionStartSymbol + the name of the type AnnBatesNumber + the separating symbol ExpressionSeparatingSymbol + the number of digits + the separating symbol ExpressionSeparatingSymbol + all condition digits represented by 0 or 1 + the separating symbol ExpressionSeparatingSymbol + start number + separating symbol ExpressionSeparatingSymbol + auto increment condition which are represented by 0 or 1 + the separating symbol ExpressionSeparatingSymbol + a prefix text + the separating symbol ExpressionSeparatingSymbol + a suffix text + the end symbol ExpressionEndSymbol. For example:
{{BatesNumber*6*1*1*1*before*after}}
In this instance, the type is Bates stamp number with 6 digits, start is set to use all digits, and set to start from 1 with auto increment, the prefix text is "before" and the suffix text is "after". This expression produces: "before000001after". If the text expression does not conform to the format of either AnnBatesDateTime or AnnBatesNumber, then it is an AnnBatesText element. An example for an AnnBatesText is "This is some text".
Provided below is an example of different Bates stamp elements that are converted to a string using AnnBatesStampTranslator:
{{BatesDateTime*Local*MM/dd/yyyy}} {{BatesNumber*6*1*1*1*before*after}} This is some text
. This expression renders as "01/11/1111 before000001after This is some text".
This example translates Bates stamp elements to a string expression, and then loads it again.