82aeb03255f4f45baf5bd9e8c0d06ba57a071f8f tdreszer Fri May 27 14:46:46 2011 -0700 Fixed mistake of not using tags on hgFileUi filterBy boxes. This resulted in UChicago downloads page not showing control terms properly. diff --git src/hg/inc/cv.h src/hg/inc/cv.h index 3482a71..dedb56c 100644 --- src/hg/inc/cv.h +++ src/hg/inc/cv.h @@ -64,54 +64,61 @@ void cvFileDeclare(char *filePath); // Declare an altername cv.ra file to use // (The cv.ra file is normally discovered based upon CGI/Tool and envirnment) char *cvTypeNormalized(char *sloppyTerm); // returns (on stack) the proper term to use when requesting a typeOfTerm char *cvTermNormalized(char *sloppyTerm); // returns (on stack) the proper term to use when requesting a cvTerm hash const struct hash *cvTermHash(char *term); // returns a hash of hashes of a term which should be defined in cv.ra // NOTE: in static memory: DO NOT FREE +const struct hash *cvOneTermHash(char *type,char *term); +// returns a hash for a single term of a given type +// NOTE: in static memory: DO NOT FREE + const struct hash *cvTermTypeHash(); // returns a hash of hashes of mdb and controlled vocabulary (cv) term types // Those terms should contain label,descrition,searchable,cvDefined,hidden // NOTE: in static memory: DO NOT FREE struct slPair *cvWhiteList(boolean searchTracks, boolean cvLinks); // returns the official mdb/controlled vocabulary terms that have been whitelisted for certain uses. enum cvSearchable // metadata Variavble are only certain declared types { cvNotSearchable =0, // Txt is default cvSearchByMultiSelect =1, // Search by drop down multi-select of supplied list (NOT YET IMPLEMENTED) cvSearchBySingleSelect =2, // Search by drop down single-select of supplied list cvSearchByFreeText =3, // Search by free text field (NOT YET IMPLEMENTED) cvSearchByDateRange =4, // Search by discovered date range (NOT YET IMPLEMENTED) cvSearchByIntegerRange =5 // Search by discovered integer range (NOT YET IMPLEMENTED) }; enum cvSearchable cvSearchMethod(char *term); // returns whether the term is searchable const char *cvLabel(char *term); // returns cv label if term found or else just term +const char *cvTag(char *type,char *term); +// returns cv Tag if term found or else NULL + boolean cvTermIsHidden(char *term); // returns TRUE if term is defined as hidden in cv.ra boolean cvTermIsEmpty(char *term,char *val); // returns TRUE if term has validation of "cv or None" and the val is None char *cvLabNormalize(char *sloppyTerm); /* CV inconsistency work-arounds. Return lab name trimmed of parenthesized trailing * info (a few ENCODE labs have this in metaDb and/or in CV term -- * PI name embedded in parens in the CV term). Also fixes other problems until * cleaned up in CV, metaDb and user processes. Caller must free mem. */ #endif /* CV_H */