Fix aggregate-vnf search index population
[aai/data-router.git] / src / main / java / org / onap / aai / datarouter / policy / SpikeAutosuggestIndexProcessor.java
index c33e668..c101425 100644 (file)
@@ -28,14 +28,14 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.camel.Exchange;
-import org.onap.aai.datarouter.entity.OxmEntityDescriptor;
 import org.onap.aai.datarouter.entity.SpikeEventMeta;
 import org.onap.aai.datarouter.entity.SuggestionSearchEntity;
 import org.onap.aai.datarouter.logging.EntityEventPolicyMsgs;
-import org.onap.aai.datarouter.util.EntityOxmReferenceHelper;
 import org.onap.aai.datarouter.util.SearchSuggestionPermutation;
-import org.onap.aai.datarouter.util.Version;
-import org.onap.aai.datarouter.util.VersionedOxmEntities;
+import org.onap.aai.entity.OxmEntityDescriptor;
+import org.onap.aai.util.EntityOxmReferenceHelper;
+import org.onap.aai.util.Version;
+import org.onap.aai.util.VersionedOxmEntities;
 
 import com.fasterxml.jackson.databind.JsonNode;
 
@@ -75,7 +75,7 @@ public class SpikeAutosuggestIndexProcessor extends AbstractSpikeEntityEventProc
      * Use the versioned OXM Entity class to get access to cross-entity reference helper collections
      */
     VersionedOxmEntities oxmEntities =
-        EntityOxmReferenceHelper.getInstance().getVersionedOxmEntities(Version.valueOf(oxmVersion));
+        EntityOxmReferenceHelper.getInstance().getVersionedOxmEntities(Version.valueOf(oxmVersion.toLowerCase()));
     
     if (oxmEntities != null) {
       Map<String, OxmEntityDescriptor> rootDescriptor =
@@ -141,23 +141,6 @@ public class SpikeAutosuggestIndexProcessor extends AbstractSpikeEntityEventProc
     return;
   }
  
-  public List<String> extractSuggestableAttr(VersionedOxmEntities oxmEntities, String entityType) {
-    // Extract suggestable attributeshandleTopographicalData
-    Map<String, OxmEntityDescriptor> rootDescriptor = oxmEntities.getSuggestableEntityDescriptors();
-
-    if (rootDescriptor == null) {
-      return Collections.emptyList();
-    }
-
-    OxmEntityDescriptor desc = rootDescriptor.get(entityType);
-
-    if (desc == null) {
-      return Collections.emptyList();
-    }
-
-    return desc.getSuggestableAttributes();
-  }
-
 
   public List<String> extractAliasForSuggestableEntity(VersionedOxmEntities oxmEntities,
       String entityType) {