Package com.nt.udc.io
Class COSARAttrFormatter
java.lang.Object
com.nt.udc.io.COSARAttrFormatter
This class provides the formatting mechanism for OSARs, based
on lists of OSAR attributes described by means of an id, a
type and a value obtained by evaluating an expression containing
reference to values obtained from an external source of type
IAttrSource.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static intstatic final intstatic final intThese constants are used in conjunction with the next field.static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidintgetOSAR(IAttrSource attrSource) This function returns a new OSAR created from the layout associated with the default record-type.getOSAR(String recordType, IAttrSource attrSource) This function returns a new OSAR created from the layout associated with the specified record-type.getOSAR(String recordType, IAttrSource attrSource, IAttrCallback callbackObj) This function returns a new OSAR created from the layout associated with the specified record-type.getOSARAttr(String recordType, String key) intbooleanhasRulesFor(String recordType) booleanloadFromFile(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.booleanloadFromVector(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.voidsetDebugLevel(int debugLevel) voidsetUnknownAttrHandling(int unknownAttrHandling) toString()This function prints out a description of the mapping between String keys and OSAR attributesprotected void
-
Field Details
-
m_debugLevel
protected static int m_debugLevel -
UNKNOWN_ATTR_IGNORE_NO_WARNING
public static final int UNKNOWN_ATTR_IGNORE_NO_WARNINGThese constants are used in conjunction with the next field.- See Also:
-
UNKNOWN_ATTR_IGNORE_WARNING
public static final int UNKNOWN_ATTR_IGNORE_WARNING- See Also:
-
UNKNOWN_ATTR_ERROR
public static final int UNKNOWN_ATTR_ERROR- See Also:
-
-
Constructor Details
-
Method Details
-
getDebugLevel
public int getDebugLevel() -
getUnknownAttrHandling
public int getUnknownAttrHandling() -
setDebugLevel
public void setDebugLevel(int debugLevel) -
setUnknownAttrHandling
public void setUnknownAttrHandling(int unknownAttrHandling) -
loadFromFile
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.- Parameters:
filename- - Filename containing the mappingsFormat: '['record:
']' { }* - Returns:
- true if successful, false otherwise
-
loadFromVector
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.- Parameters:
cfgMapping- - matrix containing the mappingsMatrix line format:
- Returns:
- true if successful, false otherwise
-
toString
This function prints out a description of the mapping between String keys and OSAR attributes -
getOSARAttr
-
hasRulesFor
- Returns:
- true if there are any mapping-rules (a layout) associated with the record type, false otherwise.
-
getOSAR
This function returns a new OSAR created from the layout associated with the specified record-type. -
getOSAR
This function returns a new OSAR created from the layout associated with the specified record-type. A callback may be passed in for evaluating custom function calls. -
getOSAR
This function returns a new OSAR created from the layout associated with the default record-type. -
error
-
warning
-
debug
-