KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > naming > resources > ResourceAttributes


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 package org.apache.naming.resources;
19
20 import java.text.ParseException JavaDoc;
21 import java.text.SimpleDateFormat JavaDoc;
22 import java.util.Date JavaDoc;
23 import java.util.Locale JavaDoc;
24 import java.util.TimeZone JavaDoc;
25 import java.util.Vector JavaDoc;
26
27 import javax.naming.NamingEnumeration JavaDoc;
28 import javax.naming.NamingException JavaDoc;
29 import javax.naming.directory.Attribute JavaDoc;
30 import javax.naming.directory.Attributes JavaDoc;
31 import javax.naming.directory.BasicAttribute JavaDoc;
32
33 /**
34  * Attributes implementation.
35  *
36  * @author <a HREF="mailto:remm@apache.org">Remy Maucherat</a>
37  * @version $Revision: 467222 $
38  */

39 public class ResourceAttributes implements Attributes JavaDoc {
40     
41     
42     // -------------------------------------------------------------- Constants
43

44     
45     // Default attribute names
46

47     /**
48      * Creation date.
49      */

50     public static final String JavaDoc CREATION_DATE = "creationdate";
51     
52     
53     /**
54      * Creation date.
55      */

56     public static final String JavaDoc ALTERNATE_CREATION_DATE = "creation-date";
57     
58     
59     /**
60      * Last modification date.
61      */

62     public static final String JavaDoc LAST_MODIFIED = "getlastmodified";
63     
64     
65     /**
66      * Last modification date.
67      */

68     public static final String JavaDoc ALTERNATE_LAST_MODIFIED = "last-modified";
69     
70     
71     /**
72      * Name.
73      */

74     public static final String JavaDoc NAME = "displayname";
75     
76     
77     /**
78      * Type.
79      */

80     public static final String JavaDoc TYPE = "resourcetype";
81     
82     
83     /**
84      * Type.
85      */

86     public static final String JavaDoc ALTERNATE_TYPE = "content-type";
87     
88     
89     /**
90      * Source.
91      */

92     public static final String JavaDoc SOURCE = "source";
93     
94     
95     /**
96      * MIME type of the content.
97      */

98     public static final String JavaDoc CONTENT_TYPE = "getcontenttype";
99     
100     
101     /**
102      * Content language.
103      */

104     public static final String JavaDoc CONTENT_LANGUAGE = "getcontentlanguage";
105     
106     
107     /**
108      * Content length.
109      */

110     public static final String JavaDoc CONTENT_LENGTH = "getcontentlength";
111     
112     
113     /**
114      * Content length.
115      */

116     public static final String JavaDoc ALTERNATE_CONTENT_LENGTH = "content-length";
117     
118     
119     /**
120      * ETag.
121      */

122     public static final String JavaDoc ETAG = "getetag";
123     
124     
125     /**
126      * Collection type.
127      */

128     public static final String JavaDoc COLLECTION_TYPE = "<collection/>";
129     
130     
131     /**
132      * HTTP date format.
133      */

134     protected static final SimpleDateFormat JavaDoc format =
135         new SimpleDateFormat JavaDoc("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
136     
137     
138     /**
139      * Date formats using for Date parsing.
140      */

141     protected static final SimpleDateFormat JavaDoc formats[] = {
142         new SimpleDateFormat JavaDoc("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US),
143         new SimpleDateFormat JavaDoc("EEEEEE, dd-MMM-yy HH:mm:ss zzz", Locale.US),
144         new SimpleDateFormat JavaDoc("EEE MMMM d HH:mm:ss yyyy", Locale.US)
145     };
146     
147     
148     protected final static TimeZone JavaDoc gmtZone = TimeZone.getTimeZone("GMT");
149
150
151     /**
152      * GMT timezone - all HTTP dates are on GMT
153      */

154     static {
155
156         format.setTimeZone(gmtZone);
157
158         formats[0].setTimeZone(gmtZone);
159         formats[1].setTimeZone(gmtZone);
160         formats[2].setTimeZone(gmtZone);
161
162     }
163
164
165     // ----------------------------------------------------------- Constructors
166

167     
168     /**
169      * Default constructor.
170      */

171     public ResourceAttributes() {
172     }
173     
174     
175     /**
176      * Merges with another attribute set.
177      */

178     public ResourceAttributes(Attributes JavaDoc attributes) {
179         this.attributes = attributes;
180     }
181     
182     
183     // ----------------------------------------------------- Instance Variables
184

185
186     /**
187      * Collection flag.
188      */

189     protected boolean collection = false;
190
191
192     /**
193      * Content length.
194      */

195     protected long contentLength = -1;
196
197
198     /**
199      * Creation time.
200      */

201     protected long creation = -1;
202
203
204     /**
205      * Creation date.
206      */

207     protected Date JavaDoc creationDate = null;
208
209
210     /**
211      * Last modified time.
212      */

213     protected long lastModified = -1;
214
215
216     /**
217      * Last modified date.
218      */

219     protected Date JavaDoc lastModifiedDate = null;
220
221     
222     /**
223      * Last modified date in HTTP format.
224      */

225     protected String JavaDoc lastModifiedHttp = null;
226     
227
228     /**
229      * MIME type.
230      */

231     protected String JavaDoc mimeType = null;
232     
233
234     /**
235      * Name.
236      */

237     protected String JavaDoc name = null;
238
239
240     /**
241      * Weak ETag.
242      */

243     protected String JavaDoc weakETag = null;
244
245
246     /**
247      * Strong ETag.
248      */

249     protected String JavaDoc strongETag = null;
250
251
252     /**
253      * External attributes.
254      */

255     protected Attributes JavaDoc attributes = null;
256
257
258     // ------------------------------------------------------------- Properties
259

260
261     /**
262      * Is collection.
263      */

264     public boolean isCollection() {
265         if (attributes != null) {
266             return (getResourceType().equals(COLLECTION_TYPE));
267         } else {
268             return (collection);
269         }
270     }
271     
272     
273     /**
274      * Set collection flag.
275      *
276      * @param collection New flag value
277      */

278     public void setCollection(boolean collection) {
279         this.collection = collection;
280         if (attributes != null) {
281             String JavaDoc value = "";
282             if (collection)
283                 value = COLLECTION_TYPE;
284             attributes.put(TYPE, value);
285         }
286     }
287     
288     
289     /**
290      * Get content length.
291      *
292      * @return content length value
293      */

294     public long getContentLength() {
295         if (contentLength != -1L)
296             return contentLength;
297         if (attributes != null) {
298             Attribute JavaDoc attribute = attributes.get(CONTENT_LENGTH);
299             if (attribute != null) {
300                 try {
301                     Object JavaDoc value = attribute.get();
302                     if (value instanceof Long JavaDoc) {
303                         contentLength = ((Long JavaDoc) value).longValue();
304                     } else {
305                         try {
306                             contentLength = Long.parseLong(value.toString());
307                         } catch (NumberFormatException JavaDoc e) {
308                             ; // Ignore
309
}
310                     }
311                 } catch (NamingException JavaDoc e) {
312                     ; // No value for the attribute
313
}
314             }
315         }
316         return contentLength;
317     }
318     
319     
320     /**
321      * Set content length.
322      *
323      * @param contentLength New content length value
324      */

325     public void setContentLength(long contentLength) {
326         this.contentLength = contentLength;
327         if (attributes != null)
328             attributes.put(CONTENT_LENGTH, new Long JavaDoc(contentLength));
329     }
330     
331     
332     /**
333      * Get creation time.
334      *
335      * @return creation time value
336      */

337     public long getCreation() {
338         if (creation != -1L)
339             return creation;
340         if (creationDate != null)
341             return creationDate.getTime();
342         if (attributes != null) {
343             Attribute JavaDoc attribute = attributes.get(CREATION_DATE);
344             if (attribute != null) {
345                 try {
346                     Object JavaDoc value = attribute.get();
347                     if (value instanceof Long JavaDoc) {
348                         creation = ((Long JavaDoc) value).longValue();
349                     } else if (value instanceof Date JavaDoc) {
350                         creation = ((Date JavaDoc) value).getTime();
351                         creationDate = (Date JavaDoc) value;
352                     } else {
353                         String JavaDoc creationDateValue = value.toString();
354                         Date JavaDoc result = null;
355                         // Parsing the HTTP Date
356
for (int i = 0; (result == null) &&
357                                  (i < formats.length); i++) {
358                             try {
359                                 result = formats[i].parse(creationDateValue);
360                             } catch (ParseException JavaDoc e) {
361                                 ;
362                             }
363                         }
364                         if (result != null) {
365                             creation = result.getTime();
366                             creationDate = result;
367                         }
368                     }
369                 } catch (NamingException JavaDoc e) {
370                     ; // No value for the attribute
371
}
372             }
373         }
374         return creation;
375     }
376     
377     
378     /**
379      * Set creation.
380      *
381      * @param creation New creation value
382      */

383     public void setCreation(long creation) {
384         this.creation = creation;
385         this.creationDate = null;
386         if (attributes != null)
387             attributes.put(CREATION_DATE, new Date JavaDoc(creation));
388     }
389     
390     
391     /**
392      * Get creation date.
393      *
394      * @return Creation date value
395      */

396     public Date JavaDoc getCreationDate() {
397         if (creationDate != null)
398             return creationDate;
399         if (creation != -1L) {
400             creationDate = new Date JavaDoc(creation);
401             return creationDate;
402         }
403         if (attributes != null) {
404             Attribute JavaDoc attribute = attributes.get(CREATION_DATE);
405             if (attribute != null) {
406                 try {
407                     Object JavaDoc value = attribute.get();
408                     if (value instanceof Long JavaDoc) {
409                         creation = ((Long JavaDoc) value).longValue();
410                         creationDate = new Date JavaDoc(creation);
411                     } else if (value instanceof Date JavaDoc) {
412                         creation = ((Date JavaDoc) value).getTime();
413                         creationDate = (Date JavaDoc) value;
414                     } else {
415                         String JavaDoc creationDateValue = value.toString();
416                         Date JavaDoc result = null;
417                         // Parsing the HTTP Date
418
for (int i = 0; (result == null) &&
419                                  (i < formats.length); i++) {
420                             try {
421                                 result = formats[i].parse(creationDateValue);
422                             } catch (ParseException JavaDoc e) {
423                                 ;
424                             }
425                         }
426                         if (result != null) {
427                             creation = result.getTime();
428                             creationDate = result;
429                         }
430                     }
431                 } catch (NamingException JavaDoc e) {
432                     ; // No value for the attribute
433
}
434             }
435         }
436         return creationDate;
437     }
438     
439     
440     /**
441      * Creation date mutator.
442      *
443      * @param creationDate New creation date
444      */

445     public void setCreationDate(Date JavaDoc creationDate) {
446         this.creation = creationDate.getTime();
447         this.creationDate = creationDate;
448         if (attributes != null)
449             attributes.put(CREATION_DATE, creationDate);
450     }
451     
452     
453     /**
454      * Get last modified time.
455      *
456      * @return lastModified time value
457      */

458     public long getLastModified() {
459         if (lastModified != -1L)
460             return lastModified;
461         if (lastModifiedDate != null)
462             return lastModifiedDate.getTime();
463         if (attributes != null) {
464             Attribute JavaDoc attribute = attributes.get(LAST_MODIFIED);
465             if (attribute != null) {
466                 try {
467                     Object JavaDoc value = attribute.get();
468                     if (value instanceof Long JavaDoc) {
469                         lastModified = ((Long JavaDoc) value).longValue();
470                     } else if (value instanceof Date JavaDoc) {
471                         lastModified = ((Date JavaDoc) value).getTime();
472                         lastModifiedDate = (Date JavaDoc) value;
473                     } else {
474                         String JavaDoc lastModifiedDateValue = value.toString();
475                         Date JavaDoc result = null;
476                         // Parsing the HTTP Date
477
for (int i = 0; (result == null) &&
478                                  (i < formats.length); i++) {
479                             try {
480                                 result =
481                                     formats[i].parse(lastModifiedDateValue);
482                             } catch (ParseException JavaDoc e) {
483                                 ;
484                             }
485                         }
486                         if (result != null) {
487                             lastModified = result.getTime();
488                             lastModifiedDate = result;
489                         }
490                     }
491                 } catch (NamingException JavaDoc e) {
492                     ; // No value for the attribute
493
}
494             }
495         }
496         return lastModified;
497     }
498     
499     
500     /**
501      * Set last modified.
502      *
503      * @param lastModified New last modified value
504      */

505     public void setLastModified(long lastModified) {
506         this.lastModified = lastModified;
507         this.lastModifiedDate = null;
508         if (attributes != null)
509             attributes.put(LAST_MODIFIED, new Date JavaDoc(lastModified));
510     }
511     
512     
513     /**
514      * Set last modified date.
515      *
516      * @param lastModified New last modified date value
517      * @deprecated
518      */

519     public void setLastModified(Date JavaDoc lastModified) {
520         setLastModifiedDate(lastModified);
521     }
522
523
524     /**
525      * Get lastModified date.
526      *
527      * @return LastModified date value
528      */

529     public Date JavaDoc getLastModifiedDate() {
530         if (lastModifiedDate != null)
531             return lastModifiedDate;
532         if (lastModified != -1L) {
533             lastModifiedDate = new Date JavaDoc(lastModified);
534             return lastModifiedDate;
535         }
536         if (attributes != null) {
537             Attribute JavaDoc attribute = attributes.get(LAST_MODIFIED);
538             if (attribute != null) {
539                 try {
540                     Object JavaDoc value = attribute.get();
541                     if (value instanceof Long JavaDoc) {
542                         lastModified = ((Long JavaDoc) value).longValue();
543                         lastModifiedDate = new Date JavaDoc(lastModified);
544                     } else if (value instanceof Date JavaDoc) {
545                         lastModified = ((Date JavaDoc) value).getTime();
546                         lastModifiedDate = (Date JavaDoc) value;
547                     } else {
548                         String JavaDoc lastModifiedDateValue = value.toString();
549                         Date JavaDoc result = null;
550                         // Parsing the HTTP Date
551
for (int i = 0; (result == null) &&
552                                  (i < formats.length); i++) {
553                             try {
554                                 result =
555                                     formats[i].parse(lastModifiedDateValue);
556                             } catch (ParseException JavaDoc e) {
557                                 ;
558                             }
559                         }
560                         if (result != null) {
561                             lastModified = result.getTime();
562                             lastModifiedDate = result;
563                         }
564                     }
565                 } catch (NamingException JavaDoc e) {
566                     ; // No value for the attribute
567
}
568             }
569         }
570         return lastModifiedDate;
571     }
572     
573     
574     /**
575      * Last modified date mutator.
576      *
577      * @param lastModifiedDate New last modified date
578      */

579     public void setLastModifiedDate(Date JavaDoc lastModifiedDate) {
580         this.lastModified = lastModifiedDate.getTime();
581         this.lastModifiedDate = lastModifiedDate;
582         if (attributes != null)
583             attributes.put(LAST_MODIFIED, lastModifiedDate);
584     }
585     
586     
587     /**
588      * @return Returns the lastModifiedHttp.
589      */

590     public String JavaDoc getLastModifiedHttp() {
591         if (lastModifiedHttp != null)
592             return lastModifiedHttp;
593         Date JavaDoc modifiedDate = getLastModifiedDate();
594         if (modifiedDate == null) {
595             modifiedDate = getCreationDate();
596         }
597         if (modifiedDate == null) {
598             modifiedDate = new Date JavaDoc();
599         }
600         synchronized (format) {
601             lastModifiedHttp = format.format(modifiedDate);
602         }
603         return lastModifiedHttp;
604     }
605     
606     
607     /**
608      * @param lastModifiedHttp The lastModifiedHttp to set.
609      */

610     public void setLastModifiedHttp(String JavaDoc lastModifiedHttp) {
611         this.lastModifiedHttp = lastModifiedHttp;
612     }
613     
614     
615     /**
616      * @return Returns the mimeType.
617      */

618     public String JavaDoc getMimeType() {
619         return mimeType;
620     }
621     
622     
623     /**
624      * @param mimeType The mimeType to set.
625      */

626     public void setMimeType(String JavaDoc mimeType) {
627         this.mimeType = mimeType;
628     }
629
630     
631     /**
632      * Get name.
633      *
634      * @return Name value
635      */

636     public String JavaDoc getName() {
637         if (name != null)
638             return name;
639         if (attributes != null) {
640             Attribute JavaDoc attribute = attributes.get(NAME);
641             if (attribute != null) {
642                 try {
643                     name = attribute.get().toString();
644                 } catch (NamingException JavaDoc e) {
645                     ; // No value for the attribute
646
}
647             }
648         }
649         return name;
650     }
651
652
653     /**
654      * Set name.
655      *
656      * @param name New name value
657      */

658     public void setName(String JavaDoc name) {
659         this.name = name;
660         if (attributes != null)
661             attributes.put(NAME, name);
662     }
663     
664     
665     /**
666      * Get resource type.
667      *
668      * @return String resource type
669      */

670     public String JavaDoc getResourceType() {
671         String JavaDoc result = null;
672         if (attributes != null) {
673             Attribute JavaDoc attribute = attributes.get(TYPE);
674             if (attribute != null) {
675                 try {
676                     result = attribute.get().toString();
677                 } catch (NamingException JavaDoc e) {
678                     ; // No value for the attribute
679
}
680             }
681         }
682         if (result == null) {
683             if (collection)
684                 result = COLLECTION_TYPE;
685             else
686                 result = "";
687         }
688         return result;
689     }
690     
691     
692     /**
693      * Type mutator.
694      *
695      * @param resourceType New resource type
696      */

697     public void setResourceType(String JavaDoc resourceType) {
698         collection = resourceType.equals(COLLECTION_TYPE);
699         if (attributes != null)
700             attributes.put(TYPE, resourceType);
701     }
702
703
704     /**
705      * Get ETag.
706      *
707      * @return Weak ETag
708      */

709     public String JavaDoc getETag() {
710         return getETag(false);
711     }
712
713
714     /**
715      * Get ETag.
716      *
717      * @param strong If true, the strong ETag will be returned
718      * @return ETag
719      */

720     public String JavaDoc getETag(boolean strong) {
721         String JavaDoc result = null;
722         if (attributes != null) {
723             Attribute JavaDoc attribute = attributes.get(ETAG);
724             if (attribute != null) {
725                 try {
726                     result = attribute.get().toString();
727                 } catch (NamingException JavaDoc e) {
728                     ; // No value for the attribute
729
}
730             }
731         }
732         if (strong) {
733             // The strong ETag must always be calculated by the resources
734
result = strongETag;
735         } else {
736             // The weakETag is contentLenght + lastModified
737
if (weakETag == null) {
738                 weakETag = "W/\"" + getContentLength() + "-"
739                     + getLastModified() + "\"";
740             }
741             result = weakETag;
742         }
743         return result;
744     }
745
746
747     /**
748      * Set strong ETag.
749      */

750     public void setETag(String JavaDoc eTag) {
751         this.strongETag = eTag;
752         if (attributes != null)
753             attributes.put(ETAG, eTag);
754     }
755
756     
757     /**
758      * Return the canonical path of the resource, to possibly be used for
759      * direct file serving. Implementations which support this should override
760      * it to return the file path.
761      *
762      * @return The canonical path of the resource
763      */

764     public String JavaDoc getCanonicalPath() {
765         return null;
766     }
767     
768     
769     // ----------------------------------------------------- Attributes Methods
770

771
772     /**
773      * Get attribute.
774      */

775     public Attribute JavaDoc get(String JavaDoc attrID) {
776         if (attributes == null) {
777             if (attrID.equals(CREATION_DATE)) {
778                 return new BasicAttribute JavaDoc(CREATION_DATE, getCreationDate());
779             } else if (attrID.equals(ALTERNATE_CREATION_DATE)) {
780                 return new BasicAttribute JavaDoc(ALTERNATE_CREATION_DATE,
781                                           getCreationDate());
782             } else if (attrID.equals(LAST_MODIFIED)) {
783                 return new BasicAttribute JavaDoc(LAST_MODIFIED,
784                                           getLastModifiedDate());
785             } else if (attrID.equals(ALTERNATE_LAST_MODIFIED)) {
786                 return new BasicAttribute JavaDoc(ALTERNATE_LAST_MODIFIED,
787                                           getLastModifiedDate());
788             } else if (attrID.equals(NAME)) {
789                 return new BasicAttribute JavaDoc(NAME, getName());
790             } else if (attrID.equals(TYPE)) {
791                 return new BasicAttribute JavaDoc(TYPE, getResourceType());
792             } else if (attrID.equals(ALTERNATE_TYPE)) {
793                 return new BasicAttribute JavaDoc(ALTERNATE_TYPE, getResourceType());
794             } else if (attrID.equals(CONTENT_LENGTH)) {
795                 return new BasicAttribute JavaDoc(CONTENT_LENGTH,
796                                           new Long JavaDoc(getContentLength()));
797             } else if (attrID.equals(ALTERNATE_CONTENT_LENGTH)) {
798                 return new BasicAttribute JavaDoc(ALTERNATE_CONTENT_LENGTH,
799                                           new Long JavaDoc(getContentLength()));
800             }
801         } else {
802             return attributes.get(attrID);
803         }
804         return null;
805     }
806     
807     
808     /**
809      * Put attribute.
810      */

811     public Attribute JavaDoc put(Attribute JavaDoc attribute) {
812         if (attributes == null) {
813             try {
814                 return put(attribute.getID(), attribute.get());
815             } catch (NamingException JavaDoc e) {
816                 return null;
817             }
818         } else {
819             return attributes.put(attribute);
820         }
821     }
822     
823     
824     /**
825      * Put attribute.
826      */

827     public Attribute JavaDoc put(String JavaDoc attrID, Object JavaDoc val) {
828         if (attributes == null) {
829             return null; // No reason to implement this
830
} else {
831             return attributes.put(attrID, val);
832         }
833     }
834     
835     
836     /**
837      * Remove attribute.
838      */

839     public Attribute JavaDoc remove(String JavaDoc attrID) {
840         if (attributes == null) {
841             return null; // No reason to implement this
842
} else {
843             return attributes.remove(attrID);
844         }
845     }
846     
847     
848     /**
849      * Get all attributes.
850      */

851     public NamingEnumeration JavaDoc getAll() {
852         if (attributes == null) {
853             Vector JavaDoc attributes = new Vector JavaDoc();
854             attributes.addElement(new BasicAttribute JavaDoc
855                                   (CREATION_DATE, getCreationDate()));
856             attributes.addElement(new BasicAttribute JavaDoc
857                                   (LAST_MODIFIED, getLastModifiedDate()));
858             attributes.addElement(new BasicAttribute JavaDoc(NAME, getName()));
859             attributes.addElement(new BasicAttribute JavaDoc(TYPE, getResourceType()));
860             attributes.addElement
861                 (new BasicAttribute JavaDoc(CONTENT_LENGTH,
862                                     new Long JavaDoc(getContentLength())));
863             return new RecyclableNamingEnumeration(attributes);
864         } else {
865             return attributes.getAll();
866         }
867     }
868     
869     
870     /**
871      * Get all attribute IDs.
872      */

873     public NamingEnumeration JavaDoc getIDs() {
874         if (attributes == null) {
875             Vector JavaDoc attributeIDs = new Vector JavaDoc();
876             attributeIDs.addElement(CREATION_DATE);
877             attributeIDs.addElement(LAST_MODIFIED);
878             attributeIDs.addElement(NAME);
879             attributeIDs.addElement(TYPE);
880             attributeIDs.addElement(CONTENT_LENGTH);
881             return new RecyclableNamingEnumeration(attributeIDs);
882         } else {
883             return attributes.getIDs();
884         }
885     }
886     
887     
888     /**
889      * Retrieves the number of attributes in the attribute set.
890      */

891     public int size() {
892         if (attributes == null) {
893             return 5;
894         } else {
895             return attributes.size();
896         }
897     }
898     
899     
900     /**
901      * Clone the attributes object (WARNING: fake cloning).
902      */

903     public Object JavaDoc clone() {
904         return this;
905     }
906     
907     
908     /**
909      * Case sensitivity.
910      */

911     public boolean isCaseIgnored() {
912         return false;
913     }
914     
915     
916 }
917
Popular Tags