Changeset 592 for AE/installer2/src/net/oni2/aeinstaller/backend
- Timestamp:
- Dec 29, 2012, 5:01:15 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/backend/depot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/depot/DepotConfig.java
r591 r592 5 5 */ 6 6 public class DepotConfig { 7 /**8 * Type-value of nodes which contain Mods9 */10 public static final String NODETYPE_MOD = "mod";11 7 12 8 /** 13 * Vocabulary name for platform field9 * @return Type-value of nodes which contain Mods 14 10 */ 15 public static final String PLATFORM_VOCAB = "Platform"; 16 /** 17 * Vocabulary name for installtype field 18 */ 19 public static final String INSTALLTYPE_VOCAB = "Install method"; 20 /** 21 * Vocabulary name for modtype field 22 */ 23 public static final String MODTYPE_VOCAB = "Mod type"; 24 25 /** 26 * Taxonomy term name for platform value Win 27 */ 28 public static final String PLATFORM_WIN = "Windows"; 29 /** 30 * Taxonomy term name for platform value Mac 31 */ 32 public static final String PLATFORM_MAC = "Mac OS"; 33 /** 34 * Taxonomy term name for platform value Both 35 */ 36 public static final String PLATFORM_BOTH = "Both"; 11 public static String getNodeType_Mod() { 12 return "mod"; 13 } 37 14 38 15 /** 39 * Taxonomy term name for installtype Package16 * @return Vocabulary name for platform field 40 17 */ 41 public static final String INSTALLTYPE_PACKAGE = "Package"; 18 public static String getVocabularyName_Platform() { 19 return "Platform"; 20 } 21 22 /** 23 * @return Vocabulary name for installtype field 24 */ 25 public static String getVocabularyName_InstallType() { 26 return "Install method"; 27 } 28 29 /** 30 * @return Vocabulary name for modtype field 31 */ 32 public static String getVocabularyName_ModType() { 33 return "Mod type"; 34 } 35 36 /** 37 * @return Taxonomy term name for platform value Win 38 */ 39 public static String getTaxonomyName_Platform_Win() { 40 return "Windows"; 41 } 42 43 /** 44 * @return Taxonomy term name for platform value Mac 45 */ 46 public static String getTaxonomyName_Platform_Mac() { 47 return "Mac OS"; 48 } 49 50 /** 51 * @return Taxonomy term name for platform value Both 52 */ 53 public static String getTaxonomyName_Platform_Both() { 54 return "Both"; 55 } 56 57 /** 58 * @return Taxonomy term name for installtype Package 59 */ 60 public static String getTaxonomyName_InstallType_Package() { 61 return "Package"; 62 } 42 63 } -
AE/installer2/src/net/oni2/aeinstaller/backend/depot/DepotManager.java
r591 r592 174 174 175 175 Node n = null; 176 if (type.equalsIgnoreCase(DepotConfig. NODETYPE_MOD))176 if (type.equalsIgnoreCase(DepotConfig.getNodeType_Mod())) 177 177 n = new NodeMod(jo); 178 178 else … … 196 196 } 197 197 198 vocabId_type = getVocabulary(DepotConfig.MODTYPE_VOCAB).getVid(); 199 vocabId_platform = getVocabulary(DepotConfig.PLATFORM_VOCAB) 200 .getVid(); 201 vocabId_instmethod = getVocabulary(DepotConfig.INSTALLTYPE_VOCAB) 202 .getVid(); 198 vocabId_type = getVocabulary( 199 DepotConfig.getVocabularyName_ModType()).getVid(); 200 vocabId_platform = getVocabulary( 201 DepotConfig.getVocabularyName_Platform()).getVid(); 202 vocabId_instmethod = getVocabulary( 203 DepotConfig.getVocabularyName_InstallType()).getVid(); 203 204 } catch (JSONException e) { 204 205 e.printStackTrace(); … … 289 290 */ 290 291 public Vector<NodeMod> getModPackageNodes() { 291 int packageterm_id = getTaxonomyTerm(DepotConfig.INSTALLTYPE_PACKAGE)292 .getTid();293 294 Vector<Node> files = getNodesByType(DepotConfig.NODETYPE_MOD);295 292 Vector<NodeMod> result = new Vector<NodeMod>(); 293 TaxonomyTerm tt = getTaxonomyTerm(DepotConfig.getTaxonomyName_InstallType_Package()); 294 if (tt == null) 295 return result; 296 297 int packageterm_id = tt.getTid(); 298 299 Vector<Node> files = getNodesByType(DepotConfig.getNodeType_Mod()); 296 300 for (Node n : files) { 297 301 if (n instanceof NodeMod) { … … 316 320 .next(); 317 321 String validPlatform = getTaxonomyTerm(termId).getName(); 318 if (validPlatform.equalsIgnoreCase(DepotConfig. PLATFORM_BOTH))322 if (validPlatform.equalsIgnoreCase(DepotConfig.getTaxonomyName_Platform_Both())) 319 323 return true; 320 324 321 325 if ((platform == Platform.WIN) || (platform == Platform.LINUX)) 322 return validPlatform.equalsIgnoreCase(DepotConfig. PLATFORM_WIN);326 return validPlatform.equalsIgnoreCase(DepotConfig.getTaxonomyName_Platform_Win()); 323 327 else if (platform == Platform.MACOS) 324 return validPlatform.equalsIgnoreCase(DepotConfig. PLATFORM_MAC);328 return validPlatform.equalsIgnoreCase(DepotConfig.getTaxonomyName_Platform_Mac()); 325 329 else 326 330 return false; -
AE/installer2/src/net/oni2/aeinstaller/backend/depot/model/NodeMod.java
r591 r592 32 32 NodeField_Upload up = new NodeField_Upload( 33 33 jUploads.getJSONObject(i)); 34 uploads.add(up); 34 if (up.getDisplay() != 0) { 35 uploads.add(up); 36 } 35 37 } 36 38 }
Note:
See TracChangeset
for help on using the changeset viewer.