Class BioMaterialValueObject
- All Implemented Interfaces:
Serializable, Identifiable
- Author:
- lukem
- See Also:
-
Field Summary
Fields inherited from class IdentifiableValueObject
id -
Constructor Summary
ConstructorsConstructorDescriptionRequired when using the class as a spring bean.BioMaterialValueObject(BioMaterial bm, boolean basic, boolean allFactorValuesAndCharacteristics) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanRelatedBioAssayIDs.Map of categories to original text values (for this biomaterial).Map of factor ids (factor232) to factor value (id or the actual value) for this biomaterial.Collection<? extends IdentifiableValueObject> Deprecated.Collection<? extends IdentifiableValueObject> 🛑 This field'sJsonIgnoredoes not hide it: the payload carries anfvbasicVOskey regardless.getName()The BioMaterial this one was derived from, ornullif this is a sample in its own right.The same annotations ascharacteristics, as statements — carrying the predicate and object when a curator wrote one.inthashCode()booleanIndicate if this is using thefVBasicVOsorfactorValueObjectsfor representing factor values.voidsetAssayDescription(String assayDescription) voidsetAssayName(String assayName) voidsetAssayProcessingDate(Date assayProcessingDate) voidsetBasicFVs(boolean basicFVs) Indicate if this is using thefVBasicVOsorfactorValueObjectsfor representing factor values.voidsetBioAssayIds(Collection<Long> bioAssayIds) RelatedBioAssayIDs.voidsetCharacteristicOriginalValues(Map<String, String> characteristicOriginalValues) Map of categories to original text values (for this biomaterial).voidsetCharacteristics(Collection<CharacteristicValueObject> characteristics) voidsetCharacteristicValues(Map<String, String> characteristicValues) voidsetDescription(String description) voidsetFactorIdToFactorValueId(Map<String, String> factorIdToFactorValueId) Map of factor ids (factor232) to factor value (id or the actual value) for this biomaterial.voidsetFactorValueObjects(Collection<FactorValueValueObject> factorValueObjects) voidsetFactorValues(Map<String, String> factorValues) Map of ids (fv133) to a representation of the value (for this biomaterial.)voidsetFastqHeaders(String fastqHeaders) voidsetFVBasicVOs(Collection<FactorValueBasicValueObject> fVBasicVOs) 🛑 This field'sJsonIgnoredoes not hide it: the payload carries anfvbasicVOskey regardless.voidvoidsetSourceBioMaterialId(Long sourceBioMaterialId) The BioMaterial this one was derived from, ornullif this is a sample in its own right.voidsetStatements(Collection<StatementValueObject> statements) The same annotations ascharacteristics, as statements — carrying the predicate and object when a curator wrote one.toString()Methods inherited from class IdentifiableValueObject
getId, setId
-
Constructor Details
-
BioMaterialValueObject
public BioMaterialValueObject()Required when using the class as a spring bean. -
BioMaterialValueObject
-
BioMaterialValueObject
-
BioMaterialValueObject
-
BioMaterialValueObject
public BioMaterialValueObject(BioMaterial bm, boolean basic, boolean allFactorValuesAndCharacteristics) - Parameters:
basic- if true, populatefVBasicVOsinstead offactorValueObjects. Note that basic FVs should be preferred for new code.allFactorValuesAndCharacteristics- whether to include all factor values and characteristics, including those inherited from the source biomaterial, otherwise only those from the sample will be included
-
-
Method Details
-
getFactorValues
-
getFactorValueObjects
Deprecated. -
toString
- Overrides:
toStringin classIdentifiableValueObject<BioMaterial>
-
getName
-
getDescription
-
getAssayName
-
getAssayDescription
-
getFastqHeaders
-
getBioAssayIds
RelatedBioAssayIDs. -
getCharacteristics
-
getStatements
The same annotations ascharacteristics, as statements — carrying the predicate and object when a curator wrote one.🛑 A sample annotation can be predicated:
DatasetsWebService.tagToCharacteristicbuilds aStatementwhenever the write carries a statement field, and it is the same method that writes experiment tags.CharacteristicValueObjecthas no predicate or object, so before this the sample payload flattened such an annotation to its subject on every read — a curator could write a predicated sample characteristic and never see it again.Null, and so absent from the payload, when the caller opted out with
GET /datasets/{dataset}/samples?exclude=sample.statements. It is 21.5% of that response and every row in it also appears undercharacteristicsminus the predicate and object, so a client that renders only subjects can decline it. It stays on by default: an opt-out that defaults to off would put predicated sample characteristics back out of sight, which is the thing this collection was added to end. -
getSourceBioMaterialId
The BioMaterial this one was derived from, ornullif this is a sample in its own right.This is always null on
GET /datasets/{dataset}/samples, for every dataset including single-cell ones, and that is the correct answer rather than missing data: that route returns the dataset's own assays, whose samples are the biological samples themselves and so derive from nothing. Derived samples are created only by single-cell aggregation, which files each {sample, cell type} population as a BioMaterial pointing back at the sample it came from, and hangs it off anExpressionExperimentSubSetrather than the parent dataset. So the populated values are reached throughGET /datasets/{dataset}/subSets/{subSet}/samples, where each value is the id of a sample the parent route returned.Do not read this field to decide whether a dataset is single-cell: it is null on single-cell datasets too, so the test silently answers "no" everywhere. Use the pre-added
assayExperimentTag (OBI_0002631 / OBI_0003109), orGET /datasets/{dataset}/singleCellDimension, which 404s for datasets that have no single-cell data. -
getCharacteristicValues
-
getCharacteristicOriginalValues
-
isBasicFVs
public boolean isBasicFVs()Indicate if this is using thefVBasicVOsorfactorValueObjectsfor representing factor values. -
getFVBasicVOs
🛑 This field'sJsonIgnoredoes not hide it: the payload carries anfvbasicVOskey regardless.Lombok generates the getter as
getFVBasicVOs(), and a generated getter does not inherit the field's annotations. Jackson then derives an implicit property name from each accessor independently —fVBasicVOsfrom the field,fvbasicVOsfrom the getter (the bean de-capitalization rule lowercases the whole leading run of capitals inFVBasicVOs). Those two names are not equal, so Jackson never pairs the getter with the field, the@JsonIgnoreapplies only to the unpaired field, and the getter serializes as a property in its own right. The same shape onfactorValueObjectsis harmless because its getter isgetFactorValueObjects(), whose implicit name does match its field.Repeating
@JsonIgnoreongetFVBasicVOs()closes it, and is deliberately NOT done here:fvbasicVOshas live readers in the curation-agents repos, which are being moved off it separately. Do not delete the getter either —BioAssayDimensionValueObjectcallsgetFactorValueObjects()from Java, and Java-live is not the same as wire-live. -
getFactorIdToFactorValueId
-
getAssayProcessingDate
-
setName
-
setDescription
-
setAssayName
-
setAssayDescription
-
setFastqHeaders
-
setBioAssayIds
RelatedBioAssayIDs. -
setCharacteristics
-
setStatements
The same annotations ascharacteristics, as statements — carrying the predicate and object when a curator wrote one.🛑 A sample annotation can be predicated:
DatasetsWebService.tagToCharacteristicbuilds aStatementwhenever the write carries a statement field, and it is the same method that writes experiment tags.CharacteristicValueObjecthas no predicate or object, so before this the sample payload flattened such an annotation to its subject on every read — a curator could write a predicated sample characteristic and never see it again.Null, and so absent from the payload, when the caller opted out with
GET /datasets/{dataset}/samples?exclude=sample.statements. It is 21.5% of that response and every row in it also appears undercharacteristicsminus the predicate and object, so a client that renders only subjects can decline it. It stays on by default: an opt-out that defaults to off would put predicated sample characteristics back out of sight, which is the thing this collection was added to end. -
setSourceBioMaterialId
The BioMaterial this one was derived from, ornullif this is a sample in its own right.This is always null on
GET /datasets/{dataset}/samples, for every dataset including single-cell ones, and that is the correct answer rather than missing data: that route returns the dataset's own assays, whose samples are the biological samples themselves and so derive from nothing. Derived samples are created only by single-cell aggregation, which files each {sample, cell type} population as a BioMaterial pointing back at the sample it came from, and hangs it off anExpressionExperimentSubSetrather than the parent dataset. So the populated values are reached throughGET /datasets/{dataset}/subSets/{subSet}/samples, where each value is the id of a sample the parent route returned.Do not read this field to decide whether a dataset is single-cell: it is null on single-cell datasets too, so the test silently answers "no" everywhere. Use the pre-added
assayExperimentTag (OBI_0002631 / OBI_0003109), orGET /datasets/{dataset}/singleCellDimension, which 404s for datasets that have no single-cell data. -
setCharacteristicValues
-
setCharacteristicOriginalValues
-
setBasicFVs
public void setBasicFVs(boolean basicFVs) Indicate if this is using thefVBasicVOsorfactorValueObjectsfor representing factor values. -
setFVBasicVOs
🛑 This field'sJsonIgnoredoes not hide it: the payload carries anfvbasicVOskey regardless.Lombok generates the getter as
getFVBasicVOs(), and a generated getter does not inherit the field's annotations. Jackson then derives an implicit property name from each accessor independently —fVBasicVOsfrom the field,fvbasicVOsfrom the getter (the bean de-capitalization rule lowercases the whole leading run of capitals inFVBasicVOs). Those two names are not equal, so Jackson never pairs the getter with the field, the@JsonIgnoreapplies only to the unpaired field, and the getter serializes as a property in its own right. The same shape onfactorValueObjectsis harmless because its getter isgetFactorValueObjects(), whose implicit name does match its field.Repeating
@JsonIgnoreongetFVBasicVOs()closes it, and is deliberately NOT done here:fvbasicVOshas live readers in the curation-agents repos, which are being moved off it separately. Do not delete the getter either —BioAssayDimensionValueObjectcallsgetFactorValueObjects()from Java, and Java-live is not the same as wire-live. -
setFactorValueObjects
-
setFactorValues
-
setFactorIdToFactorValueId
-
setAssayProcessingDate
-
equals
- Overrides:
equalsin classIdentifiableValueObject<BioMaterial>
-
canEqual
- Overrides:
canEqualin classIdentifiableValueObject<BioMaterial>
-
hashCode
public int hashCode()- Overrides:
hashCodein classIdentifiableValueObject<BioMaterial>
-
getFactorValues()