|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sblim.wbem.cim.CIMObjectPath
public class CIMObjectPath
Points to the specified CIM Class or CIM Instance. The object path is a reference to a CIM Object, denoted by a host, namespace, object name, and keys (if the object is an instance). The namespace is handle in an absolute form with respect to the default namespace define for the CIMClient at the moment of its construction. root/lsissi:LSISSI_StorageSystem.Name="TheComputer",CreationClassName="LSISSI_StorageSystem" The namespace associated with it is root/lsissi. The classname associated with the object path is LSISSI_StorageSystem This object is uniquely identified by two key property values: Name="TheComputer" CreationClassName="LSISSI_StorageSystem" Note: host information is maintained, but is upto the application to resolve its address.
Field Summary | |
---|---|
protected java.lang.String |
iToString
|
Constructor Summary | |
---|---|
CIMObjectPath()
Constructs a CIMObjectPath. |
|
CIMObjectPath(java.lang.String pClassName)
Constructs a CIMObjectPath pointing to the specified ClassName. |
|
CIMObjectPath(java.lang.String pClassName,
java.lang.String pNamespace)
Constructs a CIMObjectPath with the specified ClassName, on the defined namespace. |
|
CIMObjectPath(java.lang.String pClassName,
java.util.Vector pKeyValuePairs)
Constructs a CIMObjectPath with the specified CIM ClassName and the set of key values. |
Method Summary | |
---|---|
void |
addKey(CIMProperty pProperty)
Adds the specified CIMProperty object as part of the keys. |
void |
addKey(java.lang.String pPropertyName,
CIMValue pValue)
Add a new key to the property list |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
|
boolean |
equals(java.lang.Object pObject,
boolean pIgnoreClassOrigin)
Compares this object with the specified object for equality. |
java.lang.String |
getHost()
Returns the host of the current object path. |
CIMProperty |
getKey(java.lang.String pPropertyName)
Returns a keyed CIMProperty with the specified name. |
java.util.Vector |
getKeys()
Returns an vector with all the key properties from the CIMObjectPath. |
java.lang.String |
getNameSpace()
Returns the namespace from this CIMObjectPath. |
java.lang.String |
getObjectName()
Returns the object name to which this object path points.The object name is a CIMClass name. |
int |
hashCode()
|
static void |
main(java.lang.String[] args)
|
static CIMObjectPath |
parse(java.lang.String pObjectPath)
Deprecated. |
void |
removeAllKeys()
Removes all the key from this CIMObjectPath. |
void |
removeKey(java.lang.String pPropertyName)
Removes the specified key from this CIMObjectPath. |
void |
setHost(java.lang.String pHost)
Specifies the host name. |
void |
setKeys(java.util.Vector pKeys)
Sets the key properties for this CIMObjectPath. |
void |
setNameSpace(CIMNameSpace pNamespace)
Specifies the namespace for this CIMObjectPath. |
protected void |
setNamespace(java.lang.String pNamespace)
|
void |
setNameSpace(java.lang.String pNamespace)
Specifies the namespace for this CIMObjectPath. |
void |
setObjectName(java.lang.String pName)
Specifies the object name for this CIMObjectPath. |
java.lang.String |
toString()
|
java.lang.String |
toString(boolean pIncludeHostname)
Returns the string representation of an object path. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String iToString
Constructor Detail |
---|
public CIMObjectPath()
public CIMObjectPath(java.lang.String pClassName)
pClassName
- public CIMObjectPath(java.lang.String pClassName, java.lang.String pNamespace) throws CIMException
pClassName
- a String representing the CIM ClassName.pNamespace
- a String which represents the namespace. Only forward slashes
('/') are allowed on the namespace. The namespace should not
start or end with a '/', it will be automatically removed. As
a result a namespace like "/root/cimv2", will result on
"root/cimv2", and "/" would be translated into an empty
namespace ("")
Empty namespaces are handled as null namespace. Which in turn are
replaced by the default namespace (assigned to the CIM client during its
contruction) when operations are performed on objects with null
namespaces.
CIMException
- CIM_ERR_INVALID_PARAMETER if a namespace is constructed with
'\'.public CIMObjectPath(java.lang.String pClassName, java.util.Vector pKeyValuePairs)
pClassName
- a String representing the ClassName.pKeyValuePairs
- a Vector containing CIMProperties objects representing the
keys for this CIMObjectPath.Method Detail |
---|
protected void setNamespace(java.lang.String pNamespace)
public void addKey(java.lang.String pPropertyName, CIMValue pValue)
pPropertyName
- pValue
- public void addKey(CIMProperty pProperty)
pProperty
- public void removeAllKeys()
public void removeKey(java.lang.String pPropertyName)
pPropertyName
- a String representing the key name.public java.lang.Object clone()
clone
in class java.lang.Object
public static CIMObjectPath parse(java.lang.String pObjectPath)
pObjectPath
- a string with the following format
//hostname/namespace_level1/namespace_level2/ClassName.key1="value1"[,key2="value2"] *
for example
//localhost/root/cimv2/CIM_ComputerSystem.Name="MyComputer"
Note that values can represent CIM ObjectPath as well. Key
values are represented
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean equals(java.lang.Object pObject, boolean pIgnoreClassOrigin)
pObject
- The other objectpIgnoreClassOrigin
- if true
the class origin is ignored
true
if pObject is equal to this
,
false
otherwisepublic java.lang.String getHost()
public CIMProperty getKey(java.lang.String pPropertyName)
pPropertyName
- The name of the key property
public java.util.Vector getKeys()
public java.lang.String getNameSpace()
public void setNameSpace(CIMNameSpace pNamespace)
pNamespace
- The namespacepublic java.lang.String getObjectName()
public void setHost(java.lang.String pHost)
pHost
- The host namepublic void setNameSpace(java.lang.String pNamespace)
pNamespace
- The namespacepublic void setObjectName(java.lang.String pName)
pName
- The object namepublic void setKeys(java.util.Vector pKeys)
pKeys
- a vector containing CIMProperties.
java.lang.IllegalArgumentException
- if any of the elements within the vector is not a CIMPropertypublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean pIncludeHostname)
pIncludeHostname
- specifies if host information should be included
public int hashCode()
hashCode
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |