01: /*
02: * Created on 08-Apr-2005
03: *
04: */
05: package com.jofti.config;
06:
07: import java.util.List;
08: import java.util.Map;
09: import java.util.Properties;
10:
11: /**
12: *
13: *
14: * Configuration interface for Jofti. The config object supplies the index to be created,
15: * the properties for the index and the classes to index. The class also provides for
16: * pass through configuration for the IndexCache Implmenetation as each IndexCache requires its config file
17: * in a different format.<p>
18: *
19: * This interface is used in the programmatic addition of a cache to Jofti.
20: *
21: * @author Steve Woodcock (steve@jofti.com)<p>
22: * @version 1.0
23: */
24: public interface IndexConfig {
25:
26: /**
27: * The name of the cache to be added.
28: *
29: * @return name of IndexCache
30: */
31: public String getName();
32:
33: /**
34: * The cacheAdapter implementation to use.<p>
35: * @return String representation for the adapter
36: */
37: public String getCacheAdapter();
38:
39: /**
40: * Returns a Map of the index mappings. Format is String class name as akey to a List of
41: * String filed names as defined in the config XMl examples. See user guide for examples.<p>
42: * @return map of indexed classes.
43: */
44: public Map getIndexMappings();
45:
46: /**
47: * Returns a Map of the query mappings. Format is String class name as a key to a query. See user guide for examples.<p>
48: * @return map of indexed classes.
49: */
50: public Map getQueryMappings();
51:
52: /**
53: * Adds a mapping entry to the IndexCache Mapping Map. The format is
54: * key as String classname
55: * @param clazz
56: * @param propertyList
57: */
58: public void addMapping(String clazz, List propertyList);
59:
60: /**
61: * Adds a mapping entry to the IndexCache Mapping Map. The format is
62: * key as String classname
63: * @param clazz
64: * @param propertyList
65: */
66: public void addQuery(String name, String query);
67:
68: /**
69: * Returns the IndexCache type to use.
70: * @return the index type.
71: */
72: public String getIndexType();
73:
74: public boolean isLazyLoaded();
75:
76: /**
77: * returns any properties for the adapter.
78: * @return A property object
79: */
80: public Properties getAdapterProperties();
81:
82: /**
83: * returns the object introspector type.
84: * @return the introspector class name
85: */
86: public String getParserType();
87:
88: public Properties getIndexProperties();
89:
90: }
|