Changeset 2805
- Timestamp:
- 04/11/13 13:02:15 (11 years ago)
- Location:
- vlo/trunk/vlo_importer/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/trunk/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/FacetConstants.java
r2774 r2805 1 1 package eu.clarin.cmdi.vlo; 2 3 import eu.clarin.cmdi.vlo.config.VloConfig; 2 4 3 5 /** … … 32 34 public static final String FIELD_LANDINGPAGE = "_landingPageRef"; 33 35 34 // PREFIX URL for the language-link 35 public static final String LANGUAGE_LINK_PREFIX = "http://www.clarin.eu/external/language.php?code=";36 // PREFIX URL for the language-link 37 public static final String LANGUAGE_LINK_PREFIX = VloConfig.getLanguageLinkPrefix(); 36 38 37 39 //Normalized mimeTypes -
vlo/trunk/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java
r2798 r2805 191 191 private static String imdiBrowserUrl = ""; 192 192 193 @Element 194 private static String languageLinkPrefix = 195 "http://infra.clarin.eu/service/language/info.php?code="; 196 193 197 /** 194 198 * Note: the national project mapping itself is not part of the web … … 488 492 489 493 /** 490 * Set the value of the IMDIBrowserUrl parameter<br><br>491 *492 * For a description of the parameter, refer to the general VLO493 * documentation.494 *495 * @param param the value496 */497 public static void setIMDIBrowserUrl(String param) {498 imdiBrowserUrl = param;499 }500 501 /**502 494 * Get the value of the ProfileSchemaUrl parameter combined with a handle<br><br> 503 495 * 504 496 * For a description of the schema, refer to the general VLO documentation. 505 497 * 498 * @param handle the handle the URL is based on 506 499 * @return the value 507 500 */ … … 517 510 518 511 /** 512 * Set the value of the IMDIBrowserUrl parameter<br><br> 513 * 514 * For a description of the parameter, refer to the general VLO 515 * documentation. 516 * 517 * @param param the value 518 */ 519 public static void setIMDIBrowserUrl(String param) { 520 imdiBrowserUrl = param; 521 } 522 523 /** 524 * Get the value of the languageLinkPrefix parameter<br><br> 525 * 526 * For a description of the parameter, refer to the general VLO 527 * documentation. 528 * 529 * @return the value 530 */ 531 public static String getLanguageLinkPrefix() { 532 return languageLinkPrefix; 533 } 534 535 /** 536 * Set the value of the languageLinkPrefix parameter<br><br> 537 * 538 * For a description of the parameter, refer to the general VLO 539 * documentation. 540 * 541 * @param param the value 542 */ 543 public static void setLanguageLinkPrefix(String param) { 544 languageLinkPrefix = param; 545 } 546 547 /** 519 548 * Get the value of the FederatedContentSearchUrl parameter<br><br> 520 549 * -
vlo/trunk/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXML.java
r2774 r2805 99 99 } 100 100 101 /*102 * kj: describe103 */104 101 private void processResources(CMDIData result, VTDNav nav) throws VTDException { 105 102 … … 119 116 String mimeType = resourceMimeType.evalXPathToString(); 120 117 121 // if (!ref.equals("") && !type.equals("")){ 122 if (!ref.equals("")){ 123 // mime type is allowed to be an empty string, kj: check if this is allowed in general 118 if (!ref.equals("") && !type.equals("")) { 119 // note that the mime type could be empty 124 120 result.addResource(ref, type, mimeType); 125 121 } -
vlo/trunk/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java
r2774 r2805 303 303 for (Resource resource : cmdiData.getLandingPageResources()) { 304 304 solrDocument.addField(FacetConstants.FIELD_LANDINGPAGE, resource.getResourceName()); 305 // solrDocument.addField(FacetConstants.FIELD_RESOURCE, resource.getResourceName()); 306 // keeloo: this works, the web application stumbles because it assumes a mime type however 305 307 } 306 308 -
vlo/trunk/vlo_importer/src/main/resources/VloConfig.xml
r2800 r2805 63 63 64 64 <countryComponentUrl>http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438104/xml</countryComponentUrl> 65 66 <languageLinkPrefix>http://infra.clarin.eu/service/language/info.php?code=</languageLinkPrefix> 65 67 66 68 <language2LetterCodeComponentUrl>http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438109/xml</language2LetterCodeComponentUrl> -
vlo/trunk/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/config/VloConfigTest.java
r2799 r2805 391 391 } 392 392 393 /** 394 * Test the getHandleServerUrl method 395 */ 396 @Test 397 public void testGetLanguageLinkPrefix() { 398 399 System.out.println("getLanguageLinkPrefix"); 400 401 String expResult = "http://infra.clarin.eu/service/language/info.php?code="; 402 String result = VloConfig.getLanguageLinkPrefix(); 403 404 assertEquals(expResult, result); 405 } 406 407 /** 408 * Test the setHandleServerUrl method 409 */ 410 @Test 411 public void testSetLanguageLinkPrefix() { 412 413 System.out.println("setLanguageLinkPrefix"); 414 415 String param = "http://infra.clarin.eu/service/language/info.php?code="; 416 417 VloConfig.setLanguageLinkPrefix(param); 418 419 String result = VloConfig.getLanguageLinkPrefix(); 420 421 assertEquals(param, result); 422 } 423 393 424 /** 394 425 * Test the getFederatedContentSearchUrl method
Note: See TracChangeset
for help on using the changeset viewer.