Changeset 7195 for FCSSimpleClient
- Timestamp:
- 10/11/18 12:12:44 (6 years ago)
- Location:
- FCSSimpleClient/trunk/src/main/java/eu/clarin/sru/client/fcs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
FCSSimpleClient/trunk/src/main/java/eu/clarin/sru/client/fcs/ClarinFCSConstants.java
r7078 r7195 17 17 package eu.clarin.sru.client.fcs; 18 18 19 import java.net.URI; 20 19 21 import eu.clarin.sru.client.SRUClientConstants; 20 22 … … 23 25 /** constant for CQL query type */ 24 26 public static final String QUERY_TYPE_FCS = "fcs"; 27 25 28 26 29 /** constant for CQL query type */ … … 33 36 public static final String X_FCS_ENDPOINT_DESCRIPTION = 34 37 "x-fcs-endpoint-description"; 38 39 40 /** 41 * constant for Basic Search capability 42 */ 43 public static final URI CAPABILITY_BASIC_SEARCH = 44 URI.create("http://clarin.eu/fcs/capability/basic-search"); 45 46 47 /** 48 * constant for Advanced Search capability 49 */ 50 public static final URI CAPABILITY_ADVANCED_SEARCH = 51 URI.create("http://clarin.eu/fcs/capability/advanced-search"); 52 35 53 36 54 /** -
FCSSimpleClient/trunk/src/main/java/eu/clarin/sru/client/fcs/ClarinFCSEndpointDescriptionParser.java
r7073 r7195 66 66 private static final String CAPABILITY_PREFIX = 67 67 "http://clarin.eu/fcs/capability/"; 68 private static final URI CAPABILITY_BASIC_SEARCH =69 URI.create("http://clarin.eu/fcs/capability/basic-search");70 private static final URI CAPABILITY_ADVANCED_SEARCH =71 URI.create("http://clarin.eu/fcs/capability/advanced-search");72 68 private static final String MIMETYPE_HITS_DATAVIEW = 73 69 "application/x-clarin-fcs-hits+xml"; … … 147 143 "least one capability!"); 148 144 } 149 final boolean hasBasicSearch = 150 (capabilities.indexOf(CAPABILITY_BASIC_SEARCH) != -1);151 final boolean hasAdvancedSearch = 152 (capabilities.indexOf(CAPABILITY_ADVANCED_SEARCH) != -1);145 final boolean hasBasicSearch = (capabilities 146 .indexOf(ClarinFCSConstants.CAPABILITY_BASIC_SEARCH) != -1); 147 final boolean hasAdvancedSearch = (capabilities 148 .indexOf(ClarinFCSConstants.CAPABILITY_ADVANCED_SEARCH) != -1); 153 149 if (!hasBasicSearch) { 154 throw new SRUClientException("Endpoint must support " + 155 "'basic-search' (" + CAPABILITY_BASIC_SEARCH + 156 ") to conform to CLARIN-FCS specification"); 150 throw new SRUClientException( 151 "Endpoint must support " + "'basic-search' (" + 152 ClarinFCSConstants.CAPABILITY_BASIC_SEARCH + 153 ") to conform to CLARIN-FCS specification"); 157 154 } 158 155 … … 276 273 "all supported layers (<SupportedLayers>) if they " + 277 274 "provide the 'advanced-search' (" + 278 CAPABILITY_ADVANCED_SEARCH + ") capability"); 275 ClarinFCSConstants.CAPABILITY_ADVANCED_SEARCH + 276 ") capability"); 279 277 } 280 278 if (!hasAdvancedSearch && (supportedLayers != null)) { … … 282 280 logger.warn("Endpoint superflously declared supported " + 283 281 "layers (<SupportedLayers> without providing the " + 284 "'advanced-search' (" + CAPABILITY_ADVANCED_SEARCH + ") capability"); 282 "'advanced-search' (" + 283 ClarinFCSConstants.CAPABILITY_ADVANCED_SEARCH + 284 ") capability"); 285 285 } 286 286
Note: See TracChangeset
for help on using the changeset viewer.