~ubuntu-branches/ubuntu/karmic/batik/karmic

« back to all changes in this revision

Viewing changes to sources/org/w3c/css/sac/LexicalUnit.java

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev, Onkar Shinde, Matvey Kozhev
  • Date: 2008-07-19 01:03:05 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080719010305-0b24skqy185kdsb9
Tags: 1.7.dfsg-0ubuntu1
[ Onkar Shinde ]
* New upstream version (LP: #147818)
* debian/control
  - Add Sun JDK 1.5 as build dependency. Fixes FTBFS on buildd. (LP: #150484)
    Also add Sun JRE as runtime dependencies.
  - Add ant-optional as build dependency.
  - Add libxml-commons-external-java and libxmlgraphics-commons-java as
    build and runtime dependencies.
  - Add 'Homepage' field and correct the url.
  - Change standards version to 3.8.0.
  - Modify Maintainer value to match the DebianMaintainerField
    specification.
* debian/rules
  - Change JAVA_HOME_DIRS for Sun JDK.
  - Add jar file names to DEB_JARS to match new build requirements.
  - Extract version from changelog.
  - Delete bundled jar files in clean target.
  - Don't use hardcoded version in install target.
  - Add get-orig-source target.
* debian/README.Debian-source
  - Change the fo tag name to the one used for this version.
* debian/watch
  - Change expression to match src distribution.
* debian/patches/
  - 01_build_xml.patch, 02_fix_jar_target.patch - Refresh for current source.
  - 03_fix_lib_dirs.patch - Fix the library and classpath references needed
    for pdf transcoder build.
  - 04_fix_transcoder_pkg.patch - Fix transcoder-pkg target to not copy
    files from other jar files.

[ Matvey Kozhev ]
* debian/changelog:
  - Added ".dfsg" to version.
* debian/control, debian/rules:
  - Build with openjdk-6-jdk, depend on openjdk-6-jre.
  - Added java-6-sun as an alternate build JAVA_HOME directory.
  - Fixed get-orig-source to not include debian/ and delete the source dir,
    and made it delete jars from lib/, as done in the current batik package.
* debian/wrappers.sh:
  - Changed java-7-icedtea reference to java-6-openjdk, as the former has been
    removed back in Hardy.
  - Added newline.
* debian/libbatik-java.install:
  - Added newline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (c) 1999 World Wide Web Consortium
3
 
 * (Massachusetts Institute of Technology, Institut National de Recherche
4
 
 *  en Informatique et en Automatique, Keio University).
5
 
 * All Rights Reserved. http://www.w3.org/Consortium/Legal/
6
 
 *
7
 
 * $Id: LexicalUnit.java,v 1.3 2005/03/27 08:58:37 cam Exp $
8
 
 */
9
 
package org.w3c.css.sac;
10
 
 
11
 
/**
12
 
 * This is a lexical unit for CSS values.
13
 
 * <p><b>Remarks</b>: Not all the following lexical units are supported (or
14
 
 * will be supported) by CSS.
15
 
 * <p>All examples are CSS2 compliant.
16
 
 *
17
 
 * @version $Revision: 1.3 $
18
 
 * @author Philippe Le Hegaret
19
 
 */
20
 
public interface LexicalUnit {
21
 
    
22
 
    /**
23
 
     * ,
24
 
     */
25
 
    public static final short SAC_OPERATOR_COMMA        = 0;
26
 
    /**
27
 
     * +
28
 
     */
29
 
    public static final short SAC_OPERATOR_PLUS         = 1;
30
 
    /**
31
 
     * -
32
 
     */
33
 
    public static final short SAC_OPERATOR_MINUS        = 2;
34
 
    /**
35
 
     * *
36
 
     */
37
 
    public static final short SAC_OPERATOR_MULTIPLY     = 3;
38
 
    /**
39
 
     * /
40
 
     */
41
 
    public static final short SAC_OPERATOR_SLASH        = 4;
42
 
    /**
43
 
     * %
44
 
     */
45
 
    public static final short SAC_OPERATOR_MOD          = 5;
46
 
    /**
47
 
     * ^
48
 
     */
49
 
    public static final short SAC_OPERATOR_EXP          = 6;
50
 
    /**
51
 
     * <
52
 
     */
53
 
    public static final short SAC_OPERATOR_LT           = 7;
54
 
    /**
55
 
     * >
56
 
     */
57
 
    public static final short SAC_OPERATOR_GT           = 8;
58
 
    /**
59
 
     * <=
60
 
     */
61
 
    public static final short SAC_OPERATOR_LE           = 9;
62
 
    /**
63
 
     * >=
64
 
     */
65
 
    public static final short SAC_OPERATOR_GE           = 10;
66
 
    /**
67
 
     * ~
68
 
     */
69
 
    public static final short SAC_OPERATOR_TILDE        = 11;
70
 
    
71
 
    /**
72
 
     * identifier <code>inherit</code>.
73
 
     */
74
 
    public static final short SAC_INHERIT               = 12;
75
 
    /**
76
 
     * Integers.
77
 
     * @see #getIntegerValue
78
 
     */
79
 
    public static final short SAC_INTEGER               = 13;
80
 
    /**
81
 
     * reals.
82
 
     * @see #getFloatValue
83
 
     * @see #getDimensionUnitText
84
 
     */
85
 
    public static final short SAC_REAL                  = 14;
86
 
    /**
87
 
     * Relative length<code>em</code>.
88
 
     * @see #getFloatValue
89
 
     * @see #getDimensionUnitText
90
 
     */
91
 
    public static final short SAC_EM            = 15;
92
 
    /**
93
 
     * Relative length<code>ex</code>.
94
 
     * @see #getFloatValue
95
 
     * @see #getDimensionUnitText
96
 
     */
97
 
    public static final short SAC_EX            = 16;
98
 
    /**
99
 
     * Relative length <code>px</code>.
100
 
     * @see #getFloatValue
101
 
     * @see #getDimensionUnitText
102
 
     */
103
 
    public static final short SAC_PIXEL         = 17;
104
 
    /**
105
 
     * Absolute length <code>in</code>.
106
 
     * @see #getFloatValue
107
 
     * @see #getDimensionUnitText
108
 
     */
109
 
    public static final short SAC_INCH          = 18;
110
 
    /**
111
 
     * Absolute length <code>cm</code>.
112
 
     * @see #getFloatValue
113
 
     * @see #getDimensionUnitText
114
 
     */
115
 
    public static final short SAC_CENTIMETER    = 19;
116
 
    /**
117
 
     * Absolute length <code>mm</code>.
118
 
     * @see #getFloatValue
119
 
     * @see #getDimensionUnitText
120
 
     */
121
 
    public static final short SAC_MILLIMETER    = 20;
122
 
    /**
123
 
     * Absolute length <code>pt</code>.
124
 
     * @see #getFloatValue
125
 
     * @see #getDimensionUnitText
126
 
     */
127
 
    public static final short SAC_POINT         = 21;
128
 
    /**
129
 
     * Absolute length <code>pc</code>.
130
 
     * @see #getFloatValue
131
 
     * @see #getDimensionUnitText
132
 
     */
133
 
    public static final short SAC_PICA          = 22;
134
 
    /**
135
 
     * Percentage.
136
 
     * @see #getFloatValue
137
 
     * @see #getDimensionUnitText
138
 
     */
139
 
    public static final short SAC_PERCENTAGE            = 23;
140
 
    /**
141
 
     * URI: <code>uri(&#x2e;&#x2e;&#x2e;)</code>.
142
 
     * @see #getStringValue
143
 
     */
144
 
    public static final short SAC_URI                   = 24;
145
 
    /**
146
 
     * function <code>counter</code>.
147
 
     * @see #getFunctionName
148
 
     * @see #getParameters
149
 
     */
150
 
    public static final short SAC_COUNTER_FUNCTION      = 25;
151
 
    /**
152
 
     * function <code>counters</code>.
153
 
     * @see #getFunctionName
154
 
     * @see #getParameters
155
 
     */
156
 
    public static final short SAC_COUNTERS_FUNCTION     = 26;
157
 
    /**
158
 
     * RGB Colors.
159
 
     * <code>rgb(0, 0, 0)</code> and <code>#000</code>
160
 
     * @see #getFunctionName
161
 
     * @see #getParameters
162
 
     */
163
 
    public static final short SAC_RGBCOLOR              = 27;
164
 
    /**
165
 
     * Angle <code>deg</code>.
166
 
     * @see #getFloatValue
167
 
     * @see #getDimensionUnitText
168
 
     */
169
 
    public static final short SAC_DEGREE                = 28;
170
 
    /**
171
 
     * Angle <code>grad</code>.
172
 
     * @see #getFloatValue
173
 
     * @see #getDimensionUnitText
174
 
     */
175
 
    public static final short SAC_GRADIAN               = 29;
176
 
    /**
177
 
     * Angle <code>rad</code>.
178
 
     * @see #getFloatValue
179
 
     * @see #getDimensionUnitText
180
 
     */
181
 
    public static final short SAC_RADIAN                = 30;
182
 
    /**
183
 
     * Time <code>ms</code>.
184
 
     * @see #getFloatValue
185
 
     * @see #getDimensionUnitText
186
 
     */
187
 
    public static final short SAC_MILLISECOND           = 31;
188
 
    /**
189
 
     * Time <code>s</code>.
190
 
     * @see #getFloatValue
191
 
     * @see #getDimensionUnitText
192
 
     */
193
 
    public static final short SAC_SECOND                = 32;
194
 
    /**
195
 
     * Frequency <code>Hz</code>.
196
 
     * @see #getFloatValue
197
 
     * @see #getDimensionUnitText
198
 
     */
199
 
    public static final short SAC_HERTZ                 = 33;
200
 
    /**
201
 
     * Frequency <code>kHz</code>.
202
 
     * @see #getFloatValue
203
 
     * @see #getDimensionUnitText
204
 
     */
205
 
    public static final short SAC_KILOHERTZ             = 34;
206
 
    
207
 
    /**
208
 
     * any identifier except <code>inherit</code>.
209
 
     * @see #getStringValue
210
 
     */
211
 
    public static final short SAC_IDENT                 = 35;
212
 
    /**
213
 
     * A string.
214
 
     * @see #getStringValue
215
 
     */
216
 
    public static final short SAC_STRING_VALUE          = 36;
217
 
    /**
218
 
     * Attribute: <code>attr(&#x2e;&#x2e;&#x2e;)</code>.
219
 
     * @see #getStringValue
220
 
     */
221
 
    public static final short SAC_ATTR                  = 37;
222
 
    /**
223
 
     * function <code>rect</code>.
224
 
     * @see #getFunctionName
225
 
     * @see #getParameters
226
 
     */
227
 
    public static final short SAC_RECT_FUNCTION         = 38;
228
 
    /**
229
 
     * A unicode range. @@TO BE DEFINED
230
 
     */
231
 
    public static final short SAC_UNICODERANGE          = 39;
232
 
    
233
 
    /**
234
 
     * sub expressions
235
 
     * <code>(a)</code> <code>(a + b)</code> <code>(normal/none)</code>
236
 
     * @see #getSubValues
237
 
     */
238
 
    public static final short SAC_SUB_EXPRESSION        = 40;
239
 
    
240
 
    /**
241
 
     * unknown function.
242
 
     * @see #getFunctionName
243
 
     * @see #getParameters
244
 
     */
245
 
    public static final short SAC_FUNCTION              = 41;
246
 
    /**
247
 
     * unknown dimension.
248
 
     * @see #getFloatValue
249
 
     * @see #getDimensionUnitText
250
 
     */
251
 
    public static final short SAC_DIMENSION             = 42;
252
 
    
253
 
    /**
254
 
     * An integer indicating the type of <code>LexicalUnit</code>.
255
 
     */
256
 
    public short       getLexicalUnitType();
257
 
    
258
 
    /**
259
 
     * Returns the next value or <code>null</code> if any.
260
 
     */
261
 
    public LexicalUnit getNextLexicalUnit();
262
 
    
263
 
    /**
264
 
     * Returns the previous value or <code>null</code> if any.
265
 
     */
266
 
    public LexicalUnit getPreviousLexicalUnit();
267
 
    
268
 
    /**
269
 
     * Returns the integer value.
270
 
     * @see #SAC_INTEGER
271
 
     */
272
 
    public int getIntegerValue();
273
 
    
274
 
    
275
 
    /**
276
 
     * Returns the float value.
277
 
     * <p>If the type of <code>LexicalUnit</code> is one of SAC_DEGREE,
278
 
     * SAC_GRADIAN, SAC_RADIAN, SAC_MILLISECOND, SAC_SECOND, SAC_HERTZ
279
 
     * or SAC_KILOHERTZ, the value can never be negative.</p>
280
 
     *
281
 
     * @see #SAC_REAL
282
 
     * @see #SAC_DIMENSION
283
 
     * @see #SAC_EM
284
 
     * @see #SAC_EX
285
 
     * @see #SAC_PIXEL
286
 
     * @see #SAC_INCH
287
 
     * @see #SAC_CENTIMETER
288
 
     * @see #SAC_MILLIMETER
289
 
     * @see #SAC_POINT
290
 
     * @see #SAC_PICA
291
 
     * @see #SAC_PERCENTAGE
292
 
     * @see #SAC_DEGREE
293
 
     * @see #SAC_GRADIAN
294
 
     * @see #SAC_RADIAN
295
 
     * @see #SAC_MILLISECOND
296
 
     * @see #SAC_SECOND
297
 
     * @see #SAC_HERTZ
298
 
     * @see #SAC_KILOHERTZ
299
 
     */
300
 
    public float getFloatValue();
301
 
    
302
 
    /**
303
 
     * Returns the string representation of the unit.
304
 
     * <p>if this lexical unit represents a float, the dimension is an empty
305
 
     * string.</p>
306
 
     * @see #SAC_REAL
307
 
     * @see #SAC_DIMENSION
308
 
     * @see #SAC_EM
309
 
     * @see #SAC_EX
310
 
     * @see #SAC_PIXEL
311
 
     * @see #SAC_INCH
312
 
     * @see #SAC_CENTIMETER
313
 
     * @see #SAC_MILLIMETER
314
 
     * @see #SAC_POINT
315
 
     * @see #SAC_PICA
316
 
     * @see #SAC_PERCENTAGE
317
 
     * @see #SAC_DEGREE
318
 
     * @see #SAC_GRADIAN
319
 
     * @see #SAC_RADIAN
320
 
     * @see #SAC_MILLISECOND
321
 
     * @see #SAC_SECOND
322
 
     * @see #SAC_HERTZ
323
 
     * @see #SAC_KILOHERTZ 
324
 
     */
325
 
    public String getDimensionUnitText();
326
 
    
327
 
    /**
328
 
     * Returns the name of the function.
329
 
     * @see #SAC_COUNTER_FUNCTION
330
 
     * @see #SAC_COUNTERS_FUNCTION
331
 
     * @see #SAC_RECT_FUNCTION
332
 
     * @see #SAC_FUNCTION
333
 
     * @see #SAC_RGBCOLOR
334
 
     */
335
 
    public String      getFunctionName();
336
 
    
337
 
    /**
338
 
     * The function parameters including operators (like the comma).
339
 
     * <code>#000</code> is converted to <code>rgb(0, 0, 0)</code>
340
 
     * can return <code>null</code> if <code>SAC_FUNCTION</code>.
341
 
     * @see #SAC_COUNTER_FUNCTION
342
 
     * @see #SAC_COUNTERS_FUNCTION
343
 
     * @see #SAC_RECT_FUNCTION
344
 
     * @see #SAC_FUNCTION
345
 
     * @see #SAC_RGBCOLOR
346
 
     */
347
 
    public LexicalUnit getParameters();
348
 
 
349
 
    /**
350
 
     * Returns the string value.
351
 
     * <p>If the type is <code>SAC_URI</code>, the return value doesn't contain
352
 
     * <code>uri(....)</code> or quotes.
353
 
     * <p>If the type is <code>SAC_ATTR</code>, the return value doesn't contain
354
 
     * <code>attr(....)</code>.
355
 
     *
356
 
     * @see #SAC_URI
357
 
     * @see #SAC_ATTR
358
 
     * @see #SAC_IDENT
359
 
     * @see #SAC_STRING_VALUE
360
 
     * @see #SAC_UNICODERANGE @@TO BE DEFINED 
361
 
     */
362
 
    public String getStringValue();
363
 
 
364
 
    /**
365
 
     * Returns a list of values inside the sub expression.
366
 
     * @see #SAC_SUB_EXPRESSION
367
 
     */
368
 
    public LexicalUnit getSubValues();
369
 
    
370
 
}