Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.wbem.cim
Class CIMObjectPath

    java.lang.Object
      |
      +--com.sun.wbem.cim.CIMObjectPath

public class CIMObjectPath
extends java.lang.Object
implements java.io.Serializable

Path to the specified CIM class or CIM instance or CIM qualifier. The CIM object path is a reference to CIM elements. It is only valid in context of an active connection to a CIM object manager on a host. In order to uniquely identify a given object on a host, it includes the namespace, object name, and keys (if the object is an instance). The namespace is taken to be relative to the namespace that the CIMClient is currently connected to. A key is a property or set of properties used to uniquely identify an instance of a class. Key properties are marked with the KEY qualifier.

For example, the object path:

`\\myserver\Root\cimv2\Solaris_ComputerSystem.Name=mycomputer: CreationClassName=Solaris_ComputerSystem`

has two parts:

- `\\myserver\Root\cimv2` - The default CIM namespace on host `myserver`.
- `Solaris_ComputerSystem.Name=mycomputer, CreationClassName=Solaris_ComputerSystem` - A specific Solaris Computer System object in the default namespace on host `myserver`. This Solaris computer system is uniquely identified by two key property values in the format (key property = value):

- Name=mycomputer
- CreationClassName=Solaris_ComputerSystem

Since:
  WBEM 1.0
See Also:
  Serialized Form

Constructor Summary
`CIMObjectPath()` Constructs a default CIM Object Path with empty namespace, objectName and keys.
`CIMObjectPath(java.lang.String elementName)` Constructs a CIM Object Path referencing an object.
`CIMObjectPath(java.lang.String elementName, java.lang.String nameSpace)` Constructs a CIM Object Path referencing an object in the current namespace or the specified relative namespace.
`CIMObjectPath(java.lang.String objectName, java.util.Vector keys)` Constructs a CIM Object Path referencing the instance identified by the key values contained in the vector.

Method Summary
`void` | `addKey(java.lang.String name, CIMValue value)` Adds a Key to the object path.
`boolean` | `equals(java.lang.Object o)` Compares this object path with the specified object path for equality
`boolean` | `equals(java.lang.Object o, boolean ignoreClassOrigin)` Compares this object path with the specified object path for equality
`java.lang.String` | `getHost()` Gets the host for this CIMObjectPath.
`java.util.Vector` | `getKeys()` Gets the keys for this CIMObjectPath object.
`java.lang.String` | `getNameSpace()` Gets the namespace for this CIMObjectPath.
`java.lang.String` | `getObjectName()` Gets the object name for this CIMObjectPath.
`int` | `hashCode()` Computes the hash code for this object path.
`void` | `parse(java.lang.String p)` Parses the specified object name string by replacing each forward slash character (/) with an escaped backward slash character (\\).
`void` | `setHost(java.lang.String host)` Sets the host for this CIMObjectPath object.
`void` | `setKeys(java.util.Vector v)` Sets the keys for this CIMObjectPath.
`void` | `setNameSpace(java.lang.String ns)` Sets the namespace for this CIMObjectPath object.
`void` | `setObjectName(java.lang.String op)` Sets the object name for this CIMObjectPath.
`java.lang.String` | `toString()` Returns a String representation of the CIMObjectPath.
`java.lang.String` | `toXml()` Returns an XML representation of this CIM object path.

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CIMObjectPath

    public CIMObjectPath()

  Constructs a default CIM Object Path with empty namespace, objectName and keys.

### CIMObjectPath

    public CIMObjectPath(java.lang.String elementName)

  Constructs a CIM Object Path referencing an object. The namespace is empty and the object accessed should be present in the namespace that the client application has connected to through CIMClient.
  Parameters:
    `elementName` - the string for the name of a CIM element.

### CIMObjectPath

    public CIMObjectPath(java.lang.String elementName,
                         java.lang.String nameSpace)

  Constructs a CIM Object Path referencing an object in the current namespace or the specified relative namespace.
  Parameters:
    `objectName` - the name of a CIM element.
    `nameSpace` - the namespace relative to the current namespace.

### CIMObjectPath

    public CIMObjectPath(java.lang.String objectName,
                         java.util.Vector keys)

  Constructs a CIM Object Path referencing the instance identified by the key values contained in the vector.
  Parameters:
    `objectName` - the name of the class the instance belongs to.
    `keys` - vector of CIMProperty. The keys of the instance instantiated with key values.

Method Detail

### addKey

    public void addKey(java.lang.String name,
                       CIMValue value)

  Adds a Key to the object path.
  Parameters:
    `name` - name of the key property
    `value` - the CIMValue of the key property

### getKeys

    public java.util.Vector getKeys()

  Gets the keys for this CIMObjectPath object.
  Returns:
    Vector Vector of CIMProperty.

### setKeys

    public void setKeys(java.util.Vector v)

  Sets the keys for this CIMObjectPath.
  Parameters:
    `v` - vector of CIMProperty.

### getNameSpace

    public java.lang.String getNameSpace()

  Gets the namespace for this CIMObjectPath.
  Returns:
    String name of the namespace

### getHost

    public java.lang.String getHost()

  Gets the host for this CIMObjectPath.
  Returns:
    String name of the host

### getObjectName

    public java.lang.String getObjectName()

  Gets the object name for this CIMObjectPath. Depending on the type of reference, this object name can be either a class name or a qualifier type name.
  Returns:
    String name of this object

### parse

    public void parse(java.lang.String p)

  Parses the specified object name string by replacing each forward slash character (/) with an escaped backward slash character (\\).
  Parameters:
    `p` - String name of this object

### setHost

    public void setHost(java.lang.String host)

  Sets the host for this CIMObjectPath object.
  Parameters:
    `host` - name of the host

### setNameSpace

    public void setNameSpace(java.lang.String ns)

  Sets the namespace for this CIMObjectPath object.
  Parameters:
    `ns` - string name of the namespace

### setObjectName

    public void setObjectName(java.lang.String op)

  Sets the object name for this CIMObjectPath. Depending on the type of reference, this object name can be either a class name or a qualifier type name.
  Parameters:
    `op` - name of this object

### toString

    public java.lang.String toString()

  Returns a String representation of the CIMObjectPath. 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.
  Overrides:
    toString in class java.lang.Object
  Returns:
    string representation of this object path

### hashCode

    public int hashCode()

  Computes the hash code for this object path.
  Overrides:
    hashCode in class java.lang.Object
  Returns:
    int the integer representing the hash code for this object path.

### equals

    public boolean equals(java.lang.Object o)

  Compares this object path with the specified object path for equality
  Overrides:
    equals in class java.lang.Object
  Parameters:
    `o` - the object to compare
  Returns:
    boolean true if the specified path references the same object Otherwise, false.

### equals

    public boolean equals(java.lang.Object o,
                          boolean ignoreClassOrigin)

  Compares this object path with the specified object path for equality
  Parameters:
    `o` - the object to compare
    `ignoreClassOrigin` - ignores the Class origins if true.
  Returns:
    boolean true if the specified path references the same object Otherwise, false.

### toXml

    public java.lang.String toXml()
                           throws CIMException

  Returns an XML representation of this CIM object path.
  Returns:
    An XML representation of this CIM object path.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD