|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.cim.CIMElement
javax.cim.CIMClass
public class CIMClass
This class represents a CIM class as defined by the Distributed Management
Task Force (DMTF) CIM Infrastructure
Specification (DSP004). A CIMClass
has the following attributes:
null
if no superclass)
Constructor Summary | |
---|---|
CIMClass(CIMObjectPath pPath,
String pSuperClass,
CIMQualifier<?>[] pQualifiers,
CIMClassProperty<?>[] pProperties,
CIMMethod<?>[] pMethods,
boolean pIsAssociation,
boolean pIsKeyed)
Creates and instantiates a Java object representing a CIM Class. |
|
CIMClass(String pName,
String pSuperClass,
CIMQualifier<?>[] pQualifiers,
CIMClassProperty<?>[] pProperties,
CIMMethod<?>[] pMethods)
Creates and instantiates a Java object representing a CIM Class. |
Method Summary | |
---|---|
boolean |
equals(Object pObj)
Indicates whether the specified CIMClass is equal to this
CIMClass . |
CIMClass |
filterProperties(boolean pLocalOnly,
boolean pIncludeQualifiers,
boolean pIncludeClassOrigin,
String[] pPropertyList)
This method returns a new CIMClass with properties filtered
according to the input parameters. |
CIMClassProperty<?>[] |
getKeys()
Returns a list of key properties for this CIM class. |
CIMMethod<?> |
getMethod(int pIndex)
Get a method by index. |
CIMMethod<?> |
getMethod(String pName)
Returns the specified CIM method in this CIM class. |
CIMMethod<?> |
getMethod(String pName,
String pOriginClass)
Returns the CIM method specified by its name and optionally, its origin class. |
int |
getMethodCount()
Get the number of methods defined in this CIM class. |
CIMMethod<?>[] |
getMethods()
Get the CIM methods defined in this CIM class. |
CIMObjectPath |
getObjectPath()
This method returns the CIMObjectPath that represents this
CIM class. |
CIMClassProperty<?>[] |
getProperties()
Get the properties defined for this CIM class. |
CIMClassProperty<?> |
getProperty(int pIndex)
Get a class property by index. |
CIMClassProperty<?> |
getProperty(String pName)
Gets the specified property. |
CIMClassProperty<?> |
getProperty(String pName,
String pOriginClass)
Gets the specified property. |
int |
getPropertyCount()
Get the number of properties defined in this CIMClass . |
CIMQualifier<?> |
getQualifier(int pIndex)
Get a qualifier by index. |
CIMQualifier<?> |
getQualifier(String pName)
Gets a qualifier by name. |
int |
getQualifierCount()
Get the number of qualifiers defined in this CIM class. |
CIMQualifier<?>[] |
getQualifiers()
Returns the list of qualifiers for the CIM class. |
Object |
getQualifierValue(String pName)
Gets a qualifier value by name. |
String |
getSuperClassName()
Gets the name of the parent of this CIM class. |
boolean |
hasQualifier(String pName)
Checks whether the specified qualifier is one of the qualifiers in this CIM class. |
boolean |
hasQualifierValue(String pName,
Object pValue)
Checks whether the specified qualifier is one of the qualifiers defined for this class with the specified value. |
boolean |
isAssociation()
Identifies whether or not this CIM class is an association. |
boolean |
isKeyed()
Identifies whether or not this class is keyed. |
CIMInstance |
newInstance()
Returns a new CIM instance initialized with the default CIM properties, values and name of this CIM class. |
String |
toString()
Returns a String representation of the CIM class. |
Methods inherited from class javax.cim.CIMElement |
---|
compareTo, getName, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CIMClass(CIMObjectPath pPath, String pSuperClass, CIMQualifier<?>[] pQualifiers, CIMClassProperty<?>[] pProperties, CIMMethod<?>[] pMethods, boolean pIsAssociation, boolean pIsKeyed)
pIsAssociation
and
pIsKeyed
parameters. If an invalid value is supplied (i.e.
the class is an association, but the pIsAssociation
was set
to false
), it may or may not be corrected.
pPath
- Object Name of the CIM class.pSuperClass
- Name of the superclass.pQualifiers
- List of qualifiers of the CIM class.pProperties
- List of properties of the CIM class.pMethods
- List of methods of the CIM class.pIsAssociation
- true
if the CIM class is an Association,
false
otherwise.pIsKeyed
- true
if the CIM class has Keys,
false
otherwise.public CIMClass(String pName, String pSuperClass, CIMQualifier<?>[] pQualifiers, CIMClassProperty<?>[] pProperties, CIMMethod<?>[] pMethods)
pName
- Name of the CIM class.pSuperClass
- Name of the superclass.pQualifiers
- List of qualifiers of the CIM class.pProperties
- List of properties of the CIM class.pMethods
- List of methods of the CIM class.Method Detail |
---|
public boolean equals(Object pObj)
CIMClass
is equal to this
CIMClass
.
equals
in class CIMElement
pObj
- The CIMClass
object with which to compare.
true
if this object is the same as the
pObj
argument; false
otherwise.public CIMClass filterProperties(boolean pLocalOnly, boolean pIncludeQualifiers, boolean pIncludeClassOrigin, String[] pPropertyList)
CIMClass
with properties filtered
according to the input parameters. Inclusion of class origin and
qualifiers can also be controlled. Methods will not be included in the
class returned.
pLocalOnly
- If true
only the elements defined in this class
are included; otherwise all elements are included.pIncludeQualifiers
- If true
qualifiers are included on all elements;
otherwise no qualifiers are included.pIncludeClassOrigin
- If true
, the ClassOrigin attribute is included.pPropertyList
- If the PropertyList
input parameter is not
null
, the members of the array define one or more
Property names. The CIMClass
returned does not
include elements for any Properties missing from this list. If
the PropertyList
input parameter is an empty
array this signifies that no Properties are included in the
class returned. If the PropertyList
input
parameter is null
this specifies that all
Properties are included in the class returned. If the
PropertyList
contains duplicate elements or
invalid property names, they are ignored.
CIMClass
matching the requested criteria.public CIMClassProperty<?>[] getKeys()
public CIMMethod<?> getMethod(int pIndex) throws ArrayIndexOutOfBoundsException
pIndex
- The index of the method to retrieve.
CIMMethod
at the specified index.
ArrayIndexOutOfBoundsException
public CIMMethod<?> getMethod(String pName)
pName
- The string name of the method to retrieve. The name may be
specified in the form "originClass.methodName"
.
null
if the method does
not exist.public CIMMethod<?> getMethod(String pName, String pOriginClass)
pName
- The string name of the method to get.pOriginClass
- (Optional) The class in which the method was defined.
null
if the method does
not exist.public int getMethodCount()
public CIMMethod<?>[] getMethods()
public CIMObjectPath getObjectPath()
CIMObjectPath
that represents this
CIM class.
getObjectPath
in interface CIMNamedElementInterface
CIMObjectPath
that represents this CIM class.public CIMClassProperty<?>[] getProperties()
public CIMClassProperty<?> getProperty(int pIndex) throws ArrayIndexOutOfBoundsException
pIndex
- The index of the class property to retrieve.
CIMClassProperty
at the specified index.
ArrayIndexOutOfBoundsException
public CIMClassProperty<?> getProperty(String pName)
pName
- The text string for the name of the property.
null
if the property does
not exist.public CIMClassProperty<?> getProperty(String pName, String pOriginClass)
pName
- The string name of the property to get.pOriginClass
- (Optional) The string name of the class in which the property
was defined.
null
if the property does
not exist.public int getPropertyCount()
CIMClass
.
CIMClass
.public CIMQualifier<?> getQualifier(int pIndex) throws ArrayIndexOutOfBoundsException
getQualifier
in interface CIMQualifiedElementInterface
pIndex
- The index of the qualifier to retrieve.
ArrayIndexOutOfBoundsException
public CIMQualifier<?> getQualifier(String pName)
getQualifier
in interface CIMQualifiedElementInterface
pName
- The name of the qualifier to get.
null
if the qualifier
does not exist.public int getQualifierCount()
getQualifierCount
in interface CIMQualifiedElementInterface
public CIMQualifier<?>[] getQualifiers()
getQualifiers
in interface CIMQualifiedElementInterface
public Object getQualifierValue(String pName)
getQualifierValue
in interface CIMQualifiedElementInterface
pName
- The name of the qualifier to get.
null
if the qualifier does not exist or value is
null
, otherwise returns the reference to the
qualifier.public String getSuperClassName()
public boolean hasQualifier(String pName)
hasQualifier
in interface CIMQualifiedElementInterface
pName
- The name of the qualifier.
true
if the qualifier exists in this CIM class,
otherwise false
.public boolean hasQualifierValue(String pName, Object pValue)
false
if the qualifier is not applied or if the value does
not match.
hasQualifierValue
in interface CIMQualifiedElementInterface
pName
- The name of the qualifier.pValue
- The value to be tested.
true
if the qualifier exists and has the value,
otherwise false
.public boolean isAssociation()
true
if this CIM class is an association; otherwise,
false
.public boolean isKeyed()
true
if this CIM class has one or
more key properties. Otherwise, returns false
.
true
if this CIM class has a key property, otherwise
returns false
.public CIMInstance newInstance()
public String toString()
String
representation of the CIM class. 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 be null
.
toString
in class CIMElement
String
representation of this CIM class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |