org.molgenis.omx.observ
Class ObservableFeature

java.lang.Object
  extended by org.molgenis.util.AbstractEntity
      extended by org.molgenis.omx.observ.Characteristic
          extended by org.molgenis.omx.observ.ObservableFeature
All Implemented Interfaces:
Serializable, Autoid, Identifiable, Entity

@Entity
public class ObservableFeature
extends Characteristic

ObservableFeature: ObservableFeature defines anything that can be observed.

In other words, ObservableFeature are the questions asked, e.g. 'What is Height?', 'What is Systolic blood pressure?', or 'Has blue eyes?'.

Some questions may be repeated for multiple characteristics. For example 'What is [MarkerAllele] observed?' can be applied to all elements of a MarkerSet, and 'What is [medicin codes] uses' can be applied to a set of Medicine codes. This can be specified using the measuredCharacteristic field.

The identifier of ObservableFeature is globally unique. It is recommended that each ObservableFeature is named according to a well-defined ontology term or database accession. .

Author:
MOLGENIS generator
See Also:
Serialized Form

Field Summary
static String DATATYPE
           
static String DEFINITION
           
static String DEFINITION_IDENTIFIER
           
static String ID
           
static String TEMPORAL
           
static String UNIT
           
static String UNIT_IDENTIFIER
           
 
Fields inherited from class org.molgenis.omx.observ.Characteristic
__TYPE, DESCRIPTION, IDENTIFIER, NAME
 
Constructor Summary
ObservableFeature()
           
ObservableFeature(ObservableFeature copyMe)
          copy constructor
 
Method Summary
 ObservableFeature create(Tuple tuple)
           
 boolean equals(Object obj)
           
