Package javax.cim
Class CIMDataType
java.lang.Object
javax.cim.CIMDataType
- All Implemented Interfaces:
Serializable
This class represents a CIM data type as defined by the Distributed
Management Task Force (DMTF) CIM
Infrastructure Specification (DSP004). The specification only allows a set number of data types. This
class defines the mapping of CIM data types to Java objects.
Note: CIM allows the fixed size of an array as part of the data type. The predefined classes are unbounded.
The following table shows the mapping of CIM data type to Java.
Note: CIM allows the fixed size of an array as part of the data type. The predefined classes are unbounded.
The following table shows the mapping of CIM data type to Java.
CIM Data Type | Java Representation |
---|---|
uint8 | UnsignedInteger8 |
sint8 | Byte |
uint16 | UnsignedInteger16 |
sint16 | Short |
uint32 | UnsignedInteger32 |
sint32 | Integer |
uint64 | UnsignedInteger64 |
sint64 | Long |
string | String |
boolean | Boolean |
real32 | Float |
real64 | Double |
datetime | CIMDataTimeAbsolute CIMDataTimeInterval |
<classname> ref | CIMObjectPath |
char16 | Character |
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Booleanstatic final CIMDataType
Boolean unbounded array data typestatic final CIMDataType
Boolean data typestatic final int
16-bit UCS-2 characterstatic final CIMDataType
16-bit UCS-2 character unbounded Array typestatic final CIMDataType
16-bit UCS-2 character data typestatic final int
CIMClass typestatic final CIMDataType
CIMClass unbounded Array typestatic final CIMDataType
CIMClass typestatic final int
A string containing the date-timestatic final CIMDataType
A date-time unbounded array data typestatic final CIMDataType
A date-time data typestatic final int
Invalid typestatic final CIMDataType
Invalid data typestatic final int
Null typestatic final int
CIMInstance typestatic final CIMDataType
CIMInstance unbounded Array typestatic final CIMDataType
CIMInstance type data type (Note: For CIMV2, this can only be used when the property has either an EmbeddedInstance or EmbeddedObject qualifier)static final int
IEEE 4-byte floating-pointstatic final CIMDataType
IEEE 4-byte floating-point unbounded array data typestatic final CIMDataType
IEEE 4-byte floating-point data typestatic final int
IEEE 8-byte floating-pointstatic final CIMDataType
IEEE 8-byte floating-point unbounded array data typestatic final CIMDataType
IEEE 8-byte floating-point data typestatic final int
Reference typestatic final int
Signed 16-bit integerstatic final CIMDataType
Signed 16-bit integer unbounded array data typestatic final CIMDataType
Signed 16-bit integer data typestatic final int
Signed 32-bit integerstatic final CIMDataType
Signed 32-bit integer unbounded array data typestatic final CIMDataType
Signed 32-bit integer data typestatic final int
Signed 64-bit integerstatic final CIMDataType
Signed 64-bit integer unbounded array data typestatic final CIMDataType
Signed 64-bit integer data typestatic final int
Signed 8-bit integerstatic final CIMDataType
Signed 8-bit integer unbounded array data typestatic final CIMDataType
Signed 8-bit integer data typestatic final int
UCS-2 stringstatic final CIMDataType
UCS-2 string unbounded array data typestatic final CIMDataType
UCS-2 string data typestatic final int
Unsigned 16-bit integerstatic final CIMDataType
Unsigned 16-bit integer unbounded array data typestatic final CIMDataType
Unsigned 16-bit integer data typestatic final int
Unsigned 32-bit integerstatic final CIMDataType
Unsigned 32-bit integer unbounded array data typestatic final CIMDataType
Unsigned 32-bit integer data typestatic final int
Unsigned 64-bit integerstatic final CIMDataType
Unsigned 64-bit integer unbounded array data typestatic final CIMDataType
Unsigned 64-bit integer data typestatic final int
Unsigned 8-bit integerstatic final CIMDataType
Unsigned 8-bit integer unbounded array data typestatic final CIMDataType
Unsigned 8-bit integer data type -
Constructor Summary
ConstructorsConstructorDescriptionCIMDataType
(int pType, int pSize) Constructs aCIMDataType
array object of the specified type and size.CIMDataType
(String pClassName) Creates a new CIM REFERENCE data type object with the specified class reference.CIMDataType
(String pClassName, int pSize) Creates a new CIM REFERENCE array data type object with the specified class reference. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks that the specifiedCIMDataType
is equal to thisCIMDataType
.static final CIMDataType
getDataType
(Object pObj) Get the data type of an object.Returns the class name of the CIM REFERENCE data type.int
getSize()
Returns the size of the maximum number of elements an array data type may hold.int
getType()
Returns the data type.boolean
isArray()
Checks if the data type is an array type.toString()
Returns aString
representation of theCIMDataType
.
-
Field Details
-
BOOLEAN
public static final int BOOLEANBoolean- See Also:
-
BOOLEAN_ARRAY_T
Boolean unbounded array data type- See Also:
-
BOOLEAN_T
Boolean data type- See Also:
-
CHAR16
public static final int CHAR1616-bit UCS-2 character- See Also:
-
CHAR16_ARRAY_T
16-bit UCS-2 character unbounded Array type- See Also:
-
CHAR16_T
16-bit UCS-2 character data type- See Also:
-
CLASS
public static final int CLASSCIMClass type- See Also:
-
CLASS_ARRAY_T
CIMClass unbounded Array type- See Also:
-
CLASS_T
CIMClass type- See Also:
-
DATETIME
public static final int DATETIMEA string containing the date-time- See Also:
-
DATETIME_ARRAY_T
A date-time unbounded array data type- See Also:
-
DATETIME_T
A date-time data type- See Also:
-
INVALID
public static final int INVALIDInvalid type- See Also:
-
INVALID_T
Invalid data type -
NULL
public static final int NULLNull type- See Also:
-
OBJECT
public static final int OBJECTCIMInstance type- See Also:
-
OBJECT_ARRAY_T
CIMInstance unbounded Array type- See Also:
-
OBJECT_T
CIMInstance type data type (Note: For CIMV2, this can only be used when the property has either an EmbeddedInstance or EmbeddedObject qualifier)- See Also:
-
REAL32
public static final int REAL32IEEE 4-byte floating-point- See Also:
-
REAL32_ARRAY_T
IEEE 4-byte floating-point unbounded array data type- See Also:
-
REAL32_T
IEEE 4-byte floating-point data type- See Also:
-
REAL64
public static final int REAL64IEEE 8-byte floating-point- See Also:
-
REAL64_ARRAY_T
IEEE 8-byte floating-point unbounded array data type- See Also:
-
REAL64_T
IEEE 8-byte floating-point data type- See Also:
-
REFERENCE
public static final int REFERENCEReference type- See Also:
-
SINT16
public static final int SINT16Signed 16-bit integer- See Also:
-
SINT16_ARRAY_T
Signed 16-bit integer unbounded array data type- See Also:
-
SINT16_T
Signed 16-bit integer data type- See Also:
-
SINT32
public static final int SINT32Signed 32-bit integer- See Also:
-
SINT32_ARRAY_T
Signed 32-bit integer unbounded array data type- See Also:
-
SINT32_T
Signed 32-bit integer data type- See Also:
-
SINT64
public static final int SINT64Signed 64-bit integer- See Also:
-
SINT64_ARRAY_T
Signed 64-bit integer unbounded array data type- See Also:
-
SINT64_T
Signed 64-bit integer data type- See Also:
-
SINT8
public static final int SINT8Signed 8-bit integer- See Also:
-
SINT8_ARRAY_T
Signed 8-bit integer unbounded array data type- See Also:
-
SINT8_T
Signed 8-bit integer data type- See Also:
-
STRING
public static final int STRINGUCS-2 string- See Also:
-
STRING_ARRAY_T
UCS-2 string unbounded array data type- See Also:
-
STRING_T
UCS-2 string data type- See Also:
-
UINT16
public static final int UINT16Unsigned 16-bit integer- See Also:
-
UINT16_ARRAY_T
Unsigned 16-bit integer unbounded array data type- See Also:
-
UINT16_T
Unsigned 16-bit integer data type- See Also:
-
UINT32
public static final int UINT32Unsigned 32-bit integer- See Also:
-
UINT32_ARRAY_T
Unsigned 32-bit integer unbounded array data type- See Also:
-
UINT32_T
Unsigned 32-bit integer data type- See Also:
-
UINT64
public static final int UINT64Unsigned 64-bit integer- See Also:
-
UINT64_ARRAY_T
Unsigned 64-bit integer unbounded array data type- See Also:
-
UINT64_T
Unsigned 64-bit integer data type- See Also:
-
UINT8
public static final int UINT8Unsigned 8-bit integer- See Also:
-
UINT8_ARRAY_T
Unsigned 8-bit integer unbounded array data type- See Also:
-
UINT8_T
Unsigned 8-bit integer data type- See Also:
-
-
Constructor Details
-
CIMDataType
Constructs aCIMDataType
array object of the specified type and size. This should only be used when the size is being limited/defined as part of the data type.- Parameters:
pType
- The data type as defined in the CIM class.pSize
- The maximum number of elements in the array.- Throws:
IllegalArgumentException
- If thepSize
value specified is not a positive integer.
-
CIMDataType
Creates a new CIM REFERENCE data type object with the specified class reference.- Parameters:
pClassName
- The CIM class reference name.- Throws:
IllegalArgumentException
- If thepClassName
isnull
.
-
CIMDataType
Creates a new CIM REFERENCE array data type object with the specified class reference.- Parameters:
pClassName
- The CIM class reference name.pSize
- The size of the array. 0 indicates the array is unbounded.- Throws:
IllegalArgumentException
- If thepClassName
isnull
.
-
-
Method Details
-
equals
Checks that the specifiedCIMDataType
is equal to thisCIMDataType
. -
getDataType
Get the data type of an object.- Parameters:
pObj
- The object whose data type is to be returned.- Returns:
- The data type of the specified object.
- Throws:
IllegalArgumentException
- IfpObj
is not a valid CIM Type.
-
getRefClassName
Returns the class name of the CIM REFERENCE data type.- Returns:
- The CIM REFERENCE class name.
-
getSize
public int getSize()Returns the size of the maximum number of elements an array data type may hold.- Returns:
- The maximum size of the array data type.
-
getType
public int getType()Returns the data type.- Returns:
- The data type.
-
isArray
public boolean isArray()Checks if the data type is an array type.- Returns:
true
if the data type is an array type,false
otherwise.
-
toString
Returns aString
representation of theCIMDataType
. This method is intended to be used only for debugging purposes, and the format of the returned string may vary between implementations. The returned string may be empty but may not benull
.
-