org.dspace.content.packager
Class PackageParameters
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
org.dspace.content.packager.PackageParameters
- All Implemented Interfaces:
- Serializable, Cloneable, Map<Object,Object>
public class PackageParameters
- extends Properties
Parameter list for SIP and DIP packagers. It's really just
a Java Properties object extended so each parameter can have
multiple values. This was necessary so it can represent Servlet
parameters, which have multiple values. It is also helpful to
indicate e.g. metadata choices for package formats like METS that
allow many different metadata segments.
- Version:
- $Revision: 1417 $
- Author:
- Larry Stone
- See Also:
- Serialized Form
|
Method Summary |
Object |
addProperty(String key,
String value)
Adds a value to a property; if property already has value(s),
this is tacked onto the end, otherwise it acts like setProperty(). |
static PackageParameters |
create(javax.servlet.ServletRequest request)
Creates new parameters object with the parameter values from
a servlet request object. |
boolean |
getBooleanProperty(String key,
boolean defaultAnswer)
Returns boolean form of property with selectable default |
String[] |
getProperties(String key)
Returns multiple property values in an array. |
| Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML |
| Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
PackageParameters
public PackageParameters()
PackageParameters
public PackageParameters(Properties defaults)
create
public static PackageParameters create(javax.servlet.ServletRequest request)
- Creates new parameters object with the parameter values from
a servlet request object.
- Parameters:
request - - the request from which to take the values
- Returns:
- new parameters object.
addProperty
public Object addProperty(String key,
String value)
- Adds a value to a property; if property already has value(s),
this is tacked onto the end, otherwise it acts like setProperty().
- Parameters:
key - - the key to be placed into this property list.value - - the new value to add, corresponding to this key.
- Returns:
- the previous value of the specified key in this property list, or
null if it did not have one.
getProperties
public String[] getProperties(String key)
- Returns multiple property values in an array.
- Parameters:
key - - the key to look for in this property list.
- Returns:
- all values in an array, or null if this property is unset.
getBooleanProperty
public boolean getBooleanProperty(String key,
boolean defaultAnswer)
- Returns boolean form of property with selectable default
- Parameters:
key - the key to look for in this property list.default - default to return if there is no such property
- Returns:
- the boolean derived from the value of property, or default
if it was not specified.
Copyright © 2008 The DSpace Foundation. All Rights Reserved.