Package com.nt.udc.io

Class COSAR

java.lang.Object
com.nt.udc.io.COSAR
All Implemented Interfaces:
IAttrSource, DCFieldContainer

@Deprecated public class COSAR extends Object implements IAttrSource, DCFieldContainer
Deprecated.
Must be migrated to NAR format
This class represents an OSAR. It implements IAttrSource and functions as a factory class for COSARAttr objects.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
    Deprecated.
    This class is used to enumerate the attributes
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    This constant represents the default record type name.
    protected int
    Deprecated.
    This member represents the current attribute count.
    protected COSARAttr[]
    Deprecated.
    This member is used to store the attributes in the right order.
    protected HashMap
    Deprecated.
    This member is used to store the OSAR attributes.
    protected String
    Deprecated.
    This member represents the record type.
    static final String
    Deprecated.
    This constant represents the field id in OSARs reserved for the record type.
    static final String
    Deprecated.
    This constant represents the field id in OSARs reserved for the record type.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
    COSAR(String recordType)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated.
     
    boolean
    append(COSAR osar)
    Deprecated.
    This function is used to append another COSAR.
    Deprecated.
     
    Deprecated.
     
    Deprecated.
     
    Deprecated.
     
    final DCField
    getField(String attrId)
    Deprecated.
    Retrieves field value with the specified id
    byte[]
    Deprecated.
     
    final byte[]
    Deprecated.
    Retrieves field value with the specified id
    Deprecated.
    This function returns the equivalent OSAR.
    final String
    Deprecated.
     
    final int
    getType(String attrId)
    Deprecated.
    Retrieves the type of the value stored at the specified id
    static COSARAttr
    Deprecated.
    This function builds a new COSARAttr based on a OSARecAttr and returns it.
    static COSARAttr
    newOSARAttr(String id, int type)
    Deprecated.
    This function builds a new COSARAttr based on the type and returns it.
    void
    Deprecated.
    This function removes all attributes from the OSAR.
    final void
    setField(int attrId, int type, byte[] value)
    Deprecated.
    Stores a given value at the specified id
    final void
    Deprecated.
    Stores a given value at the specified id
    void
    setField(FieldKey attrId, int type, byte[] value)
    Deprecated.
     
    final void
    setField(String attrId, int type, byte[] value)
    Deprecated.
    Stores a given value at the specified id
    void
    Deprecated.
    This function is used to set the COSAR based on the contents of the OSAR.
    final void
    setRecordType(String recordType)
    Deprecated.
     
    final byte[]
    Deprecated.
    Converts the data contained in this object to a byte array
    Deprecated.
    Converts the data contained in this object to a String

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_RECORD_TYPE

      public static final String DEFAULT_RECORD_TYPE
      Deprecated.
      This constant represents the default record type name.
      See Also:
    • RECORD_TYPE_ID

      public static final String RECORD_TYPE_ID
      Deprecated.
      This constant represents the field id in OSARs reserved for the record type.
      See Also:
    • RECORD_TYPE_NAME

      public static final String RECORD_TYPE_NAME
      Deprecated.
      This constant represents the field id in OSARs reserved for the record type.
      See Also:
    • m_recordType

      protected String m_recordType
      Deprecated.
      This member represents the record type.
    • m_map

      protected HashMap m_map
      Deprecated.
      This member is used to store the OSAR attributes.
    • m_attrs

      protected COSARAttr[] m_attrs
      Deprecated.
      This member is used to store the attributes in the right order.
    • m_attrCount

      protected int m_attrCount
      Deprecated.
      This member represents the current attribute count.
  • Constructor Details

  • Method Details

    • getRecordType

      public final String getRecordType()
      Deprecated.
    • getEnum

      public final COSAR.COSAREnum getEnum()
      Deprecated.
    • setRecordType

      public final void setRecordType(String recordType)
      Deprecated.
    • getAttr

      public COSARAttr getAttr(String key)
      Deprecated.
      Specified by:
      getAttr in interface IAttrSource
      Returns:
      An attribute computed based on the specified key.
    • addAttr

      public boolean addAttr(COSARAttr attr)
      Deprecated.
    • setFromOSAR

      public void setFromOSAR(OSAR osar) throws Exception
      Deprecated.
      This function is used to set the COSAR based on the contents of the OSAR.
      Throws:
      Exception
    • append

      public boolean append(COSAR osar)
      Deprecated.
      This function is used to append another COSAR.
      Returns:
      true if successful, false otherwise.
    • getOSAR

      public OSAR getOSAR()
      Deprecated.
      This function returns the equivalent OSAR.
    • removeAllAttrs

      public void removeAllAttrs()
      Deprecated.
      This function removes all attributes from the OSAR.
    • newOSARAttr

      public static COSARAttr newOSARAttr(String id, int type) throws Exception
      Deprecated.
      This function builds a new COSARAttr based on the type and returns it.
      Throws:
      Exception
    • newOSARAttr

      public static COSARAttr newOSARAttr(OSARecAttr recAttr) throws Exception
      Deprecated.
      This function builds a new COSARAttr based on a OSARecAttr and returns it.
      Throws:
      Exception
    • toString

      public String toString()
      Deprecated.
      Description copied from interface: DCFieldContainer
      Converts the data contained in this object to a String
      Specified by:
      toString in interface DCFieldContainer
      Overrides:
      toString in class Object
      Returns:
      String representation of the data
    • getField

      public final DCField getField(String attrId)
      Deprecated.
      Description copied from interface: DCFieldContainer
      Retrieves field value with the specified id
      Specified by:
      getField in interface DCFieldContainer
      Parameters:
      attrId - Identifier of the desired field
      Returns:
      The DCField object that represents the field
    • getField

      public DCField getField(FieldKey key)
      Deprecated.
      Specified by:
      getField in interface DCFieldContainer
    • getFieldValue

      public final byte[] getFieldValue(String attrId)
      Deprecated.
      Description copied from interface: DCFieldContainer
      Retrieves field value with the specified id
      Specified by:
      getFieldValue in interface DCFieldContainer
      Parameters:
      attrId - Identifier of the desired field
      Returns:
      the bytes that represent the field value
    • getFieldValue

      public byte[] getFieldValue(FieldKey key)
      Deprecated.
      Specified by:
      getFieldValue in interface DCFieldContainer
    • setField

      public final void setField(int attrId, int type, byte[] value)
      Deprecated.
      Description copied from interface: DCFieldContainer
      Stores a given value at the specified id
      Specified by:
      setField in interface DCFieldContainer
      Parameters:
      attrId - Numeric identifier for the field
      type - Data type for the field
      value - Value to be stored in the given field
    • setField

      public final void setField(String attrId, int type, byte[] value)
      Deprecated.
      Description copied from interface: DCFieldContainer
      Stores a given value at the specified id
      Specified by:
      setField in interface DCFieldContainer
      Parameters:
      attrId - Identifier for the field
      type - Data type for the field
      value - Value to be stored in the given field
    • setField

      public void setField(FieldKey attrId, int type, byte[] value)
      Deprecated.
      Specified by:
      setField in interface DCFieldContainer
    • setField

      public final void setField(DCField field)
      Deprecated.
      Description copied from interface: DCFieldContainer
      Stores a given value at the specified id
      Specified by:
      setField in interface DCFieldContainer
      Parameters:
      field - The DCField object representing the field.
    • getType

      public final int getType(String attrId)
      Deprecated.
      Description copied from interface: DCFieldContainer
      Retrieves the type of the value stored at the specified id
      Specified by:
      getType in interface DCFieldContainer
      Parameters:
      attrId - Identifier of the field
      Returns:
      int value, representing the type
    • toByteArray

      public final byte[] toByteArray()
      Deprecated.
      Description copied from interface: DCFieldContainer
      Converts the data contained in this object to a byte array
      Specified by:
      toByteArray in interface DCFieldContainer
      Returns:
      byte[] representation of the data
    • clone

      public Object clone()
      Deprecated.
      Specified by:
      clone in interface DCFieldContainer
      Overrides:
      clone in class Object