Changeset 2659
- Timestamp:
- 03/07/13 08:48:58 (11 years ago)
- Location:
- vlo/branches/vlo-2.13-param
- Files:
-
- 21 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java
r2657 r2659 17 17 * the VLO web application. 18 18 * 19 * A member is annotated by prepending @element. When the VloConfig class is 20 * reflected into the Simple framework, the framework will assign the values 21 * it finds in the VloConfig.xml file to the members in the VloConfig class. 22 * 23 * By invoking the get method defined in the VloConfig class, a VLO application 24 * can query the value of a parameter. If you just instantiate an instance of 25 * the VloConfig class, the members will be assigned values from the packaged 26 * the VloConfig.xml file. 27 * 28 * Alternatively, the readConfig methods will let you specify an xml file of 29 * your choice. 30 * 31 * Whenever you like to add a parameter the VLO configuration, add a member 32 * with the appropriate name and type, and prepend an at aign to the 19 * A member is annotated by prepending {@literal @element}. When the VloConfig 20 * class is reflected into the Simple framework, the framework will assign the 21 * values it finds in the VloConfig.xml file to the members in the VloConfig 22 * class. 23 * 24 * Whenever you need to add a parameter the VLO configuration, add a member 25 * with the appropriate name and type, and prepend an at sign to the 33 26 * declaration, like this: 34 27 * 35 28 * {@literal @element}<br> {@literal parameterMember}<br><br> 36 29 * 37 * The xml file usedshould in this case contain a definition like30 * The XML should in this case contain a definition like 38 31 * 39 32 * {@literal<parameterMember>} "the value of the … … 41 34 * 42 35 * If you want to add a type of member that is not included in VloConfig class 43 * yet, or if you are looking for more information on the framework, please refer 44 * to <url> <br><br> 45 * 46 * The parameters are stored statically. This means that after you have create 47 * a VloConfig object, you can reference a parameter outside the scope in which 48 * the object was originally created. So after a VloConfig object has been 49 * created, get() in 36 * yet, or if you are looking for more information on the framework, please 37 * refer to <url> <br><br> 38 * 39 * In the VloConfig class, the parameters are stored statically. This means that 40 * after 41 * 42 * {@literal VloConfig.read();}<br><br> 43 * 44 * or 45 * 46 * {@literal VloConfig.read();}<br><br> 47 * 48 * has been issued from a certain context, you can reference a parameter by 49 * 50 * {@literal WebAppConfig.getSomeParameter();}<br><br> 50 51 * 51 * WebAppConfig.get().getSomeParameter();<br><br>52 * in any scope, also the scope from which the read message was send. 52 53 * 53 * will return the configuration, and getSomeParameter() will return a54 * specific parameter in it.55 *56 54 * Through the get and set methods, the application is indifferent to the origin 57 55 * of a parameter: you can get and set the value of a parameter without having 58 56 * to worry about how the parameter was defined originally. 59 57 * 60 * By invoking the read method, and by querying the context, the web61 * application, on initialization, determines which definition to use.62 *63 58 * Also, the get and set methods allow for a modification of the original value 64 59 * of the parameter. For example, if the format of a parameter changes, this … … 128 123 129 124 /** 125 * Read the configuration from the packaged XML configuration file. 126 * 127 * @param fileName the name of the file to read the configuration from 128 * 129 * @return the configuration 130 */ 131 public static VloConfig readPackagedConfig() { 132 133 // set the name of the packaged configuration file 134 String fileName = "/VloConfig"; 135 136 config = VloConfig.readConfig (fileName); 137 138 return config; 139 } 140 141 /** 130 142 * Read the configuration from an XML file. 131 143 * … … 138 150 */ 139 151 public static VloConfig readConfig(String fileName) { 152 153 // may it is safe to first expand the name a litte bit more 154 140 155 if (config == null) { 141 156 // the configuration is not there yet; create it now … … 152 167 * Read the configuration from an XML file. 153 168 * 154 * Invo le this method instead of readConfig() if you want to change169 * Invoke this method instead of readConfig() if you want to change 155 170 * the parameters because the application is run in a context different 156 171 * from the usual one. Here, modifications of the parameters inspired on 157 172 * the difference in context can be made. 158 173 * 159 * A web application can serve as a t ipical example of a difference in174 * A web application can serve as a typical example of a difference in 160 175 * context: the application itself runs in a web server container, while the 161 176 * tests associated with the web application will be run outside this … … 167 182 */ 168 183 public static VloConfig readTestConfig(String fileName) { 169 if (config == null) { 170 // the configuration is not there yet; create it now 171 config = new VloConfig(); 172 } 173 174 // get the XML file configuration from the file by invoking ... 175 config = (VloConfig) read(fileName, config); 184 185 config = VloConfig.readConfig (fileName); 176 186 177 // modify the parameters here 178 179 return config; 180 } 181 182 /** 183 * Return the reference to the configuration 184 * 185 * @return the configuration 186 */ 187 public static VloConfig get (){ 187 // modify the configuration here 188 188 189 return config; 189 190 } … … 200 201 201 202 @Element // directive for Simple 202 private boolean deleteAllFirst = false;203 204 @Element 205 private boolean printMapping = false;203 private static boolean deleteAllFirst = false; 204 205 @Element 206 private static boolean printMapping = false; 206 207 207 208 @ElementList // directive for Simple 208 private List<DataRoot> dataRoots;209 210 public List<DataRoot> getDataRoots() {209 private static List<DataRoot> dataRoots; 210 211 public static List<DataRoot> getDataRoots() { 211 212 return dataRoots; 212 213 } 213 214 214 215 @Element 215 private String vloHomeLink = "";216 217 @Element 218 private String solrUrl = "";219 220 @Element 221 private String profileSchemaUrl = "";222 223 @Element 224 private String componentRegistryRESTURL = "";225 226 @Element 227 private String handleServerUrl = "";228 229 @Element 230 private String imdiBrowserUrl = "";216 private static String vloHomeLink = ""; 217 218 @Element 219 private static String solrUrl = ""; 220 221 @Element 222 private static String profileSchemaUrl = ""; 223 224 @Element 225 private static String componentRegistryRESTURL = ""; 226 227 @Element 228 private static String handleServerUrl = ""; 229 230 @Element 231 private static String imdiBrowserUrl = ""; 231 232 232 233 /** … … 235 236 */ 236 237 @Element 237 private String nationalProjectMapping = "";238 private static String nationalProjectMapping = ""; 238 239 239 240 /** … … 261 262 */ 262 263 @ElementArray(entry = "facetField") 263 private String[] facetFields = {"", "", ""};264 265 @Element 266 private String countryComponentUrl = "";267 268 @Element 269 private String language2LetterCodeComponentUrl = "";270 271 @Element 272 private String language3LetterCodeComponentUrl = "";273 274 @Element 275 private String silToISO639CodesUrl = "";276 277 @Element 278 private String FederatedContentSearchUrl = " ";264 private static String[] facetFields = {"", "", ""}; 265 266 @Element 267 private static String countryComponentUrl = ""; 268 269 @Element 270 private static String language2LetterCodeComponentUrl = ""; 271 272 @Element 273 private static String language3LetterCodeComponentUrl = ""; 274 275 @Element 276 private static String silToISO639CodesUrl = ""; 277 278 @Element 279 private static String FederatedContentSearchUrl = " "; 279 280 280 281 /** … … 294 295 * @param dataRoots the value 295 296 */ 296 public void setDataRoots(List<DataRoot> dataRoots) {297 this.dataRoots = dataRoots;297 public static void setDataRoots(List<DataRoot> param) { 298 dataRoots = param; 298 299 } 299 300 … … 306 307 * @return the value 307 308 */ 308 public void setDeleteAllFirst(boolean deleteAllFirst) {309 this.deleteAllFirst = deleteAllFirst;309 public static void setDeleteAllFirst(boolean param) { 310 deleteAllFirst = param; 310 311 } 311 312 … … 318 319 * @return the value 319 320 */ 320 public boolean isDeleteAllFirst() {321 public static boolean isDeleteAllFirst() { 321 322 return deleteAllFirst; 322 323 } … … 330 331 * @param printMapping the value 331 332 */ 332 public void setPrintMapping(boolean printMapping) {333 this.printMapping = printMapping;333 public static void setPrintMapping(boolean param) { 334 printMapping = param; 334 335 } 335 336 … … 342 343 * @return the value 343 344 */ 344 public boolean isPrintMapping() {345 public static boolean isPrintMapping() { 345 346 return printMapping; 346 347 } … … 354 355 * @return the value 355 356 */ 356 public String getVloHomeLink() {357 public static String getVloHomeLink() { 357 358 return vloHomeLink; 358 359 } … … 366 367 * @param vloHomeLink the value 367 368 */ 368 public void setVloHomeLink(String link) {369 this.vloHomeLink = link;369 public static void setVloHomeLink(String param) { 370 vloHomeLink = param; 370 371 } 371 372 … … 378 379 * @return the value 379 380 */ 380 public String getSolrUrl() {381 static public String getSolrUrl() { 381 382 return solrUrl; 382 383 } … … 390 391 * @param url the parameter 391 392 */ 392 public void setSolrUrl(String url) {393 this.solrUrl = url;393 public static void setSolrUrl(String param) { 394 solrUrl = param; 394 395 } 395 396 … … 402 403 * @return the value 403 404 */ 404 public String getComponentRegistryProfileSchema(String id) {405 public static String getComponentRegistryProfileSchema(String id) { 405 406 return profileSchemaUrl.replace("{PROFILE_ID}", id); 406 407 } … … 414 415 * @param profileId the value 415 416 */ 416 public void setProfileSchemaUrl(String url) {417 this.profileSchemaUrl = url;417 public static void setProfileSchemaUrl(String param) { 418 profileSchemaUrl = param; 418 419 } 419 420 … … 426 427 * @return the value 427 428 */ 428 public String getComponentRegistryRESTURL() {429 public static String getComponentRegistryRESTURL() { 429 430 return componentRegistryRESTURL; 430 431 } … … 438 439 * @param componentRegistryRESTURL the value 439 440 */ 440 public void setComponentRegistryRESTURL(String url) {441 this.componentRegistryRESTURL = url;441 public static void setComponentRegistryRESTURL(String param) { 442 componentRegistryRESTURL = param; 442 443 } 443 444 … … 450 451 * @return the value 451 452 */ 452 public String getHandleServerUrl() {453 public static String getHandleServerUrl() { 453 454 return handleServerUrl; 454 455 } … … 462 463 * @param handleServerUrl the value 463 464 */ 464 public void setHandleServerUrl(String url) {465 this.handleServerUrl = url;465 public static void setHandleServerUrl(String param) { 466 handleServerUrl = param; 466 467 } 467 468 … … 474 475 * @param imdiBrowserUrl the value 475 476 */ 476 public void setIMDIBrowserUrl(String url) {477 this.imdiBrowserUrl = url;477 public static void setIMDIBrowserUrl(String param) { 478 imdiBrowserUrl = param; 478 479 } 479 480 … … 485 486 * @return the value 486 487 */ 487 public String getIMDIBrowserUrl(String handle) {488 public static String getIMDIBrowserUrl(String handle) { 488 489 String result; 489 490 try { … … 503 504 * @return the value 504 505 */ 505 public void setFederatedContentSearchUrl(String url) {506 this.FederatedContentSearchUrl = url;506 public static void setFederatedContentSearchUrl(String param) { 507 FederatedContentSearchUrl = param; 507 508 } 508 509 … … 515 516 * @param FederatedContentSearchUrl the value 516 517 */ 517 public String getFederatedContentSearchUrl() {518 public static String getFederatedContentSearchUrl() { 518 519 return FederatedContentSearchUrl; 519 520 } … … 527 528 * @param nationalProjectMapping the value 528 529 */ 529 public void setNationalProjectMapping(String mapping) { 530 this.nationalProjectMapping = mapping; 531 } 530 public static void setNationalProjectMapping(String param) { 531 nationalProjectMapping = param; 532 } 533 532 534 533 535 /** … … 539 541 * @return the value 540 542 */ 541 public String getNationalProjectMapping() {543 public static String getNationalProjectMapping() { 542 544 return nationalProjectMapping; 543 545 } … … 551 553 * @return the value 552 554 */ 553 public String[] getFacetFields() {555 public static String[] getFacetFields() { 554 556 return facetFields; 555 557 } … … 563 565 * @param facetFields the value, a list of facet fields 564 566 */ 565 public void setFacetFields(String[] fields) {566 this.facetFields = fields;567 public static void setFacetFields(String[] param) { 568 facetFields = param; 567 569 } 568 570 … … 575 577 * @return the value 576 578 */ 577 public String getCountryComponentUrl() {579 public static String getCountryComponentUrl() { 578 580 return countryComponentUrl; 579 581 } … … 587 589 * @param countryComponentUrl the value 588 590 */ 589 public void setCountryComponentUrl(String url) {590 this.countryComponentUrl = url;591 public static void setCountryComponentUrl(String param) { 592 countryComponentUrl = param; 591 593 } 592 594 … … 599 601 * @return the value 600 602 */ 601 public String getLanguage2LetterCodeComponentUrl() {603 public static String getLanguage2LetterCodeComponentUrl() { 602 604 return language2LetterCodeComponentUrl; 603 605 } … … 611 613 * @param language2LetterCodeComponentUrl the value 612 614 */ 613 public void setLanguage2LetterCodeComponentUrl(String url) {614 this.language2LetterCodeComponentUrl = url;615 public static void setLanguage2LetterCodeComponentUrl(String param) { 616 language2LetterCodeComponentUrl = param; 615 617 } 616 618 … … 623 625 * @return the value 624 626 */ 625 public String getLanguage3LetterCodeComponentUrl() {627 public static String getLanguage3LetterCodeComponentUrl() { 626 628 return language3LetterCodeComponentUrl; 627 629 } … … 635 637 * @param language3LetterCodeComponentUrl the value 636 638 */ 637 public void setLanguage3LetterCodeComponentUrl(String url) {638 this.language3LetterCodeComponentUrl = url;639 public static void setLanguage3LetterCodeComponentUrl(String param) { 640 language3LetterCodeComponentUrl = param; 639 641 } 640 642 … … 647 649 * @return the value 648 650 */ 649 public String getSilToISO639CodesUrl() {651 public static String getSilToISO639CodesUrl() { 650 652 return silToISO639CodesUrl; 651 653 } … … 659 661 * @param silToISO639CodesUrl the value 660 662 */ 661 public void setSilToISO639CodesUrl(String url) {662 this.silToISO639CodesUrl = url;663 public static void setSilToISO639CodesUrl(String param) { 664 silToISO639CodesUrl = param; 663 665 } 664 666 } -
vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloContextConfig.java
r2657 r2659 69 69 // overrule the current value of solrUrl 70 70 71 VloConfig. get().setSolrUrl(url);71 VloConfig.setSolrUrl(url); 72 72 } 73 73 -
vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIComponentProfileNamePostProcessor.java
r2627 r2659 69 69 } 70 70 vg = new VTDGen(); 71 BASE_URL = VloConfig.get ().getComponentRegistryRESTURL();71 BASE_URL = VloConfig.getComponentRegistryRESTURL(); 72 72 } 73 73 } -
vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXML.java
r2627 r2659 79 79 if (index != -1) { 80 80 String profileId = nav.toString(index).trim(); 81 result = VloConfig.get ().getComponentRegistryProfileSchema(profileId);81 result = VloConfig.getComponentRegistryProfileSchema(profileId); 82 82 } 83 83 return result; -
vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessor.java
r2627 r2659 41 41 LOG.debug("Creating country code map."); 42 42 try { 43 Map<String, String> result = CommonUtils.createCMDIComponentItemMap(VloConfig.get ().getCountryComponentUrl());43 Map<String, String> result = CommonUtils.createCMDIComponentItemMap(VloConfig.getCountryComponentUrl()); 44 44 return result; 45 45 } catch (Exception e) { -
vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/LanguageCodePostProcessor.java
r2627 r2659 98 98 private Map<String, String> getTwoLetterCountryCodeMap() { 99 99 if (twoLetterCodesMap == null) { 100 twoLetterCodesMap = createCodeMap(VloConfig.get ().getLanguage2LetterCodeComponentUrl());100 twoLetterCodesMap = createCodeMap(VloConfig.getLanguage2LetterCodeComponentUrl()); 101 101 } 102 102 return twoLetterCodesMap; … … 105 105 private Map<String, String> getThreeLetterCountryCodeMap() { 106 106 if (threeLetterCodesMap == null) { 107 threeLetterCodesMap = createCodeMap(VloConfig.get ().getLanguage3LetterCodeComponentUrl());107 threeLetterCodesMap = createCodeMap(VloConfig.getLanguage3LetterCodeComponentUrl()); 108 108 } 109 109 return threeLetterCodesMap; … … 112 112 protected Map<String, String> getLanguageNameToIso639Map() { 113 113 if (languageNameToIso639Map == null) { 114 languageNameToIso639Map = createReverseCodeMap(VloConfig.get ().getLanguage3LetterCodeComponentUrl());114 languageNameToIso639Map = createReverseCodeMap(VloConfig.getLanguage3LetterCodeComponentUrl()); 115 115 } 116 116 return languageNameToIso639Map; … … 119 119 private Map<String, String> getIso639ToLanguageNameMap() { 120 120 if (iso639ToLanguageNameMap == null) { 121 iso639ToLanguageNameMap = createCodeMap(VloConfig.get ().getLanguage3LetterCodeComponentUrl());121 iso639ToLanguageNameMap = createCodeMap(VloConfig.getLanguage3LetterCodeComponentUrl()); 122 122 } 123 123 … … 151 151 DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance(); 152 152 domFactory.setNamespaceAware(true); 153 URL url = new URL(VloConfig.get ().getSilToISO639CodesUrl());153 URL url = new URL(VloConfig.getSilToISO639CodesUrl()); 154 154 DocumentBuilder builder = domFactory.newDocumentBuilder(); 155 155 Document doc = builder.parse(url.openStream()); -
vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java
r2651 r2659 119 119 try { 120 120 // Delete the whole Solr db 121 if (VloConfig. get().isDeleteAllFirst()) {121 if (VloConfig.isDeleteAllFirst()) { 122 122 LOG.info("Deleting original data..."); 123 123 solrServer.deleteByQuery("*:*"); … … 175 175 */ 176 176 private List<DataRoot> checkDataRoots() { 177 List<DataRoot> dataRoots = VloConfig.get ().getDataRoots();177 List<DataRoot> dataRoots = VloConfig.getDataRoots(); 178 178 for (DataRoot dataRoot : dataRoots) { 179 179 if (!dataRoot.getRootFile().exists()) { … … 210 210 */ 211 211 protected void initSolrServer() throws MalformedURLException { 212 String solrUrl = VloConfig.get ().getSolrUrl();212 String solrUrl = VloConfig.getSolrUrl(); 213 213 LOG.info("Initializing Solr Server on " + solrUrl); 214 214 solrServer = new StreamingUpdateSolrServer(solrUrl, 1000, 2) { -
vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/NationalProjectPostProcessor.java
r2627 r2659 51 51 52 52 private Map<String, String> getNationalProjectMapping() { 53 String mappingFileName = VloConfig.get ().getNationalProjectMapping();53 String mappingFileName = VloConfig.getNationalProjectMapping(); 54 54 if(mappingFileName == null){ 55 55 throw new RuntimeException("Configuration Error, NationalProjectMapping is null"); -
vlo/branches/vlo-2.13-param/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/ImporterTestcase.java
r2639 r2659 41 41 // optionally, modify the configuration here 42 42 43 VloConfig. get().setComponentRegistryRESTURL("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/");43 VloConfig.setComponentRegistryRESTURL("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/"); 44 44 } 45 45 -
vlo/branches/vlo-2.13-param/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/MetadataImporterTest.java
r2639 r2659 14 14 import org.apache.solr.common.SolrInputDocument; 15 15 import static org.junit.Assert.assertEquals; 16 import org.junit.Before;17 16 import org.junit.Test; 18 17 -
vlo/branches/vlo-2.13-param/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.java
r2658 r2659 11 11 * {@literal VLO} web application.<br><br> 12 12 * 13 * Because the Vlo Application class extends WebApplication, a class instance13 * Because the VloWebApplication class extends WebApplication, a class instance 14 14 * will normally reside inside a web server container. By running the Start 15 15 * class however, an instance of the application will reside outside a server … … 17 17 * 18 18 */ 19 public class Vlo Application extends WebApplication {19 public class VloWebApplication extends WebApplication { 20 20 21 21 private SearchResultsDao searchResults; … … 61 61 * server container. 62 62 */ 63 public Vlo Application() {63 public VloWebApplication() { 64 64 65 65 /** 66 * Read the application's configuration. Because on instantiation a web 67 * application cannot said to be living in a context, context parameters 68 * can only be added to the configuration later, in this case: when the 69 * {@literal init()} method will be invoked. 66 * Read the application's configuration. 67 * 68 * Because on instantiation a web application cannot said to be living 69 * in a web server context, parameters defined in the context can only 70 * be added to the configuration later, in this case: when the {@literal 71 * init()} method will be invoked. 70 72 */ 71 String fileName = VloConfig.class.getResource("/VloConfig.xml").getFile();72 73 73 // configSource = getClass().getClassLoader().getResourceAsStream(fileName); 74 75 config = VloConfig.readConfig(fileName); 74 config = VloConfig.readPackagedConfig(); 76 75 77 76 // let the {@literal init()} method know that there will be a context … … 98 97 * context associated with this container will be ignored. 99 98 */ 100 public Vlo Application(VloConfig testConfig) {99 public VloWebApplication(VloConfig testConfig) { 101 100 102 // let the application use the configuration created outside of it103 101 // remember that the application does not live in a web server context 102 104 103 inContext = false; 104 105 // set the current configuration to the test configuration 105 106 106 107 config = testConfig; -
vlo/branches/vlo-2.13-param/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/DaoLocator.java
r2641 r2659 3 3 import org.apache.wicket.RequestCycle; 4 4 5 import eu.clarin.cmdi.vlo.Vlo Application;5 import eu.clarin.cmdi.vlo.VloWebApplication; 6 6 7 7 … … 10 10 public static SearchResultsDao getSearchResultsDao() 11 11 { 12 Vlo Application app = (VloApplication)RequestCycle.get().getApplication();12 VloWebApplication app = (VloWebApplication)RequestCycle.get().getApplication(); 13 13 return app.getSearchResultsDao(); 14 14 } -
vlo/branches/vlo-2.13-param/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/SolrDao.java
r2641 r2659 1 1 package eu.clarin.cmdi.vlo.dao; 2 2 3 import eu.clarin.cmdi.vlo.config.VloConfig; 3 4 import java.net.MalformedURLException; 4 5 5 import org.apache.solr.client.solrj.SolrQuery; 6 6 import org.apache.solr.client.solrj.SolrServerException; … … 13 13 import org.slf4j.LoggerFactory; 14 14 15 import eu.clarin.cmdi.vlo.config.VloConfig;16 17 15 public class SolrDao { 18 16 … … 22 20 public SolrDao() { 23 21 String solrUrl; 24 solrUrl = VloConfig.get ().getSolrUrl();22 solrUrl = VloConfig.getSolrUrl(); 25 23 try { 26 24 solrServer = new CommonsHttpSolrServer(solrUrl); -
vlo/branches/vlo-2.13-param/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.java
r2641 r2659 56 56 public SearchBoxForm(String id, SearchPageQuery query) { 57 57 super(id, new CompoundPropertyModel<SearchPageQuery>(query)); 58 add(new ExternalLink("vloHomeLink", VloConfig.get ().getVloHomeLink()));58 add(new ExternalLink("vloHomeLink", VloConfig.getVloHomeLink())); 59 59 searchBox = new AutoCompleteTextField<String>("searchQuery") { 60 60 @Override -
vlo/branches/vlo-2.13-param/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/HtmlFormCreator.java
r2641 r2659 34 34 } 35 35 36 String form = "<form method=\"post\" action=\""+VloConfig.get ().getFederatedContentSearchUrl()+"\"> \n"36 String form = "<form method=\"post\" action=\""+VloConfig.getFederatedContentSearchUrl()+"\"> \n" 37 37 + "<fieldset style=\"border:0px;\"> \n" 38 38 + "\t <label for=\"query\">CQL query:</label> \n" -
vlo/branches/vlo-2.13-param/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanel.java
r2641 r2659 69 69 if (resourceLink.startsWith(FacetConstants.HANDLE_PREFIX)) { 70 70 String handle = resourceLink.substring(FacetConstants.HANDLE_PREFIX.length()); 71 result = VloConfig.get ().getHandleServerUrl() + handle;71 result = VloConfig.getHandleServerUrl() + handle; 72 72 } else if(resourceLink.startsWith(FacetConstants.URN_NBN_PREFIX)) { 73 73 result = URN_NBN_RESOLVER_URL+resourceLink; … … 115 115 if (resourceLink.startsWith(FacetConstants.HANDLE_PREFIX)) { 116 116 String handle = resourceLink.substring(FacetConstants.HANDLE_PREFIX.length()); 117 resourceLink = VloConfig.get ().getHandleServerUrl() + handle;117 resourceLink = VloConfig.getHandleServerUrl() + handle; 118 118 // Now points to something like http://hdl.handle.net/1839/00-0000-0000-0004-3357-F 119 119 HttpURLConnection con = null; -
vlo/branches/vlo-2.13-param/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageQuery.java
r2641 r2659 71 71 result.setFacet(true); 72 72 result.setFacetMinCount(1); 73 result.addFacetField(VloConfig.get ().getFacetFields());73 result.addFacetField(VloConfig.getFacetFields()); 74 74 return result; 75 75 } -
vlo/branches/vlo-2.13-param/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java
r2641 r2659 117 117 } 118 118 if (linkToOriginalContext.startsWith(FacetConstants.HANDLE_MPI_PREFIX)) { 119 result = VloConfig.get ().getIMDIBrowserUrl(linkToOriginalContext);119 result = VloConfig.getIMDIBrowserUrl(linkToOriginalContext); 120 120 } else { 121 121 try { -
vlo/branches/vlo-2.13-param/vlo_web_app/src/main/webapp/WEB-INF/web.xml
r2641 r2659 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> 2 3 <web-app xmlns="http://java.sun.com/xml/ns/j2ee" 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 6 version="2.4" 7 > 4 8 5 9 <display-name>vlo</display-name> … … 10 14 <init-param> 11 15 <param-name>applicationClassName</param-name> 12 <param-value>eu.clarin.cmdi.vlo.Vlo Application</param-value>16 <param-value>eu.clarin.cmdi.vlo.VloWebApplication</param-value> 13 17 </init-param> 14 18 <init-param> -
vlo/branches/vlo-2.13-param/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/TestFacetedSearchPage.java
r2641 r2659 27 27 // optionally, modify the test configuration here 28 28 29 wicketTester = new WicketTester(new Vlo Application(config));29 wicketTester = new WicketTester(new VloWebApplication(config)); 30 30 } 31 31 -
vlo/branches/vlo-2.13-param/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanelTest.java
r2641 r2659 1 1 package eu.clarin.cmdi.vlo.pages; 2 2 3 import eu.clarin.cmdi.vlo.Vlo Application;3 import eu.clarin.cmdi.vlo.VloWebApplication; 4 4 import eu.clarin.cmdi.vlo.config.VloConfig; 5 5 import java.util.List; … … 25 25 // optionally, modify the test configuration here 26 26 27 wicketTester = new WicketTester(new Vlo Application(testConfig));27 wicketTester = new WicketTester(new VloWebApplication(testConfig)); 28 28 } 29 29 -
vlo/branches/vlo-2.13-param/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanelTest.java
r2641 r2659 2 2 3 3 import eu.clarin.cmdi.vlo.FacetConstants; 4 import eu.clarin.cmdi.vlo.Vlo Application;4 import eu.clarin.cmdi.vlo.VloWebApplication; 5 5 import eu.clarin.cmdi.vlo.config.VloConfig; 6 6 import org.apache.wicket.util.tester.WicketTester; … … 28 28 // optionally, modify the test configuration here 29 29 30 wicketTester = new WicketTester(new Vlo Application(testConfig));30 wicketTester = new WicketTester(new VloWebApplication(testConfig)); 31 31 } 32 32
Note: See TracChangeset
for help on using the changeset viewer.