source: trunk/indexers/lucene-gs/src/org/greenstone/LuceneWrapper/XMLTagInfo.java@ 13686

Last change on this file since 13686 was 13686, checked in by kjdon, 17 years ago

package has changed to org.greenstone.LuceneWrapper to be consistent with other indexer packages

  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1/**********************************************************************
2 *
3 * XMLTagInfo.java
4 *
5 * Copyright 2006 The New Zealand Digital Library Project
6 *
7 * A component of the Greenstone digital library software
8 * from the New Zealand Digital Library Project at the
9 * University of Waikato, New Zealand.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 *********************************************************************/
26
27package org.greenstone.LuceneWrapper;
28
29
30import org.xml.sax.Attributes;
31
32/** XMLTagInfo
33 * contains any methods that are specific to what kind of XML you are working on
34 */
35
36public class XMLTagInfo {
37
38 public static boolean isDocumentLevel(Attributes atts)
39 {
40 boolean is_doc_level = false;
41 String id = atts.getValue("gs2:id");
42 if (id!=null) {
43 is_doc_level = true;
44 }
45 return is_doc_level;
46 }
47
48 public static boolean isIndexable(Attributes atts)
49 {
50 boolean is_indexable = false;
51
52 String index = atts.getValue("index");
53 if (index!=null) {
54 if (index.equals("1")) {
55 is_indexable = true;
56 }
57 }
58 return is_indexable;
59 }
60
61
62}
Note: See TracBrowser for help on using the repository browser.