KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > olap > Property


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/olap/Property.java#22 $
3 // This software is subject to the terms of the Common Public License
4 // Agreement, available at the following URL:
5 // http://www.opensource.org/licenses/cpl.html.
6 // Copyright (C) 2001-2002 Kana Software, Inc.
7 // Copyright (C) 2001-2006 Julian Hyde and others
8 // All Rights Reserved.
9 // You must accept the terms of that agreement to use this software.
10 //
11 // jhyde, 12 September, 2002
12 */

13
14 package mondrian.olap;
15
16 /**
17  * <code>Property</code> is the definition of a member property.
18  *
19  * <p>The following properties are mandatory for members:<ul>
20  * <li>{@link #CATALOG_NAME}</li>
21  * <li>{@link #SCHEMA_NAME}</li>
22  * <li>{@link #CUBE_NAME}</li>
23  * <li>{@link #DIMENSION_UNIQUE_NAME}</li>
24  * <li>{@link #HIERARCHY_UNIQUE_NAME}</li>
25  * <li>{@link #LEVEL_UNIQUE_NAME}</li>
26  * <li>{@link #LEVEL_NUMBER}</li>
27  * <li>{@link #MEMBER_UNIQUE_NAME}</li>
28  * <li>{@link #MEMBER_NAME}</li>
29  * <li>{@link #MEMBER_TYPE}</li>
30  * <li>{@link #MEMBER_GUID}</li>
31  * <li>{@link #MEMBER_CAPTION}</li>
32  * <li>{@link #MEMBER_ORDINAL}</li>
33  * <li>{@link #CHILDREN_CARDINALITY}</li>
34  * <li>{@link #PARENT_LEVEL}</li>
35  * <li>{@link #PARENT_UNIQUE_NAME}</li>
36  * <li>{@link #PARENT_COUNT}</li>
37  * <li>{@link #DESCRIPTION}</li>
38  * </ul>
39  *
40  * The following propertiess are mandatory for cells:<ul>
41  * <li>{@link #BACK_COLOR}</li>
42  * <li>{@link #CELL_EVALUATION_LIST}</li>
43  * <li>{@link #CELL_ORDINAL}</li>
44  * <li>{@link #FORE_COLOR}</li>
45  * <li>{@link #FONT_NAME}</li>
46  * <li>{@link #FONT_SIZE}</li>
47  * <li>{@link #FONT_FLAGS}</li>
48  * <li>{@link #FORMAT_STRING}</li>
49  * <li>{@link #FORMATTED_VALUE}</li>
50  * <li>{@link #NON_EMPTY_BEHAVIOR}</li>
51  * <li>{@link #SOLVE_ORDER}</li>
52  * <li>{@link #VALUE}</li>
53  * </ul>
54  */

55 public class Property extends EnumeratedValues.BasicValue {
56     public enum Datatype {
57         TYPE_STRING,
58         TYPE_NUMERIC,
59         TYPE_BOOLEAN,
60         TYPE_OTHER
61     }
62
63     public static final int FORMAT_EXP_ORDINAL = 0;
64     /**
65      * Definition of the internal property which
66      * holds the parsed format string (an object of type {@link Exp}).
67      */

68     public static final Property FORMAT_EXP =
69             new Property("$format_exp", Datatype.TYPE_OTHER, FORMAT_EXP_ORDINAL, true, false, false, null);
70
71     public static final int AGGREGATION_TYPE_ORDINAL = 1;
72     /**
73      * Definition of the internal property which
74      * holds the aggregation type. This is automatically set for stored
75      * measures, based upon their SQL aggregation.
76      */

77     public static final Property AGGREGATION_TYPE =
78             new Property("$aggregation_type", Datatype.TYPE_OTHER, AGGREGATION_TYPE_ORDINAL, true, false, false, null);
79
80     public static final int NAME_ORDINAL = 2;
81
82     /**
83      * Definition of the internal property which
84      * holds a member's name.
85      */

86     public static final Property NAME =
87             new Property("$name", Datatype.TYPE_STRING, NAME_ORDINAL, true, false, false, null);
88
89     public static final int CAPTION_ORDINAL = 3;
90     /**
91      * Definition of the internal property which
92      * holds a member's caption.
93      */

94     public static final Property CAPTION =
95             new Property("$caption", Datatype.TYPE_STRING, CAPTION_ORDINAL, true, false, false, null);
96
97     public static final int CONTRIBUTING_CHILDREN_ORDINAL = 4;
98     /**
99      * Definition of the internal property which
100      * holds, for a member of a parent-child hierarchy, a
101      * {@link java.util.List} containing the member's data
102      * member and all of its children (including non-visible children).
103      */

104     public static final Property CONTRIBUTING_CHILDREN =
105             new Property("$contributingChildren", Datatype.TYPE_OTHER, CONTRIBUTING_CHILDREN_ORDINAL, true, false, false, null);
106
107     public static final int FORMULA_ORDINAL = 5;
108     /**
109      * Definition of the internal property which
110      * returns a calculated member's {@link Formula} object.
111      */

112     public static final Property FORMULA =
113             new Property("$formula", Datatype.TYPE_OTHER, FORMULA_ORDINAL, true, false, false, null);
114
115     public static final int MEMBER_SCOPE_ORDINAL = 6;
116     /**
117      * Definition of the internal property which
118      * describes whether a calculated member belongs to a query or a cube.
119      */

120     public static final Property MEMBER_SCOPE =
121             new Property("$member_scope", Datatype.TYPE_OTHER, MEMBER_SCOPE_ORDINAL, true, true, false, null);
122
123     public static final int CATALOG_NAME_ORDINAL = 10;
124     /**
125      * Definition of the property which
126      * holds the name of the current catalog.
127      */

128     public static final Property CATALOG_NAME =
129             new Property("CATALOG_NAME", Datatype.TYPE_STRING, CATALOG_NAME_ORDINAL, false, true, false, "Optional. The name of the catalog to which this member belongs. NULL if the provider does not support catalogs.");
130
131     public static final int SCHEMA_NAME_ORDINAL = 11;
132     /**
133      * Definition of the property which
134      * holds the name of the current schema.
135      */

136     public static final Property SCHEMA_NAME =
137             new Property("SCHEMA_NAME", Datatype.TYPE_STRING, SCHEMA_NAME_ORDINAL, false, true, false, "Optional. The name of the schema to which this member belongs. NULL if the provider does not support schemas.");
138
139     public static final int CUBE_NAME_ORDINAL = 12;
140     /**
141      * Definition of the property which
142      * holds the name of the current cube.
143      */

144     public static final Property CUBE_NAME =
145             new Property("CUBE_NAME", Datatype.TYPE_STRING, CUBE_NAME_ORDINAL, false, true, false, "Required. Name of the cube to which this member belongs.");
146
147     public static final int DIMENSION_UNIQUE_NAME_ORDINAL = 13;
148     /**
149      * Definition of the property which
150      * holds the unique name of the current dimension.
151      */

152     public static final Property DIMENSION_UNIQUE_NAME =
153             new Property("DIMENSION_UNIQUE_NAME", Datatype.TYPE_STRING, DIMENSION_UNIQUE_NAME_ORDINAL, false, true, false, "Required. Unique name of the dimension to which this member belongs. For providers that generate unique names by qualification, each component of this name is delimited.");
154
155     public static final int HIERARCHY_UNIQUE_NAME_ORDINAL = 14;
156     /**
157      * Definition of the property which
158      * holds the unique name of the current hierarchy.
159      */

160     public static final Property HIERARCHY_UNIQUE_NAME =
161             new Property("HIERARCHY_UNIQUE_NAME", Datatype.TYPE_STRING, HIERARCHY_UNIQUE_NAME_ORDINAL, false, true, false, "Required. Unique name of the hierarchy. If the member belongs to more than one hierarchy, there is one row for each hierarchy to which it belongs. For providers that generate unique names by qualification, each component of this name is delimited.");
162
163     public static final int LEVEL_UNIQUE_NAME_ORDINAL = 15;
164     /**
165      * Definition of the property which
166      * holds the unique name of the current level.
167      */

168     public static final Property LEVEL_UNIQUE_NAME =
169             new Property("LEVEL_UNIQUE_NAME", Datatype.TYPE_STRING, LEVEL_UNIQUE_NAME_ORDINAL, false, true, false, "Required. Unique name of the level to which the member belongs. For providers that generate unique names by qualification, each component of this name is delimited.");
170
171     public static final int LEVEL_NUMBER_ORDINAL = 16;
172     /**
173      * Definition of the property which
174      * holds the ordinal of the current level.
175      */

176     public static final Property LEVEL_NUMBER =
177             new Property("LEVEL_NUMBER", Datatype.TYPE_STRING, LEVEL_NUMBER_ORDINAL, false, true, false, "Required. The distance of the member from the root of the hierarchy. The root level is zero.");
178
179     public static final int MEMBER_ORDINAL_ORDINAL = 17;
180     /**
181      * Definition of the property which
182      * holds the ordinal of the current member.
183      */

184     public static final Property MEMBER_ORDINAL =
185             new Property("MEMBER_ORDINAL", Datatype.TYPE_NUMERIC, MEMBER_ORDINAL_ORDINAL, false, true, false, "Required. Ordinal number of the member. Sort rank of the member when members of this dimension are sorted in their natural sort order. If providers do not have the concept of natural ordering, this should be the rank when sorted by MEMBER_NAME.");
186
187     public static final int MEMBER_NAME_ORDINAL = 18;
188     /**
189      * Definition of the property which
190      * holds the name of the current member.
191      */

192     public static final Property MEMBER_NAME =
193             new Property("MEMBER_NAME", Datatype.TYPE_STRING, MEMBER_NAME_ORDINAL, false, true, false, "Required. Name of the member.");
194
195     public static final int MEMBER_UNIQUE_NAME_ORDINAL = 19;
196     /**
197      * Definition of the property which
198      * holds the unique name of the current member.
199      */

200     public static final Property MEMBER_UNIQUE_NAME =
201             new Property("MEMBER_UNIQUE_NAME", Datatype.TYPE_STRING, MEMBER_UNIQUE_NAME_ORDINAL, false, true, false, "Required. Unique name of the member. For providers that generate unique names by qualification, each component of this name is delimited.");
202
203     public static final int MEMBER_TYPE_ORDINAL = 20;
204     /**
205      * Definition of the property which
206      * holds the type of the member.
207      */

208     public static final Property MEMBER_TYPE =
209             new Property("MEMBER_TYPE", Datatype.TYPE_STRING, MEMBER_TYPE_ORDINAL, false, true, false, "Required. Type of the member. Can be one of the following values: MDMEMBER_TYPE_REGULAR, MDMEMBER_TYPE_ALL, MDMEMBER_TYPE_FORMULA, MDMEMBER_TYPE_MEASURE, MDMEMBER_TYPE_UNKNOWN. MDMEMBER_TYPE_FORMULA takes precedence over MDMEMBER_TYPE_MEASURE. Therefore, if there is a formula (calculated) member on the Measures dimension, it is listed as MDMEMBER_TYPE_FORMULA.");
210
211     public static final int MEMBER_GUID_ORDINAL = 21;
212     /**
213      * Definition of the property which
214      * holds the GUID of the member
215      */

216     public static final Property MEMBER_GUID =
217             new Property("MEMBER_GUID", Datatype.TYPE_STRING, MEMBER_GUID_ORDINAL, false, true, false, "Optional. Member GUID. NULL if no GUID exists.");
218
219     public static final int MEMBER_CAPTION_ORDINAL = 22;
220     /**
221      * Definition of the property which
222      * holds the label or caption associated with the member, or the
223      * member's name if no caption is defined.
224      */

225     public static final Property MEMBER_CAPTION =
226             new Property("MEMBER_CAPTION", Datatype.TYPE_STRING, MEMBER_CAPTION_ORDINAL, false, true, false, "Required. A label or caption associated with the member. Used primarily for display purposes. If a caption does not exist, MEMBER_NAME is returned.");
227
228     public static final int CHILDREN_CARDINALITY_ORDINAL = 23;
229     /**
230      * Definition of the property which holds the
231      * number of children this member has.
232      */

233     public static final Property CHILDREN_CARDINALITY =
234             new Property("CHILDREN_CARDINALITY", Datatype.TYPE_NUMERIC, CHILDREN_CARDINALITY_ORDINAL, false, true, false, "Required. Number of children that the member has. This can be an estimate, so consumers should not rely on this to be the exact count. Providers should return the best estimate possible.");
235
236     public static final int PARENT_LEVEL_ORDINAL = 24;
237     /**
238      * Definition of the property which holds the
239      * distance from the root of the hierarchy of this member's parent.
240      */

241     public static final Property PARENT_LEVEL =
242             new Property("PARENT_LEVEL", Datatype.TYPE_NUMERIC, PARENT_LEVEL_ORDINAL, false, true, false, "Required. The distance of the member's parent from the root level of the hierarchy. The root level is zero.");
243
244     public static final int PARENT_UNIQUE_NAME_ORDINAL = 25;
245     /**
246      * Definition of the property which holds the
247      * Name of the current catalog.
248      */

249     public static final Property PARENT_UNIQUE_NAME =
250             new Property("PARENT_UNIQUE_NAME", Datatype.TYPE_STRING, PARENT_UNIQUE_NAME_ORDINAL, false, true, false, "Required. Unique name of the member's parent. NULL is returned for any members at the root level. For providers that generate unique names by qualification, each component of this name is delimited.");
251
252     public static final int PARENT_COUNT_ORDINAL = 26;
253     /**
254      * Definition of the property which holds the
255      * number of parents that this member has. Generally 1, or 0 for root members.
256      */

257     public static final Property PARENT_COUNT =
258             new Property("PARENT_COUNT", Datatype.TYPE_NUMERIC, PARENT_COUNT_ORDINAL, false, true, false, "Required. Number of parents that this member has.");
259
260     public static final int DESCRIPTION_ORDINAL = 27;
261     /**
262      * Definition of the property which holds the
263      * description of this member.
264      */

265     public static final Property DESCRIPTION =
266             new Property("DESCRIPTION", Datatype.TYPE_STRING, DESCRIPTION_ORDINAL, false, true, false, "Optional. A human-readable description of the member.");
267
268     public static final int VISIBLE_ORDINAL = 28;
269     /**
270      * Definition of the internal property which holds the
271      * name of the system property which determines whether to show a member
272      * (especially a measure or calculated member) in a user interface such as
273      * JPivot.
274      */

275     public static final Property VISIBLE =
276             new Property("$visible", Datatype.TYPE_BOOLEAN, VISIBLE_ORDINAL, true, false, false, null);
277
278     // Cell properties
279

280
281     public static final int BACK_COLOR_ORDINAL = 30;
282     public static final Property BACK_COLOR =
283             new Property("BACK_COLOR", Datatype.TYPE_STRING, BACK_COLOR_ORDINAL, false, false, true, "The background color for displaying the VALUE or FORMATTED_VALUE property. For more information, see FORE_COLOR and BACK_COLOR Contents.");
284
285     public static final int CELL_EVALUATION_LIST_ORDINAL = 31;
286     public static final Property CELL_EVALUATION_LIST =
287             new Property("CELL_EVALUATION_LIST", Datatype.TYPE_STRING, CELL_EVALUATION_LIST_ORDINAL, false, false, true, "The semicolon-delimited list of evaluated formulas applicable to the cell, in order from lowest to highest solve order. For more information about solve order, see Understanding Pass Order and Solve Order");
288
289     public static final int CELL_ORDINAL_ORDINAL = 32;
290     public static final Property CELL_ORDINAL =
291             new Property("CELL_ORDINAL", Datatype.TYPE_NUMERIC, CELL_ORDINAL_ORDINAL, false, false, true, "The ordinal number of the cell in the dataset.");
292
293     public static final int FORE_COLOR_ORDINAL = 33;
294     public static final Property FORE_COLOR =
295             new Property("FORE_COLOR", Datatype.TYPE_STRING, FORE_COLOR_ORDINAL, false, false, true, "The foreground color for displaying the VALUE or FORMATTED_VALUE property. For more information, see FORE_COLOR and BACK_COLOR Contents.");
296
297     public static final int FONT_NAME_ORDINAL = 34;
298     public static final Property FONT_NAME =
299             new Property("FONT_NAME", Datatype.TYPE_STRING, FONT_NAME_ORDINAL, false, false, true, "The font to be used to display the VALUE or FORMATTED_VALUE property.");
300
301     public static final int FONT_SIZE_ORDINAL = 35;
302     public static final Property FONT_SIZE =
303             new Property("FONT_SIZE", Datatype.TYPE_STRING, FONT_SIZE_ORDINAL, false, false, true, "Font size to be used to display the VALUE or FORMATTED_VALUE property.");
304
305     public static final int FONT_FLAGS_ORDINAL = 36;
306     public static final Property FONT_FLAGS =
307             new Property("FONT_FLAGS", Datatype.TYPE_NUMERIC, FONT_FLAGS_ORDINAL, false, false, true, "The bitmask detailing effects on the font. The value is the result of a bitwise OR operation of one or more of the following constants: MDFF_BOLD = 1, MDFF_ITALIC = 2, MDFF_UNDERLINE = 4, MDFF_STRIKEOUT = 8. For example, the value 5 represents the combination of bold (MDFF_BOLD) and underline (MDFF_UNDERLINE) font effects.");
308
309
310     public static final int FORMATTED_VALUE_ORDINAL = 37;
311     /**
312      * Definition of the property which
313      * holds the formatted value of a cell.
314      */

315     public static final Property FORMATTED_VALUE =
316             new Property("FORMATTED_VALUE", Datatype.TYPE_STRING, FORMATTED_VALUE_ORDINAL, false, false, true, "The character string that represents a formatted display of the VALUE property.");
317
318     public static final int FORMAT_STRING_ORDINAL = 38;
319     /**
320      * Definition of the property which
321      * holds the format string used to format cell values.
322      */

323     public static final Property FORMAT_STRING =
324             new Property("FORMAT_STRING", Datatype.TYPE_STRING, FORMAT_STRING_ORDINAL, false, false, true, "The format string used to create the FORMATTED_VALUE property value. For more information, see FORMAT_STRING Contents.");
325
326     public static final int NON_EMPTY_BEHAVIOR_ORDINAL = 39;
327     public static final Property NON_EMPTY_BEHAVIOR =
328             new Property("NON_EMPTY_BEHAVIOR", Datatype.TYPE_STRING, NON_EMPTY_BEHAVIOR_ORDINAL, false, false, true, "The measure used to determine the behavior of calculated members when resolving empty cells.");
329
330     public static final int SOLVE_ORDER_ORDINAL = 40;
331     /**
332      * Definition of the property which
333      * determines the solve order of a calculated member with respect to other
334      * calculated members.
335      */

336     public static final Property SOLVE_ORDER =
337             new Property("SOLVE_ORDER", Datatype.TYPE_NUMERIC, SOLVE_ORDER_ORDINAL, false, false, true, "The solve order of the cell.");
338
339     public static final int VALUE_ORDINAL = 41;
340     /**
341      * Definition of the property which
342      * holds the value of a cell. Is usually numeric (since most measures are
343      * numeric) but is occasionally another type.
344      *
345      * <p>It is also applicable to members.
346      */

347     public static final Property VALUE =
348             new Property("VALUE", Datatype.TYPE_NUMERIC, VALUE_ORDINAL, false, true, true, "The unformatted value of the cell.");
349
350     public static final int DATATYPE_ORDINAL = 42;
351     /**
352      * Definition of the property which
353      * holds the datatype of a cell. Valid values are "String",
354      * "Numeric", "Integer". The property's value derives from the
355      * "datatype" attribute of the "Measure" element; if the datatype attribute
356      * is not specified, the datatype is "Numeric" by default, except measures
357      * whose aggregator is "Count", whose datatype is "Integer".
358      */

359     public static final Property DATATYPE =
360             new Property("DATATYPE", Datatype.TYPE_STRING, DATATYPE_ORDINAL, false, false, true, "The datatype of the cell.");
361
362     public static final int DEPTH_ORDINAL = 43;
363     /**
364      * Definition of the property which
365      * holds the level depth of a member.
366      * Caution: Level depth of members in parent-child hierarchy isn't from their levels.
367      * It's calculated from the underlying data dynamically.
368      */

369     public static final Property DEPTH =
370             new Property("DEPTH", Datatype.TYPE_NUMERIC, DEPTH_ORDINAL, true, true, false, "The level depth of a member");
371
372     public static final int DISPLAY_INFO_ORDINAL = 44;
373     /**
374      * Definition of the property which
375      * holds the DISPLAY_INFO required by XML/A
376      * Caution: This property's value is calculated base on a specified MDX query, so it's value is dynamical at runtime.
377      */

378     public static final Property DISPLAY_INFO =
379             new Property("DISPLAY_INFO", Datatype.TYPE_NUMERIC, DISPLAY_INFO_ORDINAL, false, true, false, "Display instruction of a member for XML/A");
380
381     /**
382      * The various property names which define a format string.
383      */

384     static final String JavaDoc[] FORMAT_PROPERTIES = {
385         "format", "format_string", "FORMAT", FORMAT_STRING.name,
386     };
387
388     // ~ Data members ---------------------------------------------------------
389

390     /**
391      * The datatype of the property.
392      */

393     private final Datatype type;
394
395     /**
396      * Whether the property is internal.
397      */

398     private final boolean internal;
399     private final boolean member;
400     private final boolean cell;
401
402     private static int nextOrdinal = 100;
403
404     // ~ Methods --------------------------------------------------------------
405

406     /**
407      * Creates a property definition. If ordinal is negative, generates a
408      * unique positive ordinal.
409      */

410     protected Property(
411             String JavaDoc name,
412             Datatype type,
413             int ordinal,
414             boolean internal,
415             boolean member,
416             boolean cell,
417             String JavaDoc description) {
418         super(name, ordinal < 0 ? nextOrdinal++ : ordinal, description);
419         this.type = type;
420         this.internal = internal;
421         this.member = member;
422         this.cell = cell;
423     }
424
425     /**
426      * Returns the datatype of the property.
427      */

428     public Datatype getType() {
429         return type;
430     }
431
432     public PropertyFormatter getFormatter() {
433         return null;
434     }
435
436     /**
437      * Returns the caption of this property.
438      */

439     public String JavaDoc getCaption() {
440         return name;
441     }
442
443     /**
444      * Returns whether this property is for system use only.
445      */

446     public boolean isInternal() {
447         return internal;
448     }
449
450     /**
451      * Returns whether this property is a standard member property.
452      */

453     public boolean isMemberProperty() {
454         return member;
455     }
456
457     /**
458      * Returns whether this property is a standard member property.
459      */

460     public boolean isCellProperty() {
461         return cell && ordinal <= VALUE_ORDINAL;
462     }
463
464     /**
465      * Returns whether this property is standard.
466      */

467     public boolean isStandard() {
468         return ordinal <= VALUE_ORDINAL;
469     }
470
471
472     public static final EnumeratedValues<Property> enumeration =
473         new EnumeratedValues<Property>(
474             new Property[] {
475                 FORMAT_EXP,
476                 AGGREGATION_TYPE,
477                 NAME,
478                 CAPTION,
479                 CONTRIBUTING_CHILDREN,
480                 FORMULA,
481                 CATALOG_NAME,
482                 SCHEMA_NAME,
483                 CUBE_NAME,
484                 DIMENSION_UNIQUE_NAME,
485                 HIERARCHY_UNIQUE_NAME,
486                 LEVEL_UNIQUE_NAME,
487                 LEVEL_NUMBER,
488                 MEMBER_UNIQUE_NAME,
489                 MEMBER_NAME,
490                 MEMBER_TYPE,
491                 MEMBER_GUID,
492                 MEMBER_CAPTION,
493                 MEMBER_ORDINAL,
494                 CHILDREN_CARDINALITY,
495                 PARENT_LEVEL,
496                 PARENT_UNIQUE_NAME,
497                 PARENT_COUNT,
498                 DESCRIPTION,
499                 VISIBLE,
500                 BACK_COLOR,
501                 CELL_EVALUATION_LIST,
502                 CELL_ORDINAL,
503                 FORE_COLOR,
504                 FONT_NAME,
505                 FONT_SIZE,
506                 FONT_FLAGS,
507                 FORMAT_STRING,
508                 FORMATTED_VALUE,
509                 NON_EMPTY_BEHAVIOR,
510                 SOLVE_ORDER,
511                 VALUE,
512                 DATATYPE,
513             });
514
515     /**
516      * Looks up a Property with a given ordinal.
517      * Returns null if not found.
518      */

519     public static Property lookup(int ordinal) {
520         return enumeration.getValue(ordinal);
521     }
522
523     /**
524      * Looks up a Property with a given name.
525      *
526      * @param name Name of property
527      * @param matchCase Whether to perform case-sensitive match
528      * @return Property with given name, or null if not found.
529      */

530     public static Property lookup(String JavaDoc name, boolean matchCase) {
531         if (!matchCase) {
532             return enumeration.getValueIgnoreCase(name, false);
533         } else {
534             return enumeration.getValue(name, false);
535         }
536     }
537 }
538
539 // End Property.java
540
Popular Tags