SingleCellAnalyticsCollectionProxy extends CollectionProxy { public static String metadataFieldNameToDisplayName(String metadataFieldName) { if (metadataFieldName.startsWith("characteristic")) { return metadataFieldNameToDisplayName(metadataFieldName, "characteristic_"); } else { return metadataFieldNameToDisplayName(metadataFieldName, "factor_"); } } SingleCellAnalyticsCollectionProxy(SolrClient solrClient); static SingleCellAnalyticsSchemaField characteristicAsSchemaField(String characteristic); static SingleCellAnalyticsSchemaField factorAsSchemaField(String factor); static SingleCellAnalyticsSchemaField metadataAsSchemaField(String metadata); static String metadataFieldNameToDisplayName(String metadataFieldName); static String attributeNameToFieldName(String attributeName); QueryResponse query(SolrQueryBuilder<SingleCellAnalyticsCollectionProxy> solrQueryBuilder); static final SingleCellAnalyticsSchemaField CELL_ID; static final SingleCellAnalyticsSchemaField CHARACTERISTIC_INFERRED_CELL_TYPE; static final SingleCellAnalyticsSchemaField CHARACTERISTIC_SPECIES; static final SingleCellAnalyticsSchemaField CHARACTERISTIC_ORGANISM_PART; static final SingleCellAnalyticsSchemaField FACTORS; static final SingleCellAnalyticsSchemaField EXPERIMENT_ACCESSION; }
@Test void validFactorFieldToDisplayName() { assertThat(SingleCellAnalyticsCollectionProxy.metadataFieldNameToDisplayName("factor_biopsy_site")) .isEqualToIgnoringCase("Biopsy site"); }
@Test void emptyFactorFieldToDisplayName() { assertThat(SingleCellAnalyticsCollectionProxy.metadataFieldNameToDisplayName("")).isEmpty(); }
@Test void validCharacteristicFieldToDisplayName() { assertThat( SingleCellAnalyticsCollectionProxy.metadataFieldNameToDisplayName("characteristic_inferred_cell_type")) .isEqualToIgnoringCase("Inferred cell type"); }
@Test void emptyCharacteristicFieldToDisplayName() { assertThat(SingleCellAnalyticsCollectionProxy.metadataFieldNameToDisplayName("")).isEmpty(); }