All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.nasa.pds.api.registry.view.Utilities Maven / Gradle / Ivy

There is a newer version: 4.5.6
Show newest version
package gov.nasa.pds.api.registry.view;

import java.util.ArrayList;
import java.util.List;

import gov.nasa.pds.api.registry.exceptions.UnsupportedSearchProperty;
import gov.nasa.pds.api.registry.model.SearchUtil;
import gov.nasa.pds.model.Summary;

class Utilities {
  static void fix(Summary summary) {
    List fixed = new ArrayList(summary.getProperties().size());
    for (String prop : summary.getProperties()) {
      try {
        fixed.add(SearchUtil.openPropertyToJsonProperty(prop));
      } catch (UnsupportedSearchProperty e) {
        fixed.add(prop);
      }
    }
    summary.setProperties(fixed);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy