org.opencb.commons.datastore.core.Query.getInt()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.opencb.commons.datastore.core.Query.getInt方法的一些代码示例,展示了Query.getInt的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getInt方法的具体详情如下:
包路径:org.opencb.commons.datastore.core.Query
类名称:Query
方法名:getInt

Query.getInt介绍

暂无

代码示例

代码示例来源:origin: org.opencb.cellbase/cellbase-lib

private void createImprecisePositionQuery(Query query, String leftQueryParam, String rightQueryParam,
                     String leftLimitMongoField, String righLimitMongoField,
                     List<Bson> andBsonList) {
  if (query != null && query.getString(leftQueryParam) != null && !query.getString(leftQueryParam).isEmpty()
      && query.getString(rightQueryParam) != null && !query.getString(rightQueryParam).isEmpty()) {
    int leftQueryValue = query.getInt(leftQueryParam);
    int rightQueryValue = query.getInt(rightQueryParam);
    andBsonList.add(Filters.lte(leftLimitMongoField, rightQueryValue));
    andBsonList.add(Filters.gte(righLimitMongoField, leftQueryValue));
  }
}

代码示例来源:origin: opencb/cellbase

private void createImprecisePositionQuery(Query query, String leftQueryParam, String rightQueryParam,
                     String leftLimitMongoField, String righLimitMongoField,
                     List<Bson> andBsonList) {
  if (query != null && query.getString(leftQueryParam) != null && !query.getString(leftQueryParam).isEmpty()
      && query.getString(rightQueryParam) != null && !query.getString(rightQueryParam).isEmpty()) {
    int leftQueryValue = query.getInt(leftQueryParam);
    int rightQueryValue = query.getInt(rightQueryParam);
    andBsonList.add(Filters.lte(leftLimitMongoField, rightQueryValue));
    andBsonList.add(Filters.gte(righLimitMongoField, leftQueryValue));
  }
}

代码示例来源:origin: org.opencb.cellbase/cellbase-lib

private void createImprecisePositionQuery(Query query, String leftQueryParam, String rightQueryParam,
                     String leftLimitMongoField, String righLimitMongoField,
                     List<Bson> andBsonList) {
  if (query != null && query.getString(leftQueryParam) != null && !query.getString(leftQueryParam).isEmpty()
      && query.getString(rightQueryParam) != null && !query.getString(rightQueryParam).isEmpty()) {
    int leftQueryValue = query.getInt(leftQueryParam);
    int rightQueryValue = query.getInt(rightQueryParam);
    andBsonList.add(Filters.lte(leftLimitMongoField, rightQueryValue));
    andBsonList.add(Filters.gte(righLimitMongoField, leftQueryValue));
  }
}

代码示例来源:origin: opencb/cellbase

private void createImprecisePositionQuery(Query query, String leftQueryParam, String rightQueryParam,
                     String leftLimitMongoField, String righLimitMongoField,
                     List<Bson> andBsonList) {
  if (query != null && query.getString(leftQueryParam) != null && !query.getString(leftQueryParam).isEmpty()
      && query.getString(rightQueryParam) != null && !query.getString(rightQueryParam).isEmpty()) {
    int leftQueryValue = query.getInt(leftQueryParam);
    int rightQueryValue = query.getInt(rightQueryParam);
    andBsonList.add(Filters.lte(leftLimitMongoField, rightQueryValue));
    andBsonList.add(Filters.gte(righLimitMongoField, leftQueryValue));
  }
}

代码示例来源:origin: opencb/opencga

@Override
public Iterator<VariantFileMetadata> iterator(Query query, QueryOptions options) throws IOException {
  int studyId = query.getInt(VariantFileMetadataQueryParam.STUDY_ID.key());
  List<Integer> fileIds = query.getAsIntegerList(VariantFileMetadataQueryParam.FILE_ID.key());
  return iterator(studyId, fileIds, options);
}

代码示例来源:origin: opencb/cellbase

String aaShortName = null;
if (query.get("position") != null && !query.getString("position").isEmpty() && query.getInt("position", 0) != 0) {
  position = query.getInt("position");
  String projectionString = "aaPositions." + position;

代码示例来源:origin: opencb/opencga

int minMapQ = query.getInt(QueryParams.MIN_MAPQ.key());
if (minMapQ > 0) {
  alignmentFilters.addMappingQualityFilter(minMapQ);
int numMismatches = query.getInt(QueryParams.MAX_NM.key());
if (numMismatches > 0) {
  alignmentFilters.addMaxNumberMismatchesFilter(numMismatches);
int numHits = query.getInt(QueryParams.MAX_NH.key());
if (numHits > 0) {
  alignmentFilters.addMaxNumberHitsFilter(numHits);
int maxInsertSize = query.getInt(QueryParams.MAX_INSERT_SIZE.key());
if (maxInsertSize > 0) {
  alignmentFilters.addInsertSizeFilter(maxInsertSize);

代码示例来源:origin: org.opencb.cellbase/cellbase-lib

String aaShortName = null;
if (query.get("position") != null && !query.getString("position").isEmpty() && query.getInt("position", 0) != 0) {
  position = query.getInt("position");
  String projectionString = "aaPositions." + position;

代码示例来源:origin: opencb/opencga

int release = query.getInt(RELEASE.key(), -1);
if (release <= 0) {
  throw VariantQueryException.malformedParam(RELEASE, query.getString(RELEASE.key()));

代码示例来源:origin: opencb/opencga

int release = query.getInt(RELEASE.key(), -1);
if (release <= 0) {
  throw VariantQueryException.malformedParam(RELEASE, query.getString(RELEASE.key()));

代码示例来源:origin: opencb/opencga

public Integer getReleaseFilter(Query query, String sessionId) throws CatalogException {
  Integer release;
  if (isValidParam(query, VariantQueryParam.RELEASE)) {
    release = query.getInt(VariantQueryParam.RELEASE.key(), -1);
    if (release <= 0) {
      throw VariantQueryException.malformedParam(VariantQueryParam.RELEASE, query.getString(VariantQueryParam.RELEASE.key()));
    }
    Project project = getProjectFromQuery(query, sessionId,
        new QueryOptions(INCLUDE, ProjectDBAdaptor.QueryParams.CURRENT_RELEASE.key()));
    int currentRelease = project.getCurrentRelease();
    if (release > currentRelease) {
      throw VariantQueryException.malformedParam(VariantQueryParam.RELEASE, query.getString(VariantQueryParam.RELEASE.key()));
    } else if (release == currentRelease) {
      // Using latest release. We don't need to filter by release!
      release = null;
    } // else, filter by release
  } else {
    release = null;
  }
  return release;
}

代码示例来源:origin: opencb/opencga

int id = query.getInt(VariantHadoopDBAdaptor.ANNOT_NAME.key());
  scan.addColumn(family, Bytes.toBytes(VariantPhoenixHelper.getAnnotationSnapshotColumn(id)));
} else {

相关文章