Class Statement
- All Implemented Interfaces:
Comparable<Characteristic>, Describable, Identifiable
It can relate to up to two other objects, essentially forming two statements. This is a limited form of RDF-style triplet with the main limitation that a given subject can have up to two predicates and objects.
You can make abstraction of that implementation detail by using getSubject(int), getPredicate(int),
getObject(int) and getNumberOfStatements().
- Author:
- poirigui
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Characteristic characteristic) booleanImportant note: The name should be compared in a case-insensitive manner.intgetObject(int index) getObjectUri(int index) getPredicate(int index) getPredicateUri(int index) Obtain the subject of the statement.getSubject(int index) Obtain the subject URI of the statement.getSubjectUri(int index) getValue()Deprecated.Deprecated.usegetSubjectUri()insteadinthashCode()Constant, and the SAME constantCharacteristic.hashCode()returns.voidvoidsetObjectUri(String objectUri) voidsetPredicate(String predicate) voidsetPredicateUri(String predicateUri) Blank is stored as null, for the reason spelled out onCharacteristic.setValueUri(String): an empty string is a second dialect for ungrounded and no layer reads it that way.voidsetSecondObject(String secondObject) voidsetSecondObjectUri(String secondObjectUri) voidsetSecondPredicate(String secondPredicate) voidsetSecondPredicateUri(String secondPredicateUri) voidsetSubject(String subject) voidsetSubjectUri(String subject) voidDeprecated.usesetSubject(String)insteadvoidsetValueUri(String uri) Deprecated.usesetSubjectUri(String)insteadtoString()Methods inherited from class Characteristic
getByCategoryAndValueComparator, getByCategoryComparator, getCategory, getCategoryUri, getComparator, getEvidenceCode, getId, getOriginalValue, getSupportingEvidence, isMigratedToStatement, normalizeTermText, setCategory, setCategoryUri, setEvidenceCode, setMigratedToStatement, setOriginalValue, setSupportingEvidenceMethods inherited from class AbstractDescribable
getDescription, getName, setDescription, setNameMethods inherited from class AbstractIdentifiable
setId
-
Constructor Details
-
Statement
public Statement()
-
-
Method Details
-
getValue
Deprecated.usegetSubject()instead- Overrides:
getValuein classCharacteristic- Returns:
- The human-readable term (e.g., "OrganismPart"; "kinase")
-
setValue
Deprecated.usesetSubject(String)instead- Overrides:
setValuein classCharacteristic
-
getValueUri
Deprecated.usegetSubjectUri()instead- Overrides:
getValueUriin classCharacteristic- Returns:
- This can be a URI to any resources that describes the characteristic. Often it might be a URI to an OWL ontology term. If the URI is an instance of an abstract class, the classUri should be filled in with the URI for the abstract class.
-
setValueUri
Deprecated.usesetSubjectUri(String)insteadDescription copied from class:Characteristic🛑 Blank is stored as null, the wayCharacteristic.setValue(String)normalises its free text.An empty string is a SECOND DIALECT for ungrounded, and every layer reads the two differently:
CharacteristicUtils.equals(String, String, String, String)treats a non-null URI as grounded, so''beside a NULL reads as "ontology term vs free text" and the duplicate guard indoAddAnnotationlets the pair through; a census grouping on the raw column puts them in two groups. Production carried 80 such rows, all on curation surfaces (52 factor-value statements, 31 experiment tags, 0 biomaterial characteristics); normalising them to NULL on 2026-09-10 collapsed two pairs onto one coordinate and manufactured duplicate tags (frinkbro, 2026-09-11). Ten statement-URI rows were still''when this landed.Only some
Factory.newInstanceoverloads stripped; 72 callsites set a URI directly. The normalisation belongs at the one chokepoint rather than at each of them.Entities use
@Access(AccessType.FIELD), so Hibernate does not call this on load: an existing''row reads back unchanged and is not silently rewritten.- Overrides:
setValueUriin classCharacteristic
-
getSubject
Obtain the subject of the statement. -
setSubject
-
getSubjectUri
Obtain the subject URI of the statement. -
setSubjectUri
-
getPredicate
-
setPredicate
-
getPredicateUri
-
setPredicateUri
Blank is stored as null, for the reason spelled out onCharacteristic.setValueUri(String): an empty string is a second dialect for ungrounded and no layer reads it that way. Prod carried 7PREDICATE_URI = ''and 3OBJECT_URI = ''rows, all factor-value statements, when this landed — the statement columns were outside the sweep that cleared VALUE_URI. -
getObject
-
setObject
-
getObjectUri
-
setObjectUri
-
getSecondPredicate
-
setSecondPredicate
-
getSecondPredicateUri
-
setSecondPredicateUri
-
getSecondObject
-
setSecondObject
-
getSecondObjectUri
-
setSecondObjectUri
-
getSubject
-
getSubjectUri
-
getPredicate
-
getPredicateUri
-
getObject
-
getObjectUri
-
getNumberOfStatements
public int getNumberOfStatements() -
equals
Description copied from class:AbstractDescribableImportant note: The name should be compared in a case-insensitive manner. You can useDescribableUtils.equalsByName(Describable, Describable)to get the correct behavior.Important note: Two objects with the same class and non-null ID must be considered equal. If one or both IDs are nulls, the rest of the state can be used to determine equality.
- Overrides:
equalsin classCharacteristic
-
hashCode
public int hashCode()Constant, and the SAME constantCharacteristic.hashCode()returns. Restated here to say why the predicate fields are NOT hashed, and why this cannot begetClass().hashCode():Characteristic.equals(Object)calls a Statement equal to a Characteristic with the same category and value, so a per-class constant would break the equals/hashCode contract between them.This hashed the predicate and object terms on top of the superclass's mutable category/value hash. Every one of those fields is edited in place by curation, and a Statement lives in
FactorValue'sSet<Statement>, so an edit moved the element to a stale bucket. SeeCharacteristic.hashCode()for the full reasoning and for the rule about not keying large maps by these types.- Overrides:
hashCodein classCharacteristic
-
compareTo
- Specified by:
compareToin interfaceComparable<Characteristic>- Overrides:
compareToin classCharacteristic
-
toString
- Overrides:
toStringin classCharacteristic
-
getSubject()instead