01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/publishing/markups/TKMarkupIntParamClass.java,v 1.5 2000/05/22 15:01:28 careck Exp $
03: *
04: */
05: package com.teamkonzept.publishing.markups;
06:
07: public class TKMarkupIntParamClass extends TKMarkupParamClass {
08:
09: public String checkValue(String raw) {
10:
11: if (raw == null)
12: return raw;
13:
14: String value = raw.trim();
15:
16: int pos = 0;
17: while (pos < value.length()) {
18:
19: char chr = value.charAt(pos++);
20:
21: if (digitCodes.indexOf(chr) == -1)
22: return null;
23: }
24:
25: return value;
26: }
27:
28: public int parseUnquotedValue(String text, int pos,
29: StringBuffer value) throws TKMarkupParserException {
30:
31: if (value != null)
32: value.setLength(0);
33:
34: while (pos < text.length()) {
35:
36: char chr = text.charAt(pos);
37: if (digitCodes.indexOf(chr) == -1)
38: break;
39: if (value != null)
40: value.append(chr);
41:
42: pos++;
43: }
44:
45: return pos;
46: }
47:
48: public String wrapValue(String value) {
49:
50: return value;
51: }
52: }
|