Package org.apache.solr.uima.processor.SolrUIMAConfiguration

Examples of org.apache.solr.uima.processor.SolrUIMAConfiguration.MapField


          fieldNameFeature = (String) mapping.get("fieldNameFeature");
          mappedFieldName = (String) mapping.get("dynamicField");
        }
        if(mappedFieldName == null)
          throw new RuntimeException("either of field or dynamicField should be defined for feature " + featureName);
        MapField mapField = new MapField(mappedFieldName, fieldNameFeature);
        subMap.put(featureName, mapField);
      }
      map.put(typeName, subMap);
    }
    return map;
View Full Code Here


      Type type = cas.getTypeSystem().getType(typeName);
      for (FSIterator<FeatureStructure> iterator = cas.getFSIndexRepository().getAllIndexedFS(type); iterator
          .hasNext(); ) {
        FeatureStructure fs = iterator.next();
        for (String featureName : featureFieldsmapping.keySet()) {
          MapField mapField = featureFieldsmapping.get(featureName);
          String fieldNameFeature = mapField.getFieldNameFeature();
          String fieldNameFeatureValue = fieldNameFeature == null ? null :
              fs.getFeatureValueAsString(type.getFeatureByBaseName(fieldNameFeature));
          String fieldName = mapField.getFieldName(fieldNameFeatureValue);
          log.info(new StringBuffer("mapping ").append(typeName).append("@").append(featureName)
              .append(" to ").append(fieldName).toString());
          String featureValue = null;
          if (fs instanceof Annotation && "coveredText".equals(featureName)) {
            featureValue = ((Annotation) fs).getCoveredText();
View Full Code Here

TOP

Related Classes of org.apache.solr.uima.processor.SolrUIMAConfiguration.MapField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.