public class COSARAttrFormatter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
m_debugLevel |
static int |
UNKNOWN_ATTR_ERROR |
static int |
UNKNOWN_ATTR_IGNORE_NO_WARNING
These constants are used in conjunction with the
next field.
|
static int |
UNKNOWN_ATTR_IGNORE_WARNING |
Constructor and Description |
---|
COSARAttrFormatter() |
COSARAttrFormatter(ILogger iLogger) |
Modifier and Type | Method and Description |
---|---|
protected void |
debug(java.lang.String fName,
java.lang.String msg) |
protected void |
error(java.lang.String fName,
java.lang.String msg) |
int |
getDebugLevel() |
COSAR |
getOSAR(IAttrSource attrSource)
This function returns a new OSAR created from the layout
associated with the default record-type.
|
COSAR |
getOSAR(java.lang.String recordType,
IAttrSource attrSource)
This function returns a new OSAR created from the layout
associated with the specified record-type.
|
COSAR |
getOSAR(java.lang.String recordType,
IAttrSource attrSource,
IAttrCallback callbackObj)
This function returns a new OSAR created from the layout
associated with the specified record-type.
|
COSARAttr |
getOSARAttr(java.lang.String recordType,
java.lang.String key) |
int |
getUnknownAttrHandling() |
boolean |
hasRulesFor(java.lang.String recordType) |
boolean |
loadFromFile(java.lang.String filename)
This function is used for loading the descriptions of
OSAR attributes, consisting of:
an OSAR attribute id + type and string keys, stored in a file.
|
boolean |
loadFromVector(java.util.Vector cfgMapping)
This function is used for loading the descriptions of OSAR
attributes, consisting of:
an OSAR attribute id + type and string keys, stored in a HashMap.
|
void |
setDebugLevel(int debugLevel) |
void |
setUnknownAttrHandling(int unknownAttrHandling) |
java.lang.String |
toString()
This function prints out a description of the mapping between
String keys and OSAR attributes
|
protected void |
warning(java.lang.String fName,
java.lang.String msg) |
protected static int m_debugLevel
public static final int UNKNOWN_ATTR_IGNORE_NO_WARNING
public static final int UNKNOWN_ATTR_IGNORE_WARNING
public static final int UNKNOWN_ATTR_ERROR
public COSARAttrFormatter() throws java.lang.Exception
java.lang.Exception
public COSARAttrFormatter(ILogger iLogger) throws java.lang.Exception
iLogger
- - Object implementing ILogger interface - used
for logging errors, warnings, etc.java.lang.Exception
public int getDebugLevel()
public int getUnknownAttrHandling()
public void setDebugLevel(int debugLevel)
public void setUnknownAttrHandling(int unknownAttrHandling)
public boolean loadFromFile(java.lang.String filename)
filename
- - Filename containing the mappings
Format: '['record:
public boolean loadFromVector(java.util.Vector cfgMapping)
cfgMapping
- - matrix containing the mappings
Matrix line format:
public java.lang.String toString()
toString
in class java.lang.Object
public COSARAttr getOSARAttr(java.lang.String recordType, java.lang.String key)
public boolean hasRulesFor(java.lang.String recordType)
public COSAR getOSAR(java.lang.String recordType, IAttrSource attrSource)
public COSAR getOSAR(java.lang.String recordType, IAttrSource attrSource, IAttrCallback callbackObj)
public COSAR getOSAR(IAttrSource attrSource)
protected void error(java.lang.String fName, java.lang.String msg)
protected void warning(java.lang.String fName, java.lang.String msg)
protected void debug(java.lang.String fName, java.lang.String msg)