edu.isi.pegasus.planner.namespace

## Class Stat

- java.lang.Object
- - edu.isi.pegasus.planner.namespace.Namespace
  - - edu.isi.pegasus.planner.namespace.Stat

    public class Stat
    extends Namespace

The stat namespace object.

Version:
  $Revision$
Author:
  Karan Vahi

### Nested Class Summary

### Nested classes/interfaces inherited from class edu.isi.pegasus.planner.namespace.Namespace

`Namespace.EmptyIterator`

### Field Summary

Fields
`protected java.lang.String` `mNamespace` The name of the implementing namespace.
`static java.lang.String` `NAMESPACE_NAME` The name of the namespace that this class implements.

### Fields inherited from class edu.isi.pegasus.planner.namespace.Namespace

`DEPRECATED_KEY, EMPTY_KEY, MALFORMED_KEY, mLogger, mProfileMap, NOT_PERMITTED_KEY, UNKNOWN_KEY, VALID_KEY, VERSION`

### Constructor Summary

Constructors
Constructor and Description
`Stat()` The default constructor.
`Stat(java.util.Map mp)` The overloaded constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `checkKey(java.lang.String key, java.lang.String value)` This checks whether the key passed by the user is valid in the current namespace or not.
`void` `checkKeyInNS(PegasusProperties properties, java.lang.String pool)` It puts in the namespace specific information specified in the properties file into the namespace.
`void` `checkKeyInNS(java.lang.String envString)` It takes in key=value pairs separated by a ; and puts them into the namespace after checking if they are valid or not.
`java.lang.Object` `clone()` Returns a copy of the current namespace object.
`void` `construct(java.lang.String key, java.lang.String value)` Constructs a new element of the format (key=value).
`java.lang.Object` `get(java.lang.Object key)` Returns the value to which this namespace maps the specified key.
`void` `merge(Namespace profiles)` Merge the profiles in the namespace in a controlled manner.
`java.lang.String` `namespaceName()` Returns the name of the namespace associated with the profile implementations.
`java.lang.String` `toCondor()` Converts the contents of the map into the string that can be put in the Condor file for printing.

### Methods inherited from class edu.isi.pegasus.planner.namespace.Namespace

`assimilate, checkKeyInNS, checkKeyInNS, checkKeyInNS, checkKeyInNS, checkKeyInNS, containsKey, deprecatedKey, deprecatedTable, emptyKey, getProfileKeyIterator, isEmpty, isNamespaceValid, keySet, malformedKey, notPermitted, removeKey, toString, unknownKey`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### NAMESPACE_NAME

    public static final java.lang.String NAMESPACE_NAME

The name of the namespace that this class implements.

See Also:
  Constant Field Values

#### mNamespace

    protected java.lang.String mNamespace

The name of the implementing namespace. It should be one of the valid namespaces always.

See Also:
  `Namespace.isNamespaceValid(String)`

### Constructor Detail

#### Stat

    public Stat()

The default constructor. Note that the map is not allocated memory at this stage. It is done so in the overloaded construct function.

#### Stat

    public Stat(java.util.Map mp)

The overloaded constructor.

Parameters:
  `mp` - map (possibly empty).

### Method Detail

#### get

    public java.lang.Object get(java.lang.Object key)

Returns the value to which this namespace maps the specified key. Returns null if the map contains no mapping for this key. A return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.

Overrides:
  `get` in class `Namespace`
Parameters:
  `key` - The key whose value you want.

#### namespaceName

    public java.lang.String namespaceName()

Returns the name of the namespace associated with the profile implementations.

Specified by:
  `namespaceName` in class `Namespace`
Returns:
  the namespace name.
See Also:
  `NAMESPACE_NAME`

#### construct

    public void construct(java.lang.String key,
                          java.lang.String value)

Constructs a new element of the format (key=value). It first checks if the map has been initialised or not. If not then allocates memory first.

Overrides:
  `construct` in class `Namespace`
Parameters:
  `key` - is the left-hand-side
  `value` - is the right hand side

#### checkKey

    public int checkKey(java.lang.String key,
                        java.lang.String value)

This checks whether the key passed by the user is valid in the current namespace or not. At present, for this namespace all the keys are construed as valid as long as the value passed is not null.

Specified by:
  `checkKey` in class `Namespace`
Parameters:
  `key` - (left hand side)
  `value` - (right hand side)
Returns:
  Namespace.VALID_KEY

#### checkKeyInNS

    public void checkKeyInNS(PegasusProperties properties,
                             java.lang.String pool)

It puts in the namespace specific information specified in the properties file into the namespace. The name of the pool is also passed, as many of the properties specified in the properties file are on a per pool basis.

Specified by:
  `checkKeyInNS` in class `Namespace`
Parameters:
  `properties` - the `PegasusProperties` object containing all the properties that the user specified at various places (like .chimerarc, properties file, command line).
  `pool` - the pool name where the job is scheduled to run.

#### checkKeyInNS

    public void checkKeyInNS(java.lang.String envString)

It takes in key=value pairs separated by a ; and puts them into the namespace after checking if they are valid or not.

Parameters:
  `envString` - the String containing the environment variables and their values separated by a semi colon.

#### merge

    public void merge(Namespace profiles)

Merge the profiles in the namespace in a controlled manner. In case of intersection, the new profile value overrides, the existing profile value.

Specified by:
  `merge` in class `Namespace`
Parameters:
  `profiles` - the `Namespace` object containing the profiles.

#### toCondor

    public java.lang.String toCondor()

Converts the contents of the map into the string that can be put in the Condor file for printing.

Specified by:
  `toCondor` in class `Namespace`
Returns:
  the textual description.

#### clone

    public java.lang.Object clone()

Returns a copy of the current namespace object.

Overrides:
  `clone` in class `Namespace`
Returns:
  the Cloned object