org.molgenis.omx.observ.target
Class OntologyTerm

java.lang.Object
  extended by org.molgenis.util.AbstractEntity
      extended by org.molgenis.omx.observ.Characteristic
          extended by org.molgenis.omx.observ.target.OntologyTerm
All Implemented Interfaces:
Serializable, Autoid, Identifiable, Entity
Direct Known Subclasses:
Accession, Species

@Entity
public class OntologyTerm
extends Characteristic

OntologyTerm: OntologyTerm defines a single entry (term) from an ontology or a controlled vocabulary (defined by Ontology). The identifier is the ontology term is unique. E.g. 'NCI:Antigen Gene'. Other data entities can reference to this OntologyTerm to harmonize naming of concepts. If no suitable ontology term exists then one can define new terms locally (in which case there is no formal accession for the term limiting its use for cross-Investigation queries). .

Author:
MOLGENIS generator
See Also:
Serialized Form

Field Summary
static String DEFINITION
           
static String ID
           
static String ONTOLOGY
           
static String ONTOLOGY_IDENTIFIER
           
static String TERMACCESSION
           
 
Fields inherited from class org.molgenis.omx.observ.Characteristic
__TYPE, DESCRIPTION, IDENTIFIER, NAME
 
Constructor Summary
OntologyTerm()
           
OntologyTerm(OntologyTerm copyMe)
          copy constructor
 
Method Summary
 OntologyTerm create(Tuple tuple)
           
 boolean equals(Object obj)
           
