Modifier and Type | Class and Description |
---|---|
protected class |
Namespace.EmptyIterator
An empty iterator that allows me to traverse in case of null objects.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEPRECATED_KEY
The key is deprecated.
|
static int |
EMPTY_KEY
The key value is empty .
|
static int |
MALFORMED_KEY
Either the key or the value specified is null or malformed.
|
LogManager |
mLogger
The LogManager object which is used to log all the messages.
|
protected Map |
mProfileMap
The Map object that contains the profiles for a particular namespace.
|
static int |
NOT_PERMITTED_KEY
The key is not permitted in as it clashes with default Pegasus constructs.
|
static int |
UNKNOWN_KEY
The key is unknown.
|
static int |
VALID_KEY
The key is a valid key and can be put in the profiles.
|
static String |
VERSION
The version number associated with this API of Profile Namespaces.
|
Constructor and Description |
---|
Namespace() |
Modifier and Type | Method and Description |
---|---|
void |
assimilate(PegasusProperties properties,
Profiles.NAMESPACES namespace)
Assimilate the profiles in the namespace in a controlled manner.
|
abstract 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.
|
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.
|
void |
checkKeyInNS(Namespace nm)
It puts in the namespaces keys from another namespace instance.
|
abstract void |
checkKeyInNS(PegasusProperties properties,
String pool)
It puts in the namespace specific information specified in the properties
file into the namespace.
|
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.
|
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.
|
void |
checkKeyInNS(TransformationCatalogEntry entry)
It puts in the namespace specific information from the Transformation
Catalog into the namespace.
|
Object |
clone()
Returns the clone of the object.
|
void |
construct(String key,
String value)
Constructs a new element of the format (key=value).
|
boolean |
containsKey(Object key)
Returns true if the namespace contains a mapping for the specified key.
|
void |
deprecatedKey(String key,
String value)
Warns about a deprecated profile key.
|
Map |
deprecatedTable()
Singleton access to the deprecated table that holds the deprecated keys,
and the keys that replace them.
|
void |
emptyKey(String key)
Deletes the key from the namespace.
|
Object |
get(Object key)
Returns the value to which this namespace maps the specified key.
|
Iterator |
getProfileKeyIterator()
Provides an iterator to traverse the profiles by their keys.
|
boolean |
isEmpty()
Returns a boolean indicating if the object is empty.
|
static boolean |
isNamespaceValid(String namespace)
Checks if the namespace specified is valid or not.
|
Set |
keySet()
Returns the key set associated with the namespace.
|
void |
malformedKey(String key,
String value)
Warns about a namespace profile key-value pair that is malformed.
|
abstract void |
merge(Namespace profiles)
Merge the profiles in the namespace in a controlled manner.
|
abstract String |
namespaceName()
Returns the name of the namespace associated with the profile implementations.
|
void |
notPermitted(String key)
Warns about a namespace profile key that cannot be permitted.
|
Object |
removeKey(Object key)
Removes the key from the namespace.
|
abstract String |
toCondor()
Returns a condor description that can be used to put the contents of the
namespace into the condor submit file during code generation.
|
String |
toString()
Returns the contents as String.
|
void |
unknownKey(String key,
String value)
Warns about an unknown profile key and constructs it anyway.
|
public LogManager mLogger
public static final String VERSION
public static final int MALFORMED_KEY
public static final int VALID_KEY
public static final int UNKNOWN_KEY
public static final int NOT_PERMITTED_KEY
public static final int DEPRECATED_KEY
public static final int EMPTY_KEY
protected Map mProfileMap
public static boolean isNamespaceValid(String namespace)
namespace
- The namespace you want to checkpublic abstract int checkKey(String key, String value)
public abstract void merge(Namespace profiles)
profiles
- the Namespace
object containing the profiles.public abstract String namespaceName()
public String toString()
public abstract String toCondor()
public Iterator getProfileKeyIterator()
public Map deprecatedTable()
public void checkKeyInNS(Namespace nm)
nm
- the namespace to be assimilatedpublic void checkKeyInNS(TransformationCatalogEntry entry)
entry
- the TCEntry
object containing the result from
the Transformation Catalog.public void checkKeyInNS(Profile profile) throws IllegalArgumentException
profile
- the Profile
object containing the key and
value.IllegalArgumentException
- if the namespace in the profile
is not the same as the profile namepsace in which the profile
is being incorporated.org.griphyn.cPlanner.classes.Profile
public void checkKeyInNS(List vars)
vars
- List of Profile
objects, each referring
to a key value for the profile.org.griphyn.cPlanner.classes.Profile
public abstract void checkKeyInNS(PegasusProperties properties, String pool)
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.public void checkKeyInNS(String key, String value)
key
- key that needs to be checked in the namespace for validity.value
- value of the keypublic void assimilate(PegasusProperties properties, Profiles.NAMESPACES namespace)
profiles
- the Namespace
object containing the profiles.namespace
- the namespace for which the profiles need to be assimilated.public boolean containsKey(Object key)
key
- The key that you want to search for
in the namespace.public void construct(String key, String value)
key
- is the left-hand-sidevalue
- is the right hand sidepublic Object removeKey(Object key)
key
- The key you want to remove.public Set keySet()
public boolean isEmpty()
public Object get(Object key)
key
- The key whose value you want.public void unknownKey(String key, String value)
key
- is the left-hand-sidevalue
- is the right hand sidepublic void deprecatedKey(String key, String value)
key
- is the left-hand-sidevalue
- is the right hand sidedeprecatedTable()
public void notPermitted(String key)
key
- is the key that induced the warning.public void emptyKey(String key)
key
- the key with empty valuepublic void malformedKey(String key, String value)
key
- is the key that induced the warning.value
- is the corresponding value of the key.Copyright © 2011 The University of Southern California. All Rights Reserved.