Developing GermplasmSet

From ICISWiki

Jump to: navigation, search

Developing GermplasmSet

Click here to view the unedited copy of this usecase.

Data used in populating GermplasmSet object can be found in listnms and listdata table from ICIS database. A complete description of

these tables and their columns can be found here.


(This is a copy of the original usecase xml with added information on how to get the needed data for a particular attribute).


Use Case ID: RetrieveGermplasmSets

Description:

This use case refers to the retrieval of sets of Germplasm where such

sets are formally managed for example, within the list management

table of the International Crop Information System (ICIS).


This use case only provides some basic search facilities based on list identifier, name or description. The GermplasmSet returned has Germplasm members that should be annotated appropropriately with all available information (e.g. the information found in the ICIS ListData table, for each entry).


Datatype: GermplasmSet

Reference GermplasmSetBaseConstants.DATATYPE_ID
Name GermplasmSet
A list of Germplasm is represented in the GCP domain model by the GermplasmSet model, which inherits attributes from the Entity model some of which are returned by this use case as available attributes.




Searchable Attributes
Reference GermplasmSetBaseConstants.UNIQUE_IDENTIFIER_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Unique Identifier
Operators org.generationcp.core.ontology.Operator.EQUAL org.generationcp.core.ontology.Operator.IN
A Unique Identifier of a given GermplasmSet.


Query used to retrieve GermplasmSet information by Unique Identifier.
SELECT ln.listid, ln.listname, ln.listtype, ln.listdesc, ln.listuid, ln.listdate, ln.lhierarchy, ln.liststatus, us.uname FROM listnms ln, users us WHERE us.userid = ln.listuid and ln.listid = ?

Reference GermplasmSetBaseConstants.NAME_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Name
Operators org.generationcp.core.ontology.Operator.EQUAL org.generationcp.core.ontology.Operator.LIKE
A Name of a given GermplasmSet.


Query used to retrieve GermplasmSet information by name.
SELECT ln.listid, ln.listname, ln.listtype, ln.listdesc, ln.listuid, ln.listdate, ln.lhierarchy, ln.liststatus, us.uname FROM listnms ln, users us WHERE us.userid = ln.listuid AND ln.listname =?

Reference GermplasmSetBaseConstants.DESCRIPTION_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Description
Operators org.generationcp.core.ontology.Operator.EQUAL org.generationcp.core.ontology.Operator.LIKE
Title or description of the GermplasmSet


Query used to retrieve GermplasmSet information by description
SELECT ln.listid, ln.listname, ln.listtype, ln.listdesc, ln.listuid, ln.listdate, ln.lhierarchy, ln.liststatus, us.uname FROM listnms ln, users us WHERE us.userid = ln.listuid AND ln.listdesc =?



Available Attributes
Reference GermplasmSetBaseConstants.UNIQUE_IDENTIFIER_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Unique Identifier
A Unique Identifier of a given GermplasmSet.


listnms.listid

Reference GermplasmSetBaseConstants.NAME_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Name
A Name of a given GermplasmSet.


listnms.listname

Reference GermplasmSetBaseConstants.TYPE_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Type
A Type of a certain GermplasmSet.


listnms.type

Reference GermplasmSetBaseConstants.ANNOTATIONS_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Annotations
List of Feature objects that contain various ad hoc GermplasmSet meta-data such as list status (expressed as a SimpleOntologyTerm)


listnms.liststatus

Reference GermplasmSetBaseConstants.RELATIONSHIPS_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Relationships
List of EntityRelationship objects pointing to enclosing GermplasmSet objects which represent aggregations(folders) of this and other related GermplasmSets (i.e. dereferenced by the LIST_HIERARCHY attribute of the ICIS LISTNAMES table).


Refer to GermplasmSet Relationship

Reference GermplasmSetBaseConstants.DESCRIPTION_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Description
Title or description of the GermplasmSet


Listnms.listdesc

Reference GermplasmSetBaseConstants.OWNER_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Owner
Owner of the GermplasmSet


users.uname

Reference GermplasmSetBaseConstants.CREATION_DATE_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Creation Date
Creation date of the GermplasmSet


Listnms.listdate

Reference GermplasmSetBaseConstants.MEMBERS_DATATYPE_ATTRIBUTE_ID
Name GermplasmSet Members
Germplasm objects that are Members of the GermplasmSet (i.e. as documented in the ICIS ListData table)


Refer to Germplasmset Members


Germplasmset Relationship
GermplasmSet Relationship objects contains list of GermplasmSet Object.

To populate the List of GermplasmSet belonging to a parent Germplasmset we use the result of the following query.The listnms.lhierarchy of the child GermplasmSet is the listnms.listid of the parent GermplasmSet.

SELECT ln.listid, ln.listname, ln.listtype, ln.listdesc, ln.listuid, ln.listdate, ln.lhierarchy, ln.liststatus, us.uname FROM listnms ln left join users us on us.userid = ln.listuid where ln.liststatus <> 9 AND ln.lhierarchy = ? ORDER BY ln.listname


GermplasmSet Members
GermplasmSet Members is a list of Germplasm that belongs to a GermplasmSet.

To populate Germplasm Object we use the query below. Note that we are only returning little information that is available to build the Germplasm object. desig is the name of the Germplasm. gid and listid are needed to retrieve the annotations for this Germplasm. If you want to get the Germplasm Object with complete information use the Retrieve Germplasms Usecase.


SELECT gid, desig, listid FROM listdata WHERE listid = ? ORDER BY desig


Germplasm Annotation

Data returned as annotations are retrieved from the listdata table. Here is the query to use to retrieve annotations for a Germplasm. Note that we need two information to retrieve annotations for the Germplasm, the listid and the gid.


SELECT gid, entryid, entrycd, source, desig, grpname FROM listdata WHERE listid = ?

and gid = ?

Personal tools