Changeset 25353
- Timestamp:
- 2012-04-12T14:02:25+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java
r25347 r25353 96 96 } 97 97 98 public static boolean oidIsMatchOrParent(String first, String second) 99 { 100 if (first.equals(second)) 101 { 102 return true; 103 } 104 105 String[] firstParts = first.split("."); 106 String[] secondParts = second.split("."); 107 108 if (firstParts.length >= secondParts.length) 109 { 110 return false; 111 } 112 113 for (int i = 0; i < firstParts.length; i++) 114 { 115 if (!firstParts[i].equals(secondParts[i])) 116 { 117 return false; 118 } 119 } 120 121 return true; 122 } 123 98 124 /* some preprocessing functions */ 99 125 public static String toLower(String orig) … … 120 146 } 121 147 } 122 148 123 149 public static String replace(String orig, String match, String replacement) 124 150 { … … 460 486 public static boolean checkMetadataNotDuplicate(String name, String value) 461 487 { 462 if (_foundTableValues.containsKey(name))463 { 464 for (String mapValue : _foundTableValues.get(name))465 { 466 if (mapValue.equals(value))488 if (_foundTableValues.containsKey(name)) 489 { 490 for (String mapValue : _foundTableValues.get(name)) 491 { 492 if (mapValue.equals(value)) 467 493 { 468 494 return false; … … 472 498 return true; 473 499 } 474 500 475 501 ArrayList<String> newList = new ArrayList<String>(); 476 502 newList.add(value); 477 503 478 504 _foundTableValues.put(name, newList); 479 505 480 506 return true; 481 507 } 482 508 483 509 public static String reCAPTCHAimage(String publicKey, String privateKey) 484 510 {
Note:
See TracChangeset
for help on using the changeset viewer.