gov.nasa.pds.api.registry.search.RequestBuildContextFactory 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.search;
import java.util.Arrays;
import java.util.List;
import gov.nasa.pds.api.registry.GroupConstraint;
import gov.nasa.pds.api.registry.RequestBuildContext;
public class RequestBuildContextFactory {
public static RequestBuildContext empty() {
return new SimpleRequestBuildContext(true);
}
public static RequestBuildContext given(boolean justLatest, String field) {
return new SimpleRequestBuildContext(justLatest, Arrays.asList(field));
}
public static RequestBuildContext given(boolean justLatest, List fields) {
return new SimpleRequestBuildContext(justLatest, fields);
}
public static RequestBuildContext given(boolean justLatest, String field,
GroupConstraint preset) {
return new SimpleRequestBuildContext(justLatest, Arrays.asList(field), preset);
}
public static RequestBuildContext given(boolean justLatest, List fields,
GroupConstraint preset) {
return new SimpleRequestBuildContext(justLatest, fields, preset);
}
}