com.tivoli.twg.dmi
Class DMIAttribute

java.lang.Object
  extended bycom.tivoli.twg.dmi.DMIAttribute

public class DMIAttribute
extends java.lang.Object

This class represents a DMI Attribute.

See Also:
MIF_Types, DMIAttributeValue, DMIEnumValues

Field Summary
static int MIF_COMMON
           
static int MIF_READ_ONLY
           
static int MIF_READ_WRITE
           
static int MIF_SPECIFIC
           
static int MIF_UNKNOWN_ACCESS
           
static int MIF_UNSUPPORTED
           
static int MIF_WRITE_ONLY
           
 
Constructor Summary
protected DMIAttribute()
           
  DMIAttribute(int AttrID, java.lang.String Name, java.lang.String Pragma, java.lang.String Description, byte Storage, byte Access, byte Type, int MaxSize, DMIEnumValues[] Enums)
          Construct a new DMI Attribute.
 
Method Summary
 byte GetAccess()
          Accessor for retrieving the Access type defined for this attribute.
 java.lang.String GetAccessAsString()
          Accessor method for returning the Access type as a keyword defined string.
static java.lang.String GetAccessString(byte Access)
          Static Method to convert an Access type identifier to the specification defined keyword it represents.
 byte GetDataType()
          Accessor method for returning the Data Type defined for this attribute.
 java.lang.String GetDataTypeAsString()
          This method returns a the type keyword string for this attribute.
static java.lang.String GetDataTypeString(byte Type)
          Static Method to convert a Data type identifier to the specification defined keyword it represents.
 java.lang.String GetDescription()
          Accessor method for retrieving the Attribute Description (optional)
 java.lang.String GetEnumString(int Index)
          Accessor method to get the String associated with a particular ID in an enumeration list, if an enumeration list is in fact present.
 DMIEnumValues[] GetEnumValueList()
          Accessor method for retrieving the enumeration list defined for this attribute, if one was in fact defined.
 int GetID()
          Accessor method for retrieving the Attribute ID
 int GetMaxSize()
          Accessor method for retrieving the maximum length allowed for this attributes value.
 java.lang.String GetName()
          Accessor method for retrieving the Attribute Name
 java.lang.String GetPragma()
          Accessor method for retrieving the Attribute Pragma (optional)
 byte GetStorage()
          Accessor method for retrieving the Storage type defined for this attribute.
 java.lang.String GetStorageAsString()
          Accessor method for returning the storage type as a keyword defined string.
static java.lang.String GetStorageString(byte Storage)
          Static Method to convert a storage type identifier to the specification defined keyword it represents.
 java.lang.String toString()
          Debug routine to dump the contents of the attribute as a displayable string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MIF_COMMON

public static final int MIF_COMMON
See Also:
Constant Field Values

MIF_SPECIFIC

public static final int MIF_SPECIFIC
See Also:
Constant Field Values

MIF_UNKNOWN_ACCESS

public static final int MIF_UNKNOWN_ACCESS
See Also:
Constant Field Values

MIF_READ_ONLY

public static final int MIF_READ_ONLY
See Also:
Constant Field Values

MIF_READ_WRITE

public static final int MIF_READ_WRITE
See Also:
Constant Field Values

MIF_WRITE_ONLY

public static final int MIF_WRITE_ONLY
See Also:
Constant Field Values

MIF_UNSUPPORTED

public static final int MIF_UNSUPPORTED
See Also:
Constant Field Values
Constructor Detail

DMIAttribute

protected DMIAttribute()

DMIAttribute

public DMIAttribute(int AttrID,
                    java.lang.String Name,
                    java.lang.String Pragma,
                    java.lang.String Description,
                    byte Storage,
                    byte Access,
                    byte Type,
                    int MaxSize,
                    DMIEnumValues[] Enums)
Construct a new DMI Attribute.

See Also:
MIF_Types, DMIAttributeValue, DMIEnumValues
Method Detail

GetID

public int GetID()
Accessor method for retrieving the Attribute ID

Returns:
int - Attribute ID

GetName

public java.lang.String GetName()
Accessor method for retrieving the Attribute Name

Returns:
String - Attribute Name

GetPragma

public java.lang.String GetPragma()
Accessor method for retrieving the Attribute Pragma (optional)

Returns:
String - Either the Pragma string if defined, or null

GetDescription

public java.lang.String GetDescription()
Accessor method for retrieving the Attribute Description (optional)

Returns:
String - Either the Description string, if present, or a null

GetStorage

public byte GetStorage()
Accessor method for retrieving the Storage type defined for this attribute.

Returns:
byte - either MIF_COMMON or MIF_SPECIFIC

GetStorageAsString

public java.lang.String GetStorageAsString()
Accessor method for returning the storage type as a keyword defined string.

Returns:
String - Keyword string

GetAccess

public byte GetAccess()
Accessor for retrieving the Access type defined for this attribute.

Returns:
byte - either: MIF_UNKNOWN_ACCESS, MIF_READ_ONLY, MIF_READ_WRITE, MIF_WRITE_ONLY, or MIF_UNSUPPORTED

GetAccessAsString

public java.lang.String GetAccessAsString()
Accessor method for returning the Access type as a keyword defined string.

Returns:
String - Keyword string.

GetDataType

public byte GetDataType()
Accessor method for returning the Data Type defined for this attribute.

Returns:
byte - either: MIF_COUNTER, MIF_COUNTER64, MIF_GAUGE, MIF_INTEGER, MIF_INTEGER64, MIF_OCTETSTRING, MIF_DISPLAYSTRING, or MIF_DATE

GetDataTypeAsString

public java.lang.String GetDataTypeAsString()
This method returns a the type keyword string for this attribute.

Returns:
String - keyword string

GetMaxSize

public int GetMaxSize()
Accessor method for retrieving the maximum length allowed for this attributes value.

Returns:
int - maximum length

GetEnumValueList

public DMIEnumValues[] GetEnumValueList()
Accessor method for retrieving the enumeration list defined for this attribute, if one was in fact defined.

Returns:
DMIEnumValues[] - either an array of DMIEnumValues or a null.
See Also:
DMIEnumValues

GetEnumString

public java.lang.String GetEnumString(int Index)
Accessor method to get the String associated with a particular ID in an enumeration list, if an enumeration list is in fact present.

Returns:
String - The appropriate string, or a null, if the ID is invalid, or there is no enumeration list for this attribute.
See Also:
DMIEnumValues

toString

public java.lang.String toString()
Debug routine to dump the contents of the attribute as a displayable string.

Returns:
String - Attribute contents.

GetStorageString

public static java.lang.String GetStorageString(byte Storage)
Static Method to convert a storage type identifier to the specification defined keyword it represents.

Returns:
String - Defined Storage Keyword, or null

GetAccessString

public static java.lang.String GetAccessString(byte Access)
Static Method to convert an Access type identifier to the specification defined keyword it represents.

Returns:
String - Defined Access Keyword, or null

GetDataTypeString

public static java.lang.String GetDataTypeString(byte Type)
Static Method to convert a Data type identifier to the specification defined keyword it represents.

Returns:
String - Defined Data Type Keyword, or null