comparison common/src/main/java/digilib/conf/DigilibRequest.java @ 1696:43d48324dceb

Cleanup: fix deprecation warnings for Java 10+. Change "new Integer/Float...(x)" to Integer.valueOf(x). Change clazz.newInstance to clazz.getConstructor().newInstance().
author Robert Casties <casties@mpiwg-berlin.mpg.de>
date Sun, 16 Dec 2018 15:08:01 +0100
parents 3972535c1146
children
comparison
equal deleted inserted replaced
1695:ca28745836c1 1696:43d48324dceb
121 */ 121 */
122 122
123 // url of the page/document (second part) 123 // url of the page/document (second part)
124 newParameter("fn", "", null, 's'); 124 newParameter("fn", "", null, 's');
125 // page number 125 // page number
126 newParameter("pn", new Integer(1), null, 's'); 126 newParameter("pn", Integer.valueOf(1), null, 's');
127 // width of client in pixels 127 // width of client in pixels
128 newParameter("dw", new Integer(0), null, 's'); 128 newParameter("dw", Integer.valueOf(0), null, 's');
129 // height of client in pixels 129 // height of client in pixels
130 newParameter("dh", new Integer(0), null, 's'); 130 newParameter("dh", Integer.valueOf(0), null, 's');
131 // left edge of image (float from 0 to 1) 131 // left edge of image (float from 0 to 1)
132 newParameter("wx", new Float(0), null, 's'); 132 newParameter("wx", Float.valueOf(0), null, 's');
133 // top edge in image (float from 0 to 1) 133 // top edge in image (float from 0 to 1)
134 newParameter("wy", new Float(0), null, 's'); 134 newParameter("wy", Float.valueOf(0), null, 's');
135 // width of image (float from 0 to 1) 135 // width of image (float from 0 to 1)
136 newParameter("ww", new Float(1), null, 's'); 136 newParameter("ww", Float.valueOf(1), null, 's');
137 // height of image (float from 0 to 1) 137 // height of image (float from 0 to 1)
138 newParameter("wh", new Float(1), null, 's'); 138 newParameter("wh", Float.valueOf(1), null, 's');
139 // scale factor 139 // scale factor
140 newParameter("ws", new Float(1), null, 's'); 140 newParameter("ws", Float.valueOf(1), null, 's');
141 // special options like 'fit' for gifs 141 // special options like 'fit' for gifs
142 newParameter("mo", this.options, null, 's'); 142 newParameter("mo", this.options, null, 's');
143 // rotation angle (degree) 143 // rotation angle (degree)
144 newParameter("rot", new Float(0), null, 's'); 144 newParameter("rot", Float.valueOf(0), null, 's');
145 // contrast enhancement factor 145 // contrast enhancement factor
146 newParameter("cont", new Float(0), null, 's'); 146 newParameter("cont", Float.valueOf(0), null, 's');
147 // brightness enhancement factor 147 // brightness enhancement factor
148 newParameter("brgt", new Float(0), null, 's'); 148 newParameter("brgt", Float.valueOf(0), null, 's');
149 // color multiplicative factors 149 // color multiplicative factors
150 newParameter("rgbm", "0/0/0", null, 's'); 150 newParameter("rgbm", "0/0/0", null, 's');
151 // color additive factors 151 // color additive factors
152 newParameter("rgba", "0/0/0", null, 's'); 152 newParameter("rgba", "0/0/0", null, 's');
153 // display dpi resolution (total) 153 // display dpi resolution (total)
154 newParameter("ddpi", new Float(0), null, 's'); 154 newParameter("ddpi", Float.valueOf(0), null, 's');
155 // display dpi X resolution 155 // display dpi X resolution
156 newParameter("ddpix", new Float(0), null, 's'); 156 newParameter("ddpix", Float.valueOf(0), null, 's');
157 // display dpi Y resolution 157 // display dpi Y resolution
158 newParameter("ddpiy", new Float(0), null, 's'); 158 newParameter("ddpiy", Float.valueOf(0), null, 's');
159 // scale factor for mo=ascale 159 // scale factor for mo=ascale
160 newParameter("scale", new Float(1), null, 's'); 160 newParameter("scale", Float.valueOf(1), null, 's');
161 // color conversion operation 161 // color conversion operation
162 newParameter("colop", "", null, 's'); 162 newParameter("colop", "", null, 's');
163 163
164 /* 164 /*
165 * Parameters of type 'i' are not exchanged between client and server, 165 * Parameters of type 'i' are not exchanged between client and server,
178 */ 178 */
179 179
180 // "real" filename 180 // "real" filename
181 newParameter("img.fn", "", null, 'c'); 181 newParameter("img.fn", "", null, 'c');
182 // image dpi x 182 // image dpi x
183 newParameter("img.dpix", new Integer(0), null, 'c'); 183 newParameter("img.dpix", Integer.valueOf(0), null, 'c');
184 // image dpi y 184 // image dpi y
185 newParameter("img.dpiy", new Integer(0), null, 'c'); 185 newParameter("img.dpiy", Integer.valueOf(0), null, 'c');
186 // hires image size x 186 // hires image size x
187 newParameter("img.pix_x", new Integer(0), null, 'c'); 187 newParameter("img.pix_x", Integer.valueOf(0), null, 'c');
188 // hires image size y 188 // hires image size y
189 newParameter("img.pix_y", new Integer(0), null, 'c'); 189 newParameter("img.pix_y", Integer.valueOf(0), null, 'c');
190 190
191 /* 191 /*
192 * set local variables from config 192 * set local variables from config
193 */ 193 */
194 if (config != null) { 194 if (config != null) {