static List<? extends OntologyTerm> find(Database db, QueryRule... rules)
          Shorthand for db.find(OntologyTerm.class, org.molgenis.framework.db.QueryRule ...
static OntologyTerm findById(Database db, Integer id)
           
static OntologyTerm findByIdentifier(Database db, String identifier)
           
static OntologyTerm findByOntologyTermAccession(Database db, Integer ontology, String termAccession)
           
 Object get(String name)
          Generic getter.
 String getDefinition()
          Get the (Optional) The definition of the term..
 String getDefinition(Database db)
          Deprecated. 
 Vector<String> getFields()
           
 Vector<String> getFields(boolean skipAutoIds)
          Get the names of all public properties of OntologyTerm.
 String getFields(String sep)
          Deprecated. 
 String getIdField()
           
 Object getIdValue()
           
 List<String> getLabelFields()
           
 Integer getOntology_Id()
           
 String getOntology_Identifier()
          Get a pretty label Identifier for cross reference Ontology to Ontology.Id.
 Ontology getOntology()
          Get the (Optional) The source ontology or controlled vocabulary list that ontology terms have been obtained from..
 Ontology getOntology(Database db)
          Deprecated. 
 String getTermAccession()
          Get the (Optional) The accession number assigned to the ontology term in its source ontology.
 String getTermAccession(Database db)
          Deprecated. 
 String getValues(String sep)
          Deprecated. 
 String getXrefIdFieldName(String fieldName)
           
 int hashCode()
           
static Query<? extends OntologyTerm> query(Database db)
          Shorthand for db.query(OntologyTerm.class).
 void set(Tuple tuple, boolean strict)
           
 void setDefinition(String definition)
          Set the (Optional) The definition of the term..
 void setOntology_Id(Integer ontology_id)
          Set foreign key for field ontology.
 void setOntology_Identifier(String ontology_Identifier)
          Set a pretty label for cross reference Ontology to Ontology.Id.
 void setOntology(Integer ontology_id)
           
 void setOntology(Ontology ontology)
          Set the (Optional) The source ontology or controlled vocabulary list that ontology terms have been obtained from..
 void setTermAccession(String termAccession)
          Set the (Optional) The accession number assigned to the ontology term in its source ontology.
 String toString()
           
 String toString(boolean verbose)
           
 void validate()
           
 
Methods inherited from class org.molgenis.omx.observ.Characteristic
get__Type, get__Type, get__TypeLabel, get__TypeOptions, getDescription, getDescription, getId, getIdentifier, getIdentifier, getName, getName, getValueMrefValueCollection, getValueMrefValueCollection, set__Type, setDescription, setId, setIdentifier, setName, setValueMrefValueCollection
 
Methods inherited from class org.molgenis.util.AbstractEntity
getLabelValue, getValues, isObjectRepresentation, isReadonly, set, set, setReadonly, setValuesFromString, string2date
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.molgenis.util.Entity
getLabelValue, getValues, isReadonly, set, set, setReadonly
 

Field Detail

ONTOLOGY

public static final String ONTOLOGY
See Also:
Constant Field Values

ONTOLOGY_IDENTIFIER

public static final String ONTOLOGY_IDENTIFIER
See Also:
Constant Field Values

TERMACCESSION

public static final String TERMACCESSION
See Also:
Constant Field Values

DEFINITION

public static final String DEFINITION
See Also:
Constant Field Values

ID

public static final String ID
See Also:
Constant Field Values
Constructor Detail

OntologyTerm

public OntologyTerm()

OntologyTerm

public OntologyTerm(OntologyTerm copyMe)
             throws Exception
copy constructor

Throws:
Exception
Method Detail

query

public static Query<? extends OntologyTerm> query(Database db)
Shorthand for db.query(OntologyTerm.class).


find

public static List<? extends OntologyTerm> find(Database db,
                                                QueryRule... rules)
                                         throws DatabaseException
Shorthand for db.find(OntologyTerm.class, org.molgenis.framework.db.QueryRule ... rules).

Throws:
DatabaseException

findById

public static OntologyTerm findById(Database db,
                                    Integer id)
                             throws DatabaseException
Throws:
DatabaseException

findByIdentifier

public static OntologyTerm findByIdentifier(Database db,
                                            String identifier)
                                     throws DatabaseException
Throws:
DatabaseException

findByOntologyTermAccession

public static OntologyTerm findByOntologyTermAccession(Database db,
                                                       Integer ontology,
                                                       String termAccession)
                                                throws DatabaseException
Throws:
DatabaseException

getOntology

public Ontology getOntology()
Get the (Optional) The source ontology or controlled vocabulary list that ontology terms have been obtained from..

Returns:
ontology.

getOntology

@Deprecated
public Ontology getOntology(Database db)
Deprecated. 


setOntology

public void setOntology(Ontology ontology)
Set the (Optional) The source ontology or controlled vocabulary list that ontology terms have been obtained from..

Parameters:
ontology -

setOntology_Id

public void setOntology_Id(Integer ontology_id)
Set foreign key for field ontology. This will erase any foreign key objects currently set. FIXME: can we autoload the new object?


setOntology

public void setOntology(Integer ontology_id)

getOntology_Id

public Integer getOntology_Id()

getOntology_Identifier

public String getOntology_Identifier()
Get a pretty label Identifier for cross reference Ontology to Ontology.Id.


setOntology_Identifier

public void setOntology_Identifier(String ontology_Identifier)
Set a pretty label for cross reference Ontology to Ontology.Id. Implies setOntology(null) until save


getTermAccession

public String getTermAccession()
Get the (Optional) The accession number assigned to the ontology term in its source ontology. If empty it is assumed to be a locally defined term..

Returns:
termAccession.

getTermAccession

@Deprecated
public String getTermAccession(Database db)
Deprecated. 


setTermAccession

public void setTermAccession(String termAccession)
Set the (Optional) The accession number assigned to the ontology term in its source ontology. If empty it is assumed to be a locally defined term..

Parameters:
termAccession -

getDefinition

public String getDefinition()
Get the (Optional) The definition of the term..

Returns:
definition.

getDefinition

@Deprecated
public String getDefinition(Database db)
Deprecated. 


setDefinition

public void setDefinition(String definition)
Set the (Optional) The definition of the term..

Parameters:
definition -

get

public Object get(String name)
Generic getter. Get the property by using the name.

Specified by:
get in interface Entity
Overrides:
get in class Characteristic

validate

public void validate()
              throws DatabaseException
Specified by:
validate in interface Entity
Overrides:
validate in class Characteristic
Throws:
DatabaseException

set

public void set(Tuple tuple,
                boolean strict)
         throws Exception
Specified by:
set in interface Entity
Overrides:
set in class Characteristic
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Characteristic

toString

public String toString(boolean verbose)
Overrides:
toString in class Characteristic

getFields

public Vector<String> getFields(boolean skipAutoIds)
Get the names of all public properties of OntologyTerm.

Specified by:
getFields in interface Entity
Overrides:
getFields in class Characteristic

getFields

public Vector<String> getFields()
Specified by:
getFields in interface Entity
Overrides:
getFields in class Characteristic

getIdField

public String getIdField()
Specified by:
getIdField in interface Entity
Overrides:
getIdField in class Characteristic

getLabelFields

public List<String> getLabelFields()
Specified by:
getLabelFields in interface Entity
Overrides:
getLabelFields in class Characteristic

getFields

@Deprecated
public String getFields(String sep)
Deprecated. 

Specified by:
getFields in interface Entity
Overrides:
getFields in class Characteristic

getIdValue

public Object getIdValue()
Specified by:
getIdValue in interface Entity
Overrides:
getIdValue in class Characteristic

getXrefIdFieldName

public String getXrefIdFieldName(String fieldName)
Specified by:
getXrefIdFieldName in interface Entity
Overrides:
getXrefIdFieldName in class Characteristic

getValues

@Deprecated
public String getValues(String sep)
Deprecated. 

Specified by:
getValues in interface Entity
Overrides:
getValues in class Characteristic

create

public OntologyTerm create(Tuple tuple)
                    throws Exception
Specified by:
create in interface Entity
Overrides:
create in class Characteristic
Throws:
Exception

equals

public boolean equals(Object obj)
Overrides:
equals in class Characteristic

hashCode

public int hashCode()
Overrides:
hashCode in class Characteristic


Copyright © 2013. All Rights Reserved.