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
public class Statement extends Characteristic
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)
andgetNumberOfStatements()
.- Author:
- poirigui
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Statement.Factory
-
Constructor Summary
Constructors Constructor Description Statement()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
compareTo(Characteristic characteristic)
boolean
equals(Object object)
Important note: Two objects with the same class and non-null ID must be considered equal.int
getNumberOfStatements()
String
getObject()
String
getObject(int index)
String
getObjectUri()
String
getObjectUri(int index)
String
getPredicate()
String
getPredicate(int index)
String
getPredicateUri()
String
getPredicateUri(int index)
String
getSecondObject()
String
getSecondObjectUri()
String
getSecondPredicate()
String
getSecondPredicateUri()
String
getSubject()
Obtain the subject of the statement.String
getSubject(int index)
String
getSubjectUri()
Obtain the subject URI of the statement.String
getSubjectUri(int index)
String
getValue()
Deprecated.usegetSubject()
insteadString
getValueUri()
Deprecated.usegetSubjectUri()
insteadint
hashCode()
Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.void
setObject(String object)
void
setObjectUri(String objectUri)
void
setPredicate(String predicate)
void
setPredicateUri(String predicateUri)
void
setSecondObject(String secondObject)
void
setSecondObjectUri(String secondObjectUri)
void
setSecondPredicate(String secondPredicate)
void
setSecondPredicateUri(String secondPredicateUri)
void
setSubject(String subject)
void
setSubjectUri(String subject)
void
setValue(String value)
Deprecated.usesetSubject(String)
insteadvoid
setValueUri(String uri)
Deprecated.usesetSubjectUri(String)
insteadString
toString()
-
Methods inherited from class ubic.gemma.model.common.description.Characteristic
getByCategoryAndValueComparator, getByCategoryComparator, getCategory, getCategoryUri, getComparator, getEvidenceCode, getId, getOriginalValue, isMigratedToStatement, setCategory, setCategoryUri, setEvidenceCode, setMigratedToStatement, setOriginalValue
-
Methods inherited from class ubic.gemma.model.common.AbstractDescribable
getDescription, getName, setDescription, setName
-
Methods inherited from class ubic.gemma.model.common.AbstractIdentifiable
setId
-
-
-
-
Method Detail
-
getValue
@Deprecated public String getValue()
Deprecated.usegetSubject()
instead- Overrides:
getValue
in classCharacteristic
- Returns:
- The human-readable term (e.g., "OrganismPart"; "kinase")
-
setValue
@Deprecated public void setValue(String value)
Deprecated.usesetSubject(String)
instead- Overrides:
setValue
in classCharacteristic
-
getValueUri
@Deprecated public String getValueUri()
Deprecated.usegetSubjectUri()
instead- Overrides:
getValueUri
in 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 public void setValueUri(@Nullable String uri)
Deprecated.usesetSubjectUri(String)
instead- Overrides:
setValueUri
in classCharacteristic
-
getSubject
public String getSubject()
Obtain the subject of the statement.
-
setSubject
public void setSubject(String subject)
-
getSubjectUri
public String getSubjectUri()
Obtain the subject URI of the statement.
-
setSubjectUri
public void setSubjectUri(String subject)
-
getNumberOfStatements
public int getNumberOfStatements()
-
equals
public boolean equals(Object object)
Description copied from class:AbstractIdentifiable
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:
equals
in classCharacteristic
-
hashCode
public int hashCode()
Description copied from class:AbstractIdentifiable
Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.- Overrides:
hashCode
in classCharacteristic
-
compareTo
public int compareTo(@Nonnull Characteristic characteristic)
- Specified by:
compareTo
in interfaceComparable<Characteristic>
- Overrides:
compareTo
in classCharacteristic
-
toString
public String toString()
- Overrides:
toString
in classCharacteristic
-
-