- Timestamp:
- 11/17/15 17:14:53 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUServerConfig.java
r6816 r6821 637 637 private final IndexInfo indexInfo; 638 638 private final List<SchemaInfo> schemaInfo; 639 private final List<SRUQueryParser<?>> queryParsers; 639 640 640 641 … … 659 660 DatabaseInfo databaseinfo, 660 661 IndexInfo indexInfo, 661 List<SchemaInfo> schemaInfo) { 662 List<SchemaInfo> schemaInfo, 663 List<SRUQueryParser<?>> queryParsers) { 662 664 this.minVersion = minVersion; 663 665 this.maxVersion = maxVersion; … … 685 687 this.schemaInfo = null; 686 688 } 689 this.queryParsers = Collections.unmodifiableList(queryParsers); 687 690 688 691 // build baseUrl … … 853 856 return schema; 854 857 } 858 } 859 } 860 } 861 return null; 862 } 863 864 865 public SRUQueryParser<?> findQueryParser(String queryType) { 866 if (queryType != null) { 867 for (SRUQueryParser<?> queryParser : queryParsers) { 868 if (queryParser.getQueryType().equals(queryType)) { 869 return queryParser; 855 870 } 856 871 } … … 1079 1094 SRU_RESPONSE_BUFFER_SIZE, false, 1080 1095 DEFAULT_RESPONSE_BUFFER_SIZE, 0, -1); 1096 1097 /* 1098 * FIXME: add interface to register additional query parsers 1099 */ 1100 List<SRUQueryParser<?>> queryParsers = 1101 new ArrayList<SRUQueryParser<?>>(); 1102 queryParsers.add(new CQLQueryParser()); 1081 1103 1082 1104 return new SRUServerConfig(minVersion, … … 1100 1122 databaseInfo, 1101 1123 indexInfo, 1102 schemaInfo); 1124 schemaInfo, 1125 queryParsers); 1103 1126 } catch (IOException e) { 1104 1127 throw new SRUConfigException("error reading configuration file", e);
Note: See TracChangeset
for help on using the changeset viewer.