public class COSAR extends java.lang.Object implements IAttrSource, DCFieldContainer
| Modifier and Type | Class and Description |
|---|---|
class |
COSAR.COSAREnum
Deprecated.
This class is used to enumerate the attributes
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_RECORD_TYPE
Deprecated.
This constant represents the default record type name.
|
protected int |
m_attrCount
Deprecated.
This member represents the current attribute count.
|
protected COSARAttr[] |
m_attrs
Deprecated.
This member is used to store the attributes in the right order.
|
protected java.util.HashMap |
m_map
Deprecated.
This member is used to store the OSAR attributes.
|
protected java.lang.String |
m_recordType
Deprecated.
This member represents the record type.
|
static java.lang.String |
RECORD_TYPE_ID
Deprecated.
This constant represents the field id in OSARs reserved
for the record type.
|
static java.lang.String |
RECORD_TYPE_NAME
Deprecated.
This constant represents the field id in OSARs reserved
for the record type.
|
| Constructor and Description |
|---|
COSAR()
Deprecated.
|
COSAR(java.lang.String recordType)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAttr(COSARAttr attr)
Deprecated.
|
boolean |
append(COSAR osar)
Deprecated.
This function is used to append another COSAR.
|
java.lang.Object |
clone()
Deprecated.
|
COSARAttr |
getAttr(java.lang.String key)
Deprecated.
|
COSAR.COSAREnum |
getEnum()
Deprecated.
|
DCField |
getField(FieldKey key)
Deprecated.
|
DCField |
getField(java.lang.String attrId)
Deprecated.
Retrieves field value with the specified id
|
byte[] |
getFieldValue(FieldKey key)
Deprecated.
|
byte[] |
getFieldValue(java.lang.String attrId)
Deprecated.
Retrieves field value with the specified id
|
OSAR |
getOSAR()
Deprecated.
This function returns the equivalent OSAR.
|
java.lang.String |
getRecordType()
Deprecated.
|
int |
getType(java.lang.String attrId)
Deprecated.
Retrieves the type of the value stored at the specified id
|
static COSARAttr |
newOSARAttr(OSARecAttr recAttr)
Deprecated.
This function builds a new COSARAttr based on a OSARecAttr
and returns it.
|
static COSARAttr |
newOSARAttr(java.lang.String id,
int type)
Deprecated.
This function builds a new COSARAttr based on the type
and returns it.
|
void |
removeAllAttrs()
Deprecated.
This function removes all attributes from the OSAR.
|
void |
setField(DCField field)
Deprecated.
Stores a given value at the specified id
|
void |
setField(FieldKey attrId,
int type,
byte[] value)
Deprecated.
|
void |
setField(int attrId,
int type,
byte[] value)
Deprecated.
Stores a given value at the specified id
|
void |
setField(java.lang.String attrId,
int type,
byte[] value)
Deprecated.
Stores a given value at the specified id
|
void |
setFromOSAR(OSAR osar)
Deprecated.
This function is used to set the COSAR based on the
contents of the OSAR.
|
void |
setRecordType(java.lang.String recordType)
Deprecated.
|
byte[] |
toByteArray()
Deprecated.
Converts the data contained in this object to a byte array
|
java.lang.String |
toString()
Deprecated.
Converts the data contained in this object to a String
|
public static final java.lang.String DEFAULT_RECORD_TYPE
public static final java.lang.String RECORD_TYPE_ID
public static final java.lang.String RECORD_TYPE_NAME
protected java.lang.String m_recordType
protected java.util.HashMap m_map
protected COSARAttr[] m_attrs
protected int m_attrCount
public COSAR(java.lang.String recordType)
throws java.lang.Exception
java.lang.Exceptionpublic COSAR()
throws java.lang.Exception
java.lang.Exceptionpublic final java.lang.String getRecordType()
public final COSAR.COSAREnum getEnum()
public final void setRecordType(java.lang.String recordType)
public COSARAttr getAttr(java.lang.String key)
getAttr in interface IAttrSourcepublic boolean addAttr(COSARAttr attr)
public void setFromOSAR(OSAR osar) throws java.lang.Exception
java.lang.Exceptionpublic boolean append(COSAR osar)
public OSAR getOSAR()
public void removeAllAttrs()
public static COSARAttr newOSARAttr(java.lang.String id, int type) throws java.lang.Exception
java.lang.Exceptionpublic static COSARAttr newOSARAttr(OSARecAttr recAttr) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toString()
DCFieldContainertoString in interface DCFieldContainertoString in class java.lang.Objectpublic final DCField getField(java.lang.String attrId)
DCFieldContainergetField in interface DCFieldContainerattrId - Identifier of the desired fieldpublic DCField getField(FieldKey key)
getField in interface DCFieldContainerpublic final byte[] getFieldValue(java.lang.String attrId)
DCFieldContainergetFieldValue in interface DCFieldContainerattrId - Identifier of the desired fieldpublic byte[] getFieldValue(FieldKey key)
getFieldValue in interface DCFieldContainerpublic final void setField(int attrId,
int type,
byte[] value)
DCFieldContainersetField in interface DCFieldContainerattrId - Numeric identifier for the fieldtype - Data type for the fieldvalue - Value to be stored in the given fieldpublic final void setField(java.lang.String attrId,
int type,
byte[] value)
DCFieldContainersetField in interface DCFieldContainerattrId - Identifier for the fieldtype - Data type for the fieldvalue - Value to be stored in the given fieldpublic void setField(FieldKey attrId, int type, byte[] value)
setField in interface DCFieldContainerpublic final void setField(DCField field)
DCFieldContainersetField in interface DCFieldContainerfield - The DCField object representing the field.public final int getType(java.lang.String attrId)
DCFieldContainergetType in interface DCFieldContainerattrId - Identifier of the fieldpublic final byte[] toByteArray()
DCFieldContainertoByteArray in interface DCFieldContainerpublic java.lang.Object clone()
clone in interface DCFieldContainerclone in class java.lang.Object