edu.isi.pegasus.planner.catalog.classes
public class Profiles extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Profiles.NAMESPACES
The enumeration of valid namespaces.
|
| Modifier and Type | Field and Description |
|---|---|
private EnumMap<Profiles.NAMESPACES,Namespace> |
mProfileMap
An enum map that associates the enum keys with the corresponding
namespace objects.
|
| Constructor and Description |
|---|
Profiles()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addProfile(Profile p)
Adds a profile.
|
void |
addProfile(Profiles.NAMESPACES namespace,
String key,
String value)
Add a profile.
|
void |
addProfile(String namespace,
String key,
String value)
Add a profile.
|
void |
addProfileDirectly(Profile p)
Adds a profile directly to namespace bypassing any underlying namespace
specific checks.
|
void |
addProfileDirectly(Profiles.NAMESPACES namespace,
String key,
String value)
Add a profile.
|
void |
addProfileDirectly(String namespace,
String key,
String value)
Add a profile.
|
void |
addProfiles(List<Profile> profiles)
Adds multiple profiles.
|
void |
addProfiles(Profiles profiles)
Adds multiple profiles.
|
void |
addProfilesDirectly(List<Profile> profiles)
Adds multiple profiles to namespace bypassing any underlying namespace
specific checks.
|
void |
addProfilesDirectly(Profiles profiles)
Adds multiple profiles .
|
Object |
clone()
Returns the clone of the object.
|
Namespace |
get(Profiles.NAMESPACES n)
Returns the namespace object corresponding to a namespace
|
private int |
getIndex(Profiles.NAMESPACES u)
Returns the index for the namespace.
|
Iterator |
getProfileKeyIterator(Profiles.NAMESPACES n)
Returns a iterator over the profile keys corresponding to a particular namespace.
|
List<Profile> |
getProfiles()
Returns the list of profiles for all namespaces.
|
List<Profile> |
getProfiles(Namespace namespace)
Returns the list of profiles corresponding to a single namespace
|
List<Profile> |
getProfiles(Profiles.NAMESPACES namespace)
Returns the list of profiles corresponding to a single namespace
|
List<Profile> |
getProfiles(String namespace)
Returns the list of profiles corresponding to a single namespace
|
boolean |
isEmpty()
Returns a boolean indicating if the object is empty.
|
static void |
main(String[] args) |
String |
toString()
Returns the string description of the object.
|
void |
toString(Writer writer,
String indent)
Writes out the contents of the object as a String
|
String |
toXML()
Returns the xml description of the object.
|
void |
toXML(Writer writer,
String indent)
Writes out the xml description of the object.
|
void |
writeAttribute(Writer writer,
String key,
String value)
Writes an attribute to the stream.
|
private EnumMap<Profiles.NAMESPACES,Namespace> mProfileMap
public void addProfiles(Profiles profiles)
profiles - the profiles objectpublic void addProfiles(List<Profile> profiles)
profiles - List of Profile objects.public void addProfilesDirectly(Profiles profiles)
profiles - the profiles objectpublic void addProfilesDirectly(List<Profile> profiles)
profiles - List of Profile objects.public void addProfileDirectly(Profile p)
p - the profile to be addedpublic void addProfile(Profile p)
p - the profile to be addedpublic void addProfileDirectly(Profiles.NAMESPACES namespace, String key, String value)
namespace - key - value - public void addProfileDirectly(String namespace, String key, String value)
namespace - key - value - public void addProfile(Profiles.NAMESPACES namespace, String key, String value)
namespace - key - value - public void addProfile(String namespace, String key, String value)
namespace - key - value - public List<Profile> getProfiles()
Profilespublic List<Profile> getProfiles(String namespace)
namespace - the namespaceProfilespublic List<Profile> getProfiles(Profiles.NAMESPACES namespace)
namespace - the namespaceProfilespublic List<Profile> getProfiles(Namespace namespace)
namespace - the namespaceProfilespublic Iterator getProfileKeyIterator(Profiles.NAMESPACES n)
n - the namespacepublic Namespace get(Profiles.NAMESPACES n)
n - the namespacepublic boolean isEmpty()
public void toXML(Writer writer, String indent) throws IOException
writer - is a Writer opened and ready for writing. This can also
be a StringWriter for efficient output.indent - the indent to be used.IOException - if something fishy happens to the stream.public String toString()
toString in class ObjectRuntimeException - if something fishy happens to the stream.public void toString(Writer writer, String indent) throws IOException
writer - is a Writer opened and ready for writing. This can also
be a StringWriter for efficient output.indent - the indent to be used.IOException - if something fishy happens to the stream.public Object clone()
public String toXML() throws IOException
IOException - if something fishy happens to the stream.public void writeAttribute(Writer writer, String key, String value) throws IOException
writer - key - value - IOException - if something fishy happens to the stream.private int getIndex(Profiles.NAMESPACES u)
u - the unitpublic static void main(String[] args)
args -