| 1 |
package net.oni2.aeinstaller.backend.depot; |
| 2 |
|
| 3 |
import java.util.TreeSet; |
| 4 |
|
| 5 |
import net.oni2.aeinstaller.backend.Settings; |
| 6 |
|
| 7 |
/** |
| 8 |
* @author Christian Illy |
| 9 |
*/ |
| 10 |
public class DepotConfig { |
| 11 |
|
| 12 |
/** |
| 13 |
* @return Type-value of nodes which contain Mods |
| 14 |
*/ |
| 15 |
public static String getNodeType_Mod() { |
| 16 |
return "mod"; |
| 17 |
} |
| 18 |
|
| 19 |
/** |
| 20 |
* @return Vocabulary name for platform field |
| 21 |
*/ |
| 22 |
public static String getVocabularyName_Platform() { |
| 23 |
return "Platform"; |
| 24 |
} |
| 25 |
|
| 26 |
/** |
| 27 |
* @return Vocabulary name for installtype field |
| 28 |
*/ |
| 29 |
public static String getVocabularyName_InstallType() { |
| 30 |
return "Install method"; |
| 31 |
} |
| 32 |
|
| 33 |
/** |
| 34 |
* @return Vocabulary name for modtype field |
| 35 |
*/ |
| 36 |
public static String getVocabularyName_ModType() { |
| 37 |
return "Mod type"; |
| 38 |
} |
| 39 |
|
| 40 |
/** |
| 41 |
* @return Taxonomy term name for platform value Win |
| 42 |
*/ |
| 43 |
public static String getTaxonomyName_Platform_Win() { |
| 44 |
return "Windows"; |
| 45 |
} |
| 46 |
|
| 47 |
/** |
| 48 |
* @return Taxonomy term name for platform value Mac |
| 49 |
*/ |
| 50 |
public static String getTaxonomyName_Platform_Mac() { |
| 51 |
return "Mac OS"; |
| 52 |
} |
| 53 |
|
| 54 |
/** |
| 55 |
* @return Taxonomy term name for platform value Both |
| 56 |
*/ |
| 57 |
public static String getTaxonomyName_Platform_Both() { |
| 58 |
return "Both"; |
| 59 |
} |
| 60 |
|
| 61 |
/** |
| 62 |
* @return Taxonomy term name for installtype Package |
| 63 |
*/ |
| 64 |
public static String getTaxonomyName_InstallType_Package() { |
| 65 |
return "Package"; |
| 66 |
} |
| 67 |
|
| 68 |
/** |
| 69 |
* @return Taxonomy term names for mods of type Tool |
| 70 |
*/ |
| 71 |
public static TreeSet<String> getTaxonomyName_ModType_Tool() { |
| 72 |
TreeSet<String> res = new TreeSet<String>(); |
| 73 |
res.add("Tool"); |
| 74 |
res.add("Patch"); |
| 75 |
return res; |
| 76 |
} |
| 77 |
|
| 78 |
/** |
| 79 |
* @return First package number that's not a mandatory tool/mod. Everything |
| 80 |
* below is considered mandatory |
| 81 |
*/ |
| 82 |
public static int getMandatoryLimit() { |
| 83 |
return 8000; |
| 84 |
} |
| 85 |
|
| 86 |
/** |
| 87 |
* @return URL of Depot |
| 88 |
*/ |
| 89 |
public static String getDepotUrl() { |
| 90 |
return Settings.getInstance().get("depot_url", "http://mods.oni2.net/"); |
| 91 |
} |
| 92 |
|
| 93 |
/** |
| 94 |
* @return URL of Depot API |
| 95 |
*/ |
| 96 |
public static String getDepotApiUrl() { |
| 97 |
return Settings.getInstance().get("depot_api_url", |
| 98 |
"http://mods.oni2.net/?q=api/"); |
| 99 |
} |
| 100 |
} |