changeset 551:6c9eba7772cf digilibPDF

more refactoring and cleanup
author robcast
date Tue, 14 Dec 2010 20:26:35 +0100
parents f9a4288fc7c4
children 785fc58b68b1
files servlet/src/digilib/servlet/PDFJobDescription.java servlet/src/digilib/servlet/ParameterMap.java
diffstat 2 files changed, 12 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/servlet/PDFJobDescription.java	Tue Dec 14 12:34:33 2010 +0100
+++ b/servlet/src/digilib/servlet/PDFJobDescription.java	Tue Dec 14 20:26:35 2010 +0100
@@ -22,10 +22,6 @@
  */
 public class PDFJobDescription extends ParameterMap {
 
-	String[] parameter_list = {"pgs"}; // all other parameters get passed into an extra ImageJobInformation  
-									   // (this should be redesigned later...)
-	
-	
 	ImageJobDescription image_info = null;
 	DigilibConfiguration dlConfig = null;
 	NumRange pages = null;
@@ -41,11 +37,15 @@
 	 */
 	public PDFJobDescription(DigilibConfiguration dlcfg) {
 		super(30);
-
+		dlConfig = dlcfg;
 		// page numbers
 		newParameter("pgs", "", null, 's');
-		dlConfig = dlcfg;
-		
+		// url of the page/document (second part)
+		newParameter("fn", "", null, 's');
+		// width of client in pixels
+		newParameter("dw", new Integer(0), null, 's');
+		// height of client in pixels
+		newParameter("dh", new Integer(0), null, 's');
 	}
 
 	/**
--- a/servlet/src/digilib/servlet/ParameterMap.java	Tue Dec 14 12:34:33 2010 +0100
+++ b/servlet/src/digilib/servlet/ParameterMap.java	Tue Dec 14 20:26:35 2010 +0100
@@ -57,9 +57,11 @@
 	 * @param pm
 	 */
 	@SuppressWarnings("unchecked")
-	public ParameterMap(ParameterMap pm) {
-		params = (HashMap<String, Parameter>) pm.params.clone();
-		options = (OptionsSet) pm.options.clone();
+	public static ParameterMap cloneFrom(ParameterMap pm) {
+		ParameterMap newPm = new ParameterMap();
+		newPm.params = (HashMap<String, Parameter>) pm.params.clone();
+		newPm.options = (OptionsSet) pm.options.clone();
+		return newPm;
 	}
 
 	/** Get the Parameter with the corresponding key.