01: package org.sakaiproject.citation.api;
02:
03: public interface SearchCategory {
04:
05: /**
06: * Returns the display name of this category
07: *
08: * @return display name of this category
09: */
10: public String getDisplayName();
11:
12: /**
13: * Returns the description of this category
14: *
15: * @return description of this category
16: */
17: public String getDescription();
18:
19: /**
20: * Returns the id of this category
21: *
22: * @return id of this category
23: */
24: public String getId();
25:
26: /**
27: * Indicates whether this category has any databases within it
28: *
29: * @return true if this category contains at least one database,
30: * false otherwise
31: */
32: public boolean hasDatabases();
33:
34: /**
35: * Returns the databases contained in this category
36: *
37: * @return a java.util.List containing SearchDatabase objects within this SearchCategory,
38: * null if this category does not contain any databases (if hasDatabases() returns false)
39: */
40: public java.util.List<SearchDatabase> getDatabases();
41:
42: /**
43: * Determines whether the given database is recommended within this category
44: *
45: * @param databaseId id of the database to check
46: * @return true if the database is recommended, false otherwise (also returns
47: * false if this database does not exist in this category)
48: */
49: public boolean isDatabaseRecommended(String databaseId);
50:
51: /**
52: * Indicates whether this category has any sub-categories within it
53: *
54: * @return true if this category contains at least one category,
55: * false otherwise
56: */
57: public boolean hasSubCategories();
58:
59: /**
60: * Returns the categories contained within this category
61: *
62: * @return a list containing SearchCategory objects within this SearchCategory,
63: * null if this category does not contain any categories (if hasSubCategories() returns false)
64: */
65: public java.util.List<SearchCategory> getSubCategories();
66: }
|