static List<? extends ObservableFeature> find(Database db, QueryRule... rules)
          Shorthand for db.find(ObservableFeature.class, org.molgenis.framework.db.QueryRule ...
static ObservableFeature findById(Database db, Integer id)
           
static ObservableFeature findByIdentifier(Database db, String identifier)
           
 Object get(String name)
          Generic getter.
 String getDataType()
          Get the (Optional) Reference to the technical data type.
 String getDataType(Database db)
          Deprecated. 
 String getDataTypeLabel()
          Get tha label for enum DataType.
 List<ValueLabel> getDataTypeOptions()
          DataType is enum.
 Integer getDefinition_Id()
           
 String getDefinition_Identifier()
          Get a pretty label Identifier for cross reference Definition to OntologyTerm.Id.
 OntologyTerm getDefinition()
          Get the The concept that is being measured in a specific way..
 OntologyTerm getDefinition(Database db)
          Deprecated. 
 Collection<Protocol> getFeaturesProtocolCollection()
           
 Collection<Protocol> getFeaturesProtocolCollection(Database db)
           
 Vector<String> getFields()
           
 Vector<String> getFields(boolean skipAutoIds)
          Get the names of all public properties of ObservableFeature.
 String getFields(String sep)
          Deprecated. 
 String getIdField()
           
 Object getIdValue()
           
 List<String> getLabelFields()
           
 Boolean getTemporal()
          Get the Whether this feature is time dependent and can have different values when measured on different times (e.g.
 Boolean getTemporal(Database db)
          Deprecated. 
 Integer getUnit_Id()
           
 String getUnit_Identifier()
          Get a pretty label Identifier for cross reference Unit to OntologyTerm.Id.
 OntologyTerm getUnit()
          Get the (Optional) Reference to the well-defined measurement unit used to observe this feature (if feature is that concrete).
 OntologyTerm getUnit(Database db)
          Deprecated. 
 String getValues(String sep)
          Deprecated. 
 String getXrefIdFieldName(String fieldName)
           
 int hashCode()
           
static Query<? extends ObservableFeature> query(Database db)
          Shorthand for db.query(ObservableFeature.class).
 void set(Tuple tuple, boolean strict)
           
 void setDataType(String dataType)
          Set the (Optional) Reference to the technical data type.
 void setDefinition_Id(Integer definition_id)
          Set foreign key for field definition.
 void setDefinition_Identifier(String definition_Identifier)
          Set a pretty label for cross reference Definition to OntologyTerm.Id.
 void setDefinition(Integer definition_id)
           
 void setDefinition(OntologyTerm definition)
          Set the The concept that is being measured in a specific way..
 void setFeaturesProtocolCollection(Collection<Protocol> collection)
           
 void setTemporal(Boolean temporal)
          Set the Whether this feature is time dependent and can have different values when measured on different times (e.g.
 void setUnit_Id(Integer unit_id)
          Set foreign key for field unit.
 void setUnit_Identifier(String unit_Identifier)
          Set a pretty label for cross reference Unit to OntologyTerm.Id.
 void setUnit(Integer unit_id)
           
 void setUnit(OntologyTerm unit)
          Set the (Optional) Reference to the well-defined measurement unit used to observe this feature (if feature is that concrete).
 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

UNIT

public static final String UNIT
See Also:
Constant Field Values

UNIT_IDENTIFIER

public static final String UNIT_IDENTIFIER
See Also:
Constant Field Values

DEFINITION

public static final String DEFINITION
See Also:
Constant Field Values

DEFINITION_IDENTIFIER

public static final String DEFINITION_IDENTIFIER
See Also:
Constant Field Values

DATATYPE

public static final String DATATYPE
See Also:
Constant Field Values

TEMPORAL

public static final String TEMPORAL
See Also:
Constant Field Values

ID

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

ObservableFeature

public ObservableFeature()

ObservableFeature

public ObservableFeature(ObservableFeature copyMe)
                  throws Exception
copy constructor

Throws:
Exception
Method Detail

query

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


find

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

Throws:
DatabaseException

findById

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

findByIdentifier

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

getUnit

public OntologyTerm getUnit()
Get the (Optional) Reference to the well-defined measurement unit used to observe this feature (if feature is that concrete). E.g. mmHg.

Returns:
unit.

getUnit

@Deprecated
public OntologyTerm getUnit(Database db)
Deprecated. 


setUnit

public void setUnit(OntologyTerm unit)
Set the (Optional) Reference to the well-defined measurement unit used to observe this feature (if feature is that concrete). E.g. mmHg.

Parameters:
unit -

setUnit_Id

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


setUnit

public void setUnit(Integer unit_id)

getUnit_Id

public Integer getUnit_Id()

getUnit_Identifier

public String getUnit_Identifier()
Get a pretty label Identifier for cross reference Unit to OntologyTerm.Id.


setUnit_Identifier

public void setUnit_Identifier(String unit_Identifier)
Set a pretty label for cross reference Unit to OntologyTerm.Id. Implies setUnit(null) until save


getDefinition

public OntologyTerm getDefinition()
Get the The concept that is being measured in a specific way..

Returns:
definition.

getDefinition

@Deprecated
public OntologyTerm getDefinition(Database db)
Deprecated. 


setDefinition

public void setDefinition(OntologyTerm definition)
Set the The concept that is being measured in a specific way..

Parameters:
definition -

setDefinition_Id

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


setDefinition

public void setDefinition(Integer definition_id)

getDefinition_Id

public Integer getDefinition_Id()

getDefinition_Identifier

public String getDefinition_Identifier()
Get a pretty label Identifier for cross reference Definition to OntologyTerm.Id.


setDefinition_Identifier

public void setDefinition_Identifier(String definition_Identifier)
Set a pretty label for cross reference Definition to OntologyTerm.Id. Implies setDefinition(null) until save


getDataType

public String getDataType()
Get the (Optional) Reference to the technical data type. E.g. 'int'.

Returns:
dataType.

getDataType

@Deprecated
public String getDataType(Database db)
Deprecated. 


setDataType

public void setDataType(String dataType)
Set the (Optional) Reference to the technical data type. E.g. 'int'.

Parameters:
dataType -

getDataTypeLabel

public String getDataTypeLabel()
Get tha label for enum DataType.


getDataTypeOptions

public List<ValueLabel> getDataTypeOptions()
DataType is enum. This method returns all available enum options.


getTemporal

public Boolean getTemporal()
Get the Whether this feature is time dependent and can have different values when measured on different times (e.g. weight, temporal=true) or generally only measured once (e.g. birth date, temporal=false).

Returns:
temporal.

getTemporal

@Deprecated
public Boolean getTemporal(Database db)
Deprecated. 


setTemporal

public void setTemporal(Boolean temporal)
Set the Whether this feature is time dependent and can have different values when measured on different times (e.g. weight, temporal=true) or generally only measured once (e.g. birth date, temporal=false).

Parameters:
temporal -

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 ObservableFeature.

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 ObservableFeature create(Tuple tuple)
                         throws Exception
Specified by:
create in interface Entity
Overrides:
create in class Characteristic
Throws:
Exception

getFeaturesProtocolCollection

public Collection<Protocol> getFeaturesProtocolCollection()

getFeaturesProtocolCollection

public Collection<Protocol> getFeaturesProtocolCollection(Database db)

setFeaturesProtocolCollection

public void setFeaturesProtocolCollection(Collection<Protocol> collection)

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.