SOLR-7760 - fixed method visibility in UimaUpdateRP and SolrUimaConfiguration

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1694616 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tommaso Teofili 2015-08-07 07:28:35 +00:00
parent 7c9d78a2c4
commit fc51829543
3 changed files with 14 additions and 7 deletions

View File

@ -60,7 +60,7 @@ public class SolrUIMAConfiguration {
return fieldsMerging; return fieldsMerging;
} }
Map<String, Map<String, MapField>> getTypesFeaturesFieldsMapping() { public Map<String, Map<String, MapField>> getTypesFeaturesFieldsMapping() {
return typesFeaturesFieldsMapping; return typesFeaturesFieldsMapping;
} }
@ -80,7 +80,7 @@ public class SolrUIMAConfiguration {
return logField; return logField;
} }
static final class MapField { public static final class MapField {
private String fieldName; private String fieldName;
private final String fieldNameFeature; private final String fieldNameFeature;
@ -104,11 +104,11 @@ public class SolrUIMAConfiguration {
} }
} }
String getFieldNameFeature(){ public String getFieldNameFeature(){
return fieldNameFeature; return fieldNameFeature;
} }
String getFieldName(String featureValue){ public String getFieldName(String featureValue){
if(fieldNameFeature != null){ if(fieldNameFeature != null){
return prefix ? fieldName + featureValue : featureValue + fieldName; return prefix ? fieldName + featureValue : featureValue + fieldName;
} }

View File

@ -45,7 +45,7 @@ public class UIMAUpdateRequestProcessor extends UpdateRequestProcessor {
private final Logger log = LoggerFactory private final Logger log = LoggerFactory
.getLogger(UIMAUpdateRequestProcessor.class); .getLogger(UIMAUpdateRequestProcessor.class);
SolrUIMAConfiguration solrUIMAConfiguration; private SolrUIMAConfiguration solrUIMAConfiguration;
private AnalysisEngine ae; private AnalysisEngine ae;
@ -176,4 +176,11 @@ public class UIMAUpdateRequestProcessor extends UpdateRequestProcessor {
} }
} }
/**
* @return the configuration object for this request processor
*/
public SolrUIMAConfiguration getConfiguration()
{
return solrUIMAConfiguration;
}
} }

View File

@ -83,7 +83,7 @@ public class UIMAUpdateRequestProcessorTest extends SolrTestCaseJ4 {
assertNotNull(factory); assertNotNull(factory);
UpdateRequestProcessor processor = factory.getInstance(req(), null, null); UpdateRequestProcessor processor = factory.getInstance(req(), null, null);
assertTrue(processor instanceof UIMAUpdateRequestProcessor); assertTrue(processor instanceof UIMAUpdateRequestProcessor);
SolrUIMAConfiguration conf = ((UIMAUpdateRequestProcessor)processor).solrUIMAConfiguration; SolrUIMAConfiguration conf = ((UIMAUpdateRequestProcessor)processor).getConfiguration();
Map<String, Map<String, MapField>> map = conf.getTypesFeaturesFieldsMapping(); Map<String, Map<String, MapField>> map = conf.getTypesFeaturesFieldsMapping();
Map<String, MapField> subMap = map.get("a-type-which-can-have-multiple-features"); Map<String, MapField> subMap = map.get("a-type-which-can-have-multiple-features");
assertEquals(2, subMap.size()); assertEquals(2, subMap.size());