Sun WBEM SDK Developer's Guide

Example — Getting CIM Qualifiers

The code segment in Example 4–24 uses the CIMQualifier class to identify the CIM qualifiers in a vector of CIM elements. The example returns the property name, value, and type for each CIM Qualifier.

A qualifier flavor is a flag that governs the use of a qualifier. Flavors describe rules that specify whether a qualifier can be propagated to derived classes and instances and whether or not a derived class or instance can override the qualifier's original value.


Example 4–24 Getting CIM Qualifiers (CIMQualifier)

	{
    ...
    } else if (tableType == QUALIFIER_TABLE) {
		     CIMQualifier prop = (CIMQualifier)cimElements.elementAt(row);
		     if (prop != null) {
		         if (col == nameColumn) {
			       return prop.getName();
		      } else if (col == typeColumn) {
			        CIMValue cv = prop.getValue();
			    if (cv != null) {
			        return cv.getType().toString();
			    } else {
			        return "NULL";			
          }
	} 
...