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

gov.nasa.pds.registry.common.Response Maven / Gradle / Ivy

package gov.nasa.pds.registry.common;

import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import gov.nasa.pds.registry.common.es.dao.dd.DataTypeNotFoundException;
import gov.nasa.pds.registry.common.es.dao.dd.LddInfo;
import gov.nasa.pds.registry.common.es.dao.dd.LddVersions;
import gov.nasa.pds.registry.common.util.Tuple;

public interface Response {
  public interface Bulk {
    public interface Item {
      public boolean error();
      public String id();
      public String index();
      public String operation();
      public String reason();
      public String result();
      public int status();
    }
    public boolean errors();
    public List items();
    public void logErrors();
    public long took();
  }
  public interface CreatedIndex {
    public boolean acknowledge();
    public boolean acknowledgeShards();
    public String getIndex();
  }
  public interface Get {
    public interface IdSets {
      public Set lids();
      public Set lidvids();
    }
    public List dataTypes(boolean stringForMissing) throws IOException, DataTypeNotFoundException;    
    public IdSets ids(); // returns null if nothing is found in returned content
    public String productClass(); // returns null if product class not in returned content
    public List refs(); // returns null if nothing is found in returned content
  }
  public interface Mapping {
    public Set fieldNames();
  }
  public interface Search {
    public Map> altIds() throws UnsupportedOperationException, IOException;
    public List batch() throws UnsupportedOperationException, IOException;
    public List bucketValues();
    public List> documents();
    public String field(String name) throws NoSuchFieldException; // null means blob not in document and NoSuchFieldException document not found
    public Set fields() throws UnsupportedOperationException, IOException;
    public List lidvids(); // returns empty list if nothing is found in returned content
    public List latestLidvids(); // returns null if nothing is found in returned content
    public LddVersions lddInfo() throws UnsupportedOperationException, IOException;
    public List ldds() throws UnsupportedOperationException, IOException;
    public Set nonExistingIds(Collection from_ids) throws UnsupportedOperationException, IOException;
  }
  public interface Settings {
    public int replicas();
    public int shards();
  }
}