KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jofti > config > IndexConfig


1 /*
2  * Created on 08-Apr-2005
3  *
4  */

5 package com.jofti.config;
6
7 import java.util.List JavaDoc;
8 import java.util.Map JavaDoc;
9 import java.util.Properties JavaDoc;
10
11
12 /**
13  *
14  *
15  * Configuration interface for Jofti. The config object supplies the index to be created,
16  * the properties for the index and the classes to index. The class also provides for
17  * pass through configuration for the IndexCache Implmenetation as each IndexCache requires its config file
18  * in a different format.<p>
19  *
20  * This interface is used in the programmatic addition of a cache to Jofti.
21  *
22  * @author Steve Woodcock (steve@jofti.com)<p>
23  * @version 1.0
24  */

25 public interface IndexConfig {
26
27     /**
28      * The name of the cache to be added.
29      *
30      * @return name of IndexCache
31      */

32     public String JavaDoc getName();
33     
34     /**
35      * The cacheAdapter implementation to use.<p>
36      * @return String representation for the adapter
37      */

38     public String JavaDoc getCacheAdapter();
39     
40     /**
41      * Returns a Map of the index mappings. Format is String class name as akey to a List of
42      * String filed names as defined in the config XMl examples. See user guide for examples.<p>
43      * @return map of indexed classes.
44      */

45     public Map JavaDoc getIndexMappings();
46     
47     /**
48      * Returns a Map of the query mappings. Format is String class name as a key to a query. See user guide for examples.<p>
49      * @return map of indexed classes.
50      */

51     public Map JavaDoc getQueryMappings();
52     
53     /**
54      * Adds a mapping entry to the IndexCache Mapping Map. The format is
55      * key as String classname
56      * @param clazz
57      * @param propertyList
58      */

59     public void addMapping(String JavaDoc clazz, List JavaDoc propertyList);
60         
61     
62     /**
63      * Adds a mapping entry to the IndexCache Mapping Map. The format is
64      * key as String classname
65      * @param clazz
66      * @param propertyList
67      */

68     public void addQuery(String JavaDoc name, String JavaDoc query);
69     
70     
71     /**
72      * Returns the IndexCache type to use.
73      * @return the index type.
74      */

75     public String JavaDoc getIndexType();
76     
77     public boolean isLazyLoaded();
78     
79     /**
80      * returns any properties for the adapter.
81      * @return A property object
82      */

83     public Properties JavaDoc getAdapterProperties();
84     
85     /**
86      * returns the object introspector type.
87      * @return the introspector class name
88      */

89     public String JavaDoc getParserType();
90     
91     public Properties JavaDoc getIndexProperties();
92     
93     
94     
95     
96 }
97
Popular Tags