Class Statement
java.lang.Object
ubic.gemma.model.common.AbstractIdentifiable
ubic.gemma.model.common.AbstractDescribable
ubic.gemma.model.common.description.Characteristic
ubic.gemma.model.expression.experiment.Statement
- All Implemented Interfaces:
Comparable<Characteristic>,Describable,Identifiable
A special kind of characteristic that act as a statement.
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: Two objects with the same class and non-null ID must be considered equal.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()Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.voidvoidsetObjectUri(String objectUri) voidsetPredicate(String predicate) voidsetPredicateUri(String predicateUri) 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 ubic.gemma.model.common.description.Characteristic
getByCategoryAndValueComparator, getByCategoryComparator, getCategory, getCategoryUri, getComparator, getEvidenceCode, getId, getOriginalValue, isMigratedToStatement, setCategory, setCategoryUri, setEvidenceCode, setMigratedToStatement, setOriginalValueMethods inherited from class ubic.gemma.model.common.AbstractDescribable
getDescription, getName, setDescription, setNameMethods inherited from class ubic.gemma.model.common.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)instead- Overrides:
setValueUriin classCharacteristic
-
getSubject
Obtain the subject of the statement. -
setSubject
-
getSubjectUri
Obtain the subject URI of the statement. -
setSubjectUri
-
getPredicate
-
setPredicate
-
getPredicateUri
-
setPredicateUri
-
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:AbstractIdentifiableImportant 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()Description copied from class:AbstractIdentifiableImportant note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.- Overrides:
hashCodein classCharacteristic
-
compareTo
- Specified by:
compareToin interfaceComparable<Characteristic>- Overrides:
compareToin classCharacteristic
-
toString
- Overrides:
toStringin classCharacteristic
-
getSubject()instead