gov.nasa.pds.api.registry.view.Utilities Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of registry-api-service Show documentation
Show all versions of registry-api-service Show documentation
Registry API Service contributing to the PDS Federated Search API
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);
}
}