Package com.arsi.mj.maprpt.namedrpt
contains the following classes and interfaces.
Classes and Interfaces |
INamedReportLookupFactory |
Factory that loads report naming information from the proper Mapper system and
name directories. |
NamedReportLookup |
Provides lookup of report names to find cabinet, drawer and report represented
by that report name. |
NamedReportLookupFactoryMapperCImpl |
Factory that loads report naming information from the proper Mapper system and
name directories for MJ conversions based on Mapper-C. |
Interface: INamedReportLookupFactory
next
package
Factory that loads report naming information from the proper Mapper system and
name directories. Classes that implement this interface should be designed to be
instantiated as Spring beans.
public interface com.arsi.mj.maprpt.namedrpt.INamedReportLookupFactory
Fields |
Name (id) of Spring bean that implements this interface to load and use. public static final java.lang.String FACTORY_BEAN_NAME = "namedReportLookupFactory"
|
Methods |
Get object that provides lookup of report names to find cabinet, drawer and
report represented by the report name.
- Returns:
- object that can lookup named reports.
public com.arsi.mj.maprpt.namedrpt.NamedReportLookup getLookup()
|
Provides lookup of report names to find cabinet, drawer and report represented
by that report name.
Treat this class as "thread-safe", since it is immutable once created.
public class com.arsi.mj.maprpt.namedrpt.NamedReportLookup
extends java.lang.Object
Inner Class CDRCoordinate |
Nested class returned as result of report name lookup.
public static class com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinate
extends java.lang.Object
implements java.lang.Comparable
|
Cabinet number found by lookup, is always populated. public final int cabinet
Drawer letter found by lookup; NULL if name only identifies cabinet. public final java.lang.Character drawer
Report number found by lookup; NULL if name only identifies cabinet and drawer. public final java.lang.Integer report
|
Initializes the coordinate reference with the data provided.
- Parameters:
aCabinet - cabinet number reference.
aDrawer - drawer letter; can be null if this coordinate is for an entire cabinet.
aReport - report number; can be null if this coordinate is for an entire drawer.
public NamedReportLookup.CDRCoordinate(int aCabinet, java.lang.Character aDrawer, java.lang.Integer aReport)
public int compareTo(com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinate anOtherObj)
public boolean equals(java.lang.Object anObject)
public int hashCode()
|
Inner Class CDRCoordinateTuple |
Nested class to support name-CDR binding relationship.
public static class com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinateTuple
extends java.lang.Object
|
Cabinet-drawer-report associated with a name. public final com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinate cdr
Name associated with a cabinet-drawer-report instance. public final java.lang.String name
|
Initializes the instance with the data provided.
- Parameters:
aCoordinate - CDR coordinate mapped to the provided name.
aName - name that references the provided CDR coordinate.
public NamedReportLookup.CDRCoordinateTuple(com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinate aCoordinate, java.lang.String aName)
|
Constructors |
Initializes the instance with the data provided.
- Parameters:
someMappings - mapping information parsed from the files.
public NamedReportLookup(java.util.List someMappings)
|
Methods |
Lookup a Mapper report name to find the associated cabinet number, drawer letter and
report number.
- Parameters:
aName - case-sensitive Mapper report name to lookup.
- Returns:
- associated cabinet number, and possibly drawer letter and report number as
CDR object, or NULL if no match for report name.
public com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinate lookup(java.lang.String aName)
|
Lookup name(s) associated with cabinet number.
- Parameters:
aCabinetNumber - number of cabinet where report is located.
- Returns:
- name(s) associated with cabinet number or empty list if none.
public java.util.List lookupCabinetNames(int aCabinetNumber)
|
Lookup name(s) associated with cabinet number and drawer letter.
- Parameters:
aCabinetNumber - number of cabinet where report is located.
aDrawerLetter - letter of drawer where report is located.
- Returns:
- name(s) associated with cabinet number and drawer letter or empty list if none.
public java.util.List lookupDrawerNames(int aCabinetNumber, char aDrawerLetter)
|
Lookup name(s) associated with cabinet number, drawer letter and report number.
- Parameters:
aCabinetNumber - number of cabinet where report is located.
aDrawerLetter - letter of drawer where report is located.
aReportNumber - number of report.
- Returns:
- name(s) associated with cabinet number, drawer letter and report number
or empty list if none.
public java.util.List lookupReportNames(int aCabinetNumber, char aDrawerLetter, int aReportNumber)
|
Class: NamedReportLookupFactoryMapperCImpl
previous
package
Factory that loads report naming information from the proper Mapper system and
name directories for MJ conversions based on Mapper-C. This class is designed to
be instantiated as a Spring bean using singleton scope.
Although this class is technically "thread-hostile" since there is no synchronization
surrounding a state change, in practice an instance is immutable once created.
Fields |
The cabinet number where the name reports should be. public static final int NAME_CABINET = 8
|
The column names expected in a Mapper-C name report. public static final java.lang.String NAME_COLUMNS
|
The drawer letter where the name reports should be. public static final char NAME_DRAWER = 72
|
The maximum report number that should be matched by the discovery pattern. The Kanji report
is currently omitted; this constant should be changed to 1027 if the Kanji report needs to
be included again. public static final int NAME_REPORT_NUMBER_MAX = 1026
|
The minimum report number that should be matched by the discovery pattern. public static final int NAME_REPORT_NUMBER_MIN = 1001
|
Constructors |
public NamedReportLookupFactoryMapperCImpl()
|
Methods |
Implemented to perform validation and extraction of name report content.
- See Also:
- InitializingBean#afterPropertiesSet()
public void afterPropertiesSet() throws java.lang.Exception
|
public com.arsi.mj.maprpt.namedrpt.NamedReportLookup getLookup()
|
Allows injection of the locations to be used for name file resolution. The
locations must be suitable for use with Spring's
org.springframework.core.io.support.PathMatchingResourcePatternResolver , and will
query for .mpr files. Examples are:
classpath*:**/*.mpr (files exist on filesystem)
classpath*:approot1/**/*.mpr (files bundled into JAR)
The locations MUST contain a pattern ending with .mpr .
- Parameters:
someLocations - one or more classpath-based locations to search for .mpr files.
public void setDiscoveryLocations(java.lang.String someLocations)
|
Configures initialization so that errors are recorded instead of causing the process to stop. public void setIgnoreErrors(boolean areErrorsIgnored)
|