Package gov.nih.mipav.model.file
Class XMLPSet
- java.lang.Object
-
- gov.nih.mipav.model.file.XMLPSet
-
- All Implemented Interfaces:
java.io.Serializable
public class XMLPSet extends java.lang.Object implements java.io.Serializable
Title: PSet
Description: Public class to store up to an infinite number of parameters... which will be in a Hashtable with name as the key Note: there must be at least one parameter associated with each parameter set per XSD (XML Schema)
Copyright: Copyright (c) 2004
Company:
- Version:
- 1.0
- Author:
- not attributable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
currentParameterName
Current parameter name.private java.lang.String
description
Description of parameter.private java.util.Hashtable<java.lang.String,XMLParameter>
parameterTable
Parameter hashtable.private static long
serialVersionUID
Use serialVersionUID for interoperability.
-
Constructor Summary
Constructors Constructor Description XMLPSet(java.lang.String description)
Create a new parameter set with the given description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameter(java.lang.String name)
Adds a new parameter to the set.boolean
containsKey(java.lang.String key)
Determines if the set contains a parameter with the given name.XMLParameter
getCurrentParameter()
Returns the current parameter to be modified.java.lang.String
getDescription()
Get the parameter set description.XMLParameter
getParameter(java.lang.String name)
Gets the parameter with the given name.java.util.Enumeration<java.lang.String>
getParameterKeys()
Get an enumeration for the list of parameter names.java.util.Hashtable<java.lang.String,XMLParameter>
getTable()
Gets the hashtable of parameters.void
removeParameter(java.lang.String name)
Removes the parameter with the given name from the hashtable.void
setDescription(java.lang.String desc)
java.lang.String
toString()
Returns a String representation of the Set.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
currentParameterName
private java.lang.String currentParameterName
Current parameter name.
-
description
private java.lang.String description
Description of parameter.
-
parameterTable
private java.util.Hashtable<java.lang.String,XMLParameter> parameterTable
Parameter hashtable.
-
-
Method Detail
-
addParameter
public void addParameter(java.lang.String name)
Adds a new parameter to the set.- Parameters:
name
- String name
-
containsKey
public boolean containsKey(java.lang.String key)
Determines if the set contains a parameter with the given name.- Parameters:
key
- String parameter name (key)- Returns:
- boolean set contains parameter
-
getCurrentParameter
public XMLParameter getCurrentParameter()
Returns the current parameter to be modified.- Returns:
- Parameter current parameter
-
getDescription
public java.lang.String getDescription()
Get the parameter set description.- Returns:
- String description
-
setDescription
public void setDescription(java.lang.String desc)
-
getParameter
public XMLParameter getParameter(java.lang.String name)
Gets the parameter with the given name.- Parameters:
name
- DOCUMENT ME!- Returns:
- Parameter parameter
-
getParameterKeys
public java.util.Enumeration<java.lang.String> getParameterKeys()
Get an enumeration for the list of parameter names.- Returns:
- Enumeration enumeration for parameter name list
-
getTable
public java.util.Hashtable<java.lang.String,XMLParameter> getTable()
Gets the hashtable of parameters.- Returns:
- Hashtable parameter hashtable
-
removeParameter
public void removeParameter(java.lang.String name)
Removes the parameter with the given name from the hashtable.- Parameters:
name
- String parameter name
-
toString
public java.lang.String toString()
Returns a String representation of the Set.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String string representation
-
-