KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lucene > demo > html > Tags


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

18
19 import java.util.Collections JavaDoc;
20 import java.util.HashSet JavaDoc;
21 import java.util.Set JavaDoc;
22
23
24 public final class Tags {
25
26   /**
27    * contains all tags for which whitespaces have to be inserted for proper tokenization
28    */

29   public static final Set JavaDoc WS_ELEMS = Collections.synchronizedSet(new HashSet JavaDoc());
30
31   static{
32     WS_ELEMS.add("<hr"); //$NON-NLS-1$
33
WS_ELEMS.add("<hr/"); // note that "<hr />" does not need to be listed explicitly //$NON-NLS-1$
34
WS_ELEMS.add("<br"); //$NON-NLS-1$
35
WS_ELEMS.add("<br/"); //$NON-NLS-1$
36
WS_ELEMS.add("<p"); //$NON-NLS-1$
37
WS_ELEMS.add("</p"); //$NON-NLS-1$
38
WS_ELEMS.add("<div"); //$NON-NLS-1$
39
WS_ELEMS.add("</div"); //$NON-NLS-1$
40
WS_ELEMS.add("<td"); //$NON-NLS-1$
41
WS_ELEMS.add("</td"); //$NON-NLS-1$
42
WS_ELEMS.add("<li"); //$NON-NLS-1$
43
WS_ELEMS.add("</li"); //$NON-NLS-1$
44
WS_ELEMS.add("<q"); //$NON-NLS-1$
45
WS_ELEMS.add("</q"); //$NON-NLS-1$
46
WS_ELEMS.add("<blockquote"); //$NON-NLS-1$
47
WS_ELEMS.add("</blockquote"); //$NON-NLS-1$
48
WS_ELEMS.add("<dt"); //$NON-NLS-1$
49
WS_ELEMS.add("</dt"); //$NON-NLS-1$
50
WS_ELEMS.add("<h1"); //$NON-NLS-1$
51
WS_ELEMS.add("</h1"); //$NON-NLS-1$
52
WS_ELEMS.add("<h2"); //$NON-NLS-1$
53
WS_ELEMS.add("</h2"); //$NON-NLS-1$
54
WS_ELEMS.add("<h3"); //$NON-NLS-1$
55
WS_ELEMS.add("</h3"); //$NON-NLS-1$
56
WS_ELEMS.add("<h4"); //$NON-NLS-1$
57
WS_ELEMS.add("</h4"); //$NON-NLS-1$
58
WS_ELEMS.add("<h5"); //$NON-NLS-1$
59
WS_ELEMS.add("</h5"); //$NON-NLS-1$
60
WS_ELEMS.add("<h6"); //$NON-NLS-1$
61
WS_ELEMS.add("</h6"); //$NON-NLS-1$
62
}
63 }
64
Popular Tags