| java.lang.Object org.griphyn.cPlanner.classes.Data org.griphyn.cPlanner.namespace.Namespace
All known Subclasses: org.griphyn.cPlanner.namespace.VDS, org.griphyn.cPlanner.namespace.Globus, org.griphyn.cPlanner.namespace.ENV, org.griphyn.cPlanner.namespace.Hints, org.griphyn.cPlanner.namespace.Condor, org.griphyn.cPlanner.namespace.Dagman,
Namespace | abstract public class Namespace extends Data (Code) | | The base namespace class that all the othernamepsace handling classes extend.
Some constants are defined.
author: Karan Vahi author: Gaurang Mehta version: $Revision: 50 $ |
Inner Class :protected class EmptyIterator implements Iterator | |
Field Summary | |
final public static int | DEPRECATED_KEY The key is deprecated. | final public static int | MALFORMED_KEY Either the key or the value specified is null or malformed. | final public static int | NOT_PERMITTED_KEY The key is not permitted in as it clashes with default Pegasus constructs. | final public static int | UNKNOWN_KEY The key is unknown. | final public static int | VALID_KEY The key is a valid key and can be put in the profiles. | final public static String | VERSION The version number associated with this API of Profile Namespaces. | protected Map | mProfileMap The Map object that contains the profiles for a particular namespace.
The Map is indexed by profile key. |
Method Summary | |
abstract public int | checkKey(String key, String value) This checks the whether a key value pair specified is valid in the current
namespace or not, and whether it clashes with other key value pairs that
might have been set by Pegasus internally. | public void | checkKeyInNS(TransformationCatalogEntry entry) It puts in the namespace specific information from the Transformation
Catalog into the namespace. | public void | checkKeyInNS(Profile profile) It takes in a Profiles object and puts them into the namespace after
checking if the namespace in the Profile object is same as the namepsace
implementation. | public void | checkKeyInNS(List vars) It takes in a list of profiles and puts them into the namespace after
checking if they are valid or not. | abstract public void | checkKeyInNS(PegasusProperties properties, String pool) It puts in the namespace specific information specified in the properties
file into the namespace. | public void | checkKeyInNS(String key, String value) This checks the whether a key value pair specified is valid in the current
namespace or not by calling the checkKey function and then on the basis of
the values returned puts them into the associated map in the class. | public void | construct(String key, String value) Constructs a new element of the format (key=value). | public boolean | containsKey(Object key) Returns true if the namespace contains a mapping for the specified key. | public void | deprecatedKey(String key, String value) Warns about a deprecated profile key. | public Map | deprecatedTable() Singleton access to the deprecated table that holds the deprecated keys,
and the keys that replace them. | public Object | get(Object key) Returns the value to which this namespace maps the specified key.
Returns null if the map contains no mapping for this key. | public Iterator | getProfileKeyIterator() Provides an iterator to traverse the profiles by their keys. | public static boolean | isNamespaceValid(String namespace) Checks if the namespace specified is valid or not. | public Set | keySet() Returns the key set associated with the namespace. | public void | malformedKey(String key, String value) Warns about a namespace profile key-value pair that is malformed. | abstract public void | merge(Namespace profiles) Merge the profiles in the namespace in a controlled manner. | abstract public String | namespaceName() Returns the name of the namespace associated with the profile implementations. | public void | notPermitted(String key) Warns about a namespace profile key that cannot be permitted. | public Object | removeKey(Object key) Removes the key from the namespace.
Parameters: key - The key you want to remove. | public void | unknownKey(String key, String value) Warns about an unknown profile key and constructs it anyway. |
DEPRECATED_KEY | final public static int DEPRECATED_KEY(Code) | | The key is deprecated. Support is for a limited time.
|
MALFORMED_KEY | final public static int MALFORMED_KEY(Code) | | Either the key or the value specified is null or malformed.
|
NOT_PERMITTED_KEY | final public static int NOT_PERMITTED_KEY(Code) | | The key is not permitted in as it clashes with default Pegasus constructs.
|
UNKNOWN_KEY | final public static int UNKNOWN_KEY(Code) | | The key is unknown. Upto the profile namespace implementation whether to
use it or not.
|
VALID_KEY | final public static int VALID_KEY(Code) | | The key is a valid key and can be put in the profiles.
|
VERSION | final public static String VERSION(Code) | | The version number associated with this API of Profile Namespaces.
|
mProfileMap | protected Map mProfileMap(Code) | | The Map object that contains the profiles for a particular namespace.
The Map is indexed by profile key. Each value, is a profile value.
|
checkKey | abstract public int checkKey(String key, String value)(Code) | | This checks the whether a key value pair specified is valid in the current
namespace or not, and whether it clashes with other key value pairs that
might have been set by Pegasus internally.
MALFORMED_KEYVALID_KEYUNKNOWN_KEYNOT_PERMITTED_KEY |
checkKeyInNS | public void checkKeyInNS(TransformationCatalogEntry entry)(Code) | | It puts in the namespace specific information from the Transformation
Catalog into the namespace.
Parameters: entry - the TCEntry object containing the result fromthe Transformation Catalog. |
checkKeyInNS | public void checkKeyInNS(Profile profile) throws IllegalArgumentException(Code) | | It takes in a Profiles object and puts them into the namespace after
checking if the namespace in the Profile object is same as the namepsace
implementation.
Parameters: profile - the Profile object containing the key andvalue. exception: IllegalArgumentException - if the namespace in the profileis not the same as the profile namepsace in which the profileis being incorporated. See Also: org.griphyn.cPlanner.classes.Profile |
checkKeyInNS | public void checkKeyInNS(List vars)(Code) | | It takes in a list of profiles and puts them into the namespace after
checking if they are valid or not. Note, there are no checks on the
namespace however. The user should ensure that each Profile object in
the list is of the same namespace type.
Parameters: vars - List of Profile objects, each referringto a key value for the profile. See Also: org.griphyn.cPlanner.classes.Profile |
checkKeyInNS | abstract public void checkKeyInNS(PegasusProperties properties, String pool)(Code) | | 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.
Parameters: properties - the PegasusProperties object containingall the properties that the user specified at variousplaces (like .chimerarc, properties file, command line). Parameters: pool - the pool name where the job is scheduled to run. |
checkKeyInNS | public void checkKeyInNS(String key, String value)(Code) | | This checks the whether a key value pair specified is valid in the current
namespace or not by calling the checkKey function and then on the basis of
the values returned puts them into the associated map in the class.
Parameters: key - key that needs to be checked in the namespace for validity. Parameters: value - value of the key |
construct | public void construct(String key, String value)(Code) | | Constructs a new element of the format (key=value).
Parameters: key - is the left-hand-side Parameters: value - is the right hand side |
containsKey | public boolean containsKey(Object key)(Code) | | Returns true if the namespace contains a mapping for the specified key.
More formally, returns true if and only if this map contains at a mapping
for a key k such that (key==null ? k==null : key.equals(k)).
(There can be at most one such mapping.)
Parameters: key - The key that you want to search forin the namespace. |
deprecatedKey | public void deprecatedKey(String key, String value)(Code) | | Warns about a deprecated profile key. It constructs the corresponding
replacement key.
Parameters: key - is the left-hand-side Parameters: value - is the right hand side See Also: Namespace.deprecatedTable() |
deprecatedTable | public Map deprecatedTable()(Code) | | Singleton access to the deprecated table that holds the deprecated keys,
and the keys that replace them. It should be overriden in the namespaces,
that have deprecated keys.
Map |
get | public Object get(Object key)(Code) | | 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.
Parameters: key - The key whose value you want. |
getProfileKeyIterator | public Iterator getProfileKeyIterator()(Code) | | Provides an iterator to traverse the profiles by their keys.
an iterator over the keys to walk the profile list. |
isNamespaceValid | public static boolean isNamespaceValid(String namespace)(Code) | | Checks if the namespace specified is valid or not.
Parameters: namespace - The namespace you want to check |
keySet | public Set keySet()(Code) | | Returns the key set associated with the namespace.
key set if the mProfileMap is populated.null if the associated mProfileMap is not populated. |
malformedKey | public void malformedKey(String key, String value)(Code) | | Warns about a namespace profile key-value pair that is malformed.
Parameters: key - is the key that induced the warning. Parameters: value - is the corresponding value of the key. |
merge | abstract public void merge(Namespace profiles)(Code) | | Merge the profiles in the namespace in a controlled manner.
The profiles should be merged only if the namespace object containing them
matches to the current namespace.
Parameters: profiles - the Namespace object containing the profiles. |
namespaceName | abstract public String namespaceName()(Code) | | Returns the name of the namespace associated with the profile implementations.
the namespace name. |
notPermitted | public void notPermitted(String key)(Code) | | Warns about a namespace profile key that cannot be permitted.
Parameters: key - is the key that induced the warning. |
removeKey | public Object removeKey(Object key)(Code) | | Removes the key from the namespace.
Parameters: key - The key you want to remove. the value object if it exists.null if the key does not exist in the namespace. |
unknownKey | public void unknownKey(String key, String value)(Code) | | Warns about an unknown profile key and constructs it anyway.
Constructs a new RSL element of the format (key=value).
Parameters: key - is the left-hand-side Parameters: value - is the right hand side |
|
|