Last change
on this file since 12255 was 10164, checked in by davidb, 19 years ago |
Code upgraded to support incremental building. This mostly involves parsing
the -create flag in main and passing it down to lower level functions (as
a boolean flag).
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
944 bytes
|
Line | |
---|
1 |
|
---|
2 | /**
|
---|
3 | *
|
---|
4 | * @author [email protected]
|
---|
5 | * @author [email protected]
|
---|
6 | * @version
|
---|
7 | */
|
---|
8 |
|
---|
9 | import java.io.File;
|
---|
10 |
|
---|
11 | public class IndexXML extends Object {
|
---|
12 |
|
---|
13 | String doc_tag_level_ = null;
|
---|
14 | File out_dir_ = null;
|
---|
15 | Indexer indexer_ = null;
|
---|
16 | boolean create_index_ = false;
|
---|
17 |
|
---|
18 | public IndexXML(String doc_tag_level, File out_dir, boolean create)
|
---|
19 | {
|
---|
20 | doc_tag_level_ = doc_tag_level;
|
---|
21 | out_dir_ = out_dir;
|
---|
22 | create_index_ = create;
|
---|
23 | }
|
---|
24 |
|
---|
25 | public void init()
|
---|
26 | {
|
---|
27 | indexer_ = new Indexer(doc_tag_level_, out_dir_, create_index_);
|
---|
28 | }
|
---|
29 |
|
---|
30 | public void finish()
|
---|
31 | {
|
---|
32 | indexer_.finish();
|
---|
33 | }
|
---|
34 |
|
---|
35 | public void indexFile(File file)
|
---|
36 | {
|
---|
37 | String name = file.getName();
|
---|
38 | name = name.substring(0, name.lastIndexOf('.'));
|
---|
39 | System.out.println("Indexing "+file.getPath()+" with id "+name);
|
---|
40 | indexer_.index(name, file);
|
---|
41 | }
|
---|
42 |
|
---|
43 | public void indexFile(String xml_text)
|
---|
44 | {
|
---|
45 | indexer_.index(xml_text);
|
---|
46 | }
|
---|
47 |
|
---|
48 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.