Package org.molgenis.vibe.core.formats
Class Gene
- java.lang.Object
-
- org.molgenis.vibe.core.formats.Entity
-
- org.molgenis.vibe.core.formats.BiologicalEntity
-
- org.molgenis.vibe.core.formats.Gene
-
- All Implemented Interfaces:
Comparable<Entity>,AllFieldsEquals,EntityWithIntId,ResourceUri
public class Gene extends BiologicalEntity implements EntityWithIntId
A gene. Note that equality is determined throughURIsfrom the domain http://identifiers.org describing NCBI Entrez gene identifiers. This was done as DisGeNET converted other gene-identifiers (such as HGNC symbols) into NCBI Entrez gene identifiers (source) within the database.
-
-
Constructor Summary
Constructors Constructor Description Gene(String id, GeneSymbol symbol)Gene(URI uri, GeneSymbol symbol)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallFieldsEquals(Object o)intcompareTo(Entity o)intgetIdInt()protected StringgetIdPrefix()The entity prefix.protected StringgetIdRegex()protected intgetRegexIdGroup()The group within the regular expression the actualEntity.idis stored in.GeneSymbolgetSymbol()protected StringgetUriPrefix()The String describing the URI prefix it should match with.StringtoString()While uniqueness is based on theEntity.id(as eachEntity.idshould only occur once and data belonging to it should be consistent),Entity.toString()can be used for testing whether data retrieval from external sources yielded the expected results.-
Methods inherited from class org.molgenis.vibe.core.formats.Entity
equals, getFormattedId, getId, getName, getUri, hashCode, retrieveIdFromString, setName
-
-
-
-
Field Detail
-
ID_PREFIX
public static final String ID_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Gene
public Gene(String id, GeneSymbol symbol)
-
Gene
public Gene(URI uri, GeneSymbol symbol)
-
-
Method Detail
-
getSymbol
public GeneSymbol getSymbol()
-
getIdInt
public int getIdInt()
- Specified by:
getIdIntin interfaceEntityWithIntId
-
getIdPrefix
protected String getIdPrefix()
Description copied from class:EntityThe entity prefix.- Specified by:
getIdPrefixin classEntity- Returns:
- a
Stringcontaining the prefix.
-
getIdRegex
protected String getIdRegex()
Description copied from class:Entity- Specified by:
getIdRegexin classEntity- Returns:
-
getRegexIdGroup
protected int getRegexIdGroup()
Description copied from class:EntityThe group within the regular expression the actualEntity.idis stored in.- Specified by:
getRegexIdGroupin classEntity- Returns:
-
getUriPrefix
protected String getUriPrefix()
Description copied from class:EntityThe String describing the URI prefix it should match with.- Specified by:
getUriPrefixin classEntity- Returns:
-
toString
public String toString()
While uniqueness is based on theEntity.id(as eachEntity.idshould only occur once and data belonging to it should be consistent),Entity.toString()can be used for testing whether data retrieval from external sources yielded the expected results.
-
compareTo
public int compareTo(Entity o)
- Specified by:
compareToin interfaceComparable<Entity>- Overrides:
compareToin classEntity
-
allFieldsEquals
public boolean allFieldsEquals(Object o)
- Specified by:
allFieldsEqualsin interfaceAllFieldsEquals- Overrides:
allFieldsEqualsin classEntity
-
-