1
1
package org .hydev .mcpm .client .database ;
2
2
3
- import org .hydev .mcpm .client .models .Plugin ;
3
+ import org .hydev .mcpm .client .models .PluginModel ;
4
4
5
- import javax .xml .crypto .Data ;
6
- import java .io .File ;
7
5
import java .util .HashMap ;
8
6
import java .util .List ;
9
7
import java .util .Map ;
17
15
public class DatabaseLoader
18
16
{
19
17
/** Name index: map[lower-cased name] = Plugin of that name */
20
- private final Map <String , Plugin > nameIndex ;
18
+ private final Map <String , PluginModel > nameIndex ;
21
19
22
20
/** Keyword index: map[lower keyword] = List[plugins that contain the keyword either in name or description] */
23
- private final Map <String , List <Plugin >> keywordIndex ;
21
+ private final Map <String , List <PluginModel >> keywordIndex ;
24
22
25
23
/** Command index: map[lower command name/alias] = List[plugins that provide the command or alias] */
26
- private final Map <String , List <Plugin >> commandIndex ;
24
+ private final Map <String , List <PluginModel >> commandIndex ;
27
25
28
26
/**
29
27
* Load database, create index for faster searching through the database
@@ -46,7 +44,7 @@ public DatabaseLoader(String path)
46
44
* @param name Name of the plugin
47
45
* @return Plugin of that name, or null if not found
48
46
*/
49
- public Plugin findByName (String name )
47
+ public PluginModel findByName (String name )
50
48
{
51
49
// TODO: Implement this
52
50
throw new UnsupportedOperationException ("TODO" );
@@ -65,7 +63,7 @@ public Plugin findByName(String name)
65
63
* @param keyword Keyword
66
64
* @return List of packages matching the keyword, or empty list
67
65
*/
68
- public List <Plugin > searchByKeyword (String keyword )
66
+ public List <PluginModel > searchByKeyword (String keyword )
69
67
{
70
68
// TODO: Implement this
71
69
throw new UnsupportedOperationException ("TODO" );
@@ -77,7 +75,7 @@ public List<Plugin> searchByKeyword(String keyword)
77
75
* @param command Command name
78
76
* @return Plugins that provides the command, or empty list
79
77
*/
80
- public List <Plugin > searchByCommand (String command )
78
+ public List <PluginModel > searchByCommand (String command )
81
79
{
82
80
// TODO: Implement this
83
81
throw new UnsupportedOperationException ("TODO" );
0 commit comments