gov.nasa.pds.api.registry.search.SimpleRequestBuildContext 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.ArrayList;
import java.util.List;
import gov.nasa.pds.api.registry.GroupConstraint;
import gov.nasa.pds.api.registry.RequestBuildContext;
import gov.nasa.pds.api.registry.util.GroupConstraintImpl;
class SimpleRequestBuildContext implements RequestBuildContext {
final private boolean justLatest;
final private List fields;
final private GroupConstraint preset;
SimpleRequestBuildContext(boolean justLatest) {
this.fields = new ArrayList();
this.justLatest = justLatest;
this.preset = GroupConstraintImpl.empty();
}
SimpleRequestBuildContext(boolean justLatest, List fields) {
this.fields = fields;
this.justLatest = justLatest;
this.preset = GroupConstraintImpl.empty();
}
SimpleRequestBuildContext(boolean justLatest, List fields, GroupConstraint preset) {
this.fields = fields;
this.justLatest = justLatest;
this.preset = preset;
}
@Override
public boolean justLatest() {
return this.justLatest;
}
@Override
public List getFields() {
return this.fields;
}
@Override
public GroupConstraint getPresetCriteria() {
return this.preset;
}
}