Changeset 5247
- Timestamp:
- 05/21/14 09:29:17 (10 years ago)
- Location:
- vlo/trunk/vlo-commons/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/trunk/vlo-commons/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java
r5205 r5247 584 584 585 585 /** 586 * Get the value of the ProfileSchemaUrl parameter combined with a587 * handle<br><br>588 *589 * For a description of the schema, refer to the general VLO documentation.590 *591 * @param handle the handle the URL is based on592 * @return the value593 */594 public String getImdiBrowserUrl(String handle) {595 String result;596 try {597 result = imdiBrowserUrl + URLEncoder.encode(handle, "UTF-8");598 } catch (UnsupportedEncodingException e) {599 result = imdiBrowserUrl + handle;600 }601 return result;602 }603 604 /**605 * Set the value of the IMDIBrowserUrl parameter<br><br>606 *607 * For a description of the parameter, refer to the general VLO608 * documentation.609 *610 * @param param the value611 */612 public void setImdiBrowserUrl(String param) {613 imdiBrowserUrl = param;614 }615 616 /**617 586 * Get the value of the languageLinkPrefix parameter<br><br> 618 587 * -
vlo/trunk/vlo-commons/src/main/resources/VloConfig.xml
r5222 r5247 55 55 <handleServerUrl>http://hdl.handle.net/</handleServerUrl> 56 56 57 <imdiBrowserUrl>http://corpus1.mpi.nl/ds/imdi_browser?openpath=</imdiBrowserUrl>58 59 57 <nationalProjectMapping>/nationalProjectsMapping.xml</nationalProjectMapping> 60 58 61 59 <!-- 62 60 Facet field used to populate collection selector on search page 63 If removed, the collection facet will not be shown (can be used to61 If disabled, the collection facet will not be shown (can be used to 64 62 move the collection facet in with the other facets). 63 64 Uncomment to activate the separate collection facet display item. 65 65 --> 66 66 <!--<collectionFacet>collection</collectionFacet>--> -
vlo/trunk/vlo-commons/src/test/java/eu/clarin/cmdi/vlo/config/DefaultVloConfigFactoryTest.java
r5222 r5247 496 496 497 497 assertEquals(param, result); 498 }499 500 /**501 * Test the getIMDIBrowserUrl method502 */503 @Test504 public void testGetIMDIBrowserUrl() {505 506 System.out.println("getIMDIBrowserUrl");507 508 String expResult;509 try {510 expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + URLEncoder.encode("handle", "UTF-8");511 } catch (UnsupportedEncodingException ex) {512 expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + "handle";513 }514 String result = config.getImdiBrowserUrl("handle");515 516 assertEquals(expResult, result);517 }518 519 /**520 * Test the setIMDIBrowserUrl method521 */522 @Test523 public void testSetIMDIBrowserUrl() {524 525 System.out.println("setIMDIBrowserUrl");526 527 String param = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=";528 529 config.setImdiBrowserUrl(param);530 531 String expResult;532 try {533 expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + URLEncoder.encode("handle", "UTF-8");534 } catch (UnsupportedEncodingException ex) {535 expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + "handle";536 }537 538 String result = config.getImdiBrowserUrl("handle");539 540 assertEquals(expResult, result);541 498 } 542 499
Note: See TracChangeset
for help on using the changeset viewer.