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

gov.nasa.pds.api.registry.search.RequestBuildContextFactory Maven / Gradle / Ivy

There is a newer version: 4.5.6
Show newest version
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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy