- In the ResultParserFormatter used to process the Shakespeare Glossary flat files to extract the term
and definition based on the string pattern in the file.
<!-- String filters that can transform a text line into metadata fields -->
<FilteredField state="AT_LINE"
fieldID="Term" >
<!-- Find patterns of "'ALL-CAPS, lowercase ..." or "ALL, CAPS, lowercase ..." -->
<!-- with the ALL CAPS section as the Term field. -->
<StringFilter class="com.raritantechnologies.utils.filter.RegExprStringFilter" >
<Pattern inPattern="([A-Z\-\']*), ([A-Z\s\-\']*), ([a-z]*)(.*)"
outPattern="$2 $1" />
<Pattern inPattern="([A-Z\s\-\']*), ([a-z]*)(.*)"
outPattern="$1" />
</StringFilter>
</FilteredField>
- In the HTMLFilter used to modify hyperlinks in the Javadoc pages so that they are integrated with the
example pages in this application.
<StringFilter class="com.raritantechnologies.utils.filter.RegExprStringFilter"
inPattern="(.*)/com/raritantechnologies(.*)"
outPattern="/FrameworkDocumentation/JavadocPage.jsp?javadoc=/doc/com/raritantechnologies$2" />
- Used to normalize name patterns for search sites that have a standard name pattern for author search.
<!-- ========================================= -->
<!-- Last Name First: -->
<!-- Abraham Lincoln == Lincoln, Abraham -->
<!-- Abraham B. Lincoln == Lincoln, Abraham B. -->
<!-- ========================================= -->
<StringFilter configurableClass="com.raritantechnologies.utils.filter.RegExprStringFilter" >
<Pattern inPattern="([A-Z])([a-z]*)\s([A-Z])\.?\s(.*)"
outPattern="$4, $1$2 $3." />
<Pattern inPattern="([A-Z])([a-z]*)\s([A-Z])([a-z]*)\s(.*)"
outPattern="$5, $1$2 $3$4" />
<Pattern inPattern="([A-Z])([a-z]*)\s(.*)"
outPattern="$3, $1$2" />
</StringFilter>