68556d6313c84572edde3f854fd0ee2592cee9b7 tdreszer Mon Sep 12 14:05:12 2011 -0700 Further work to have cv label appear instead of term in file search, fileUi and metadata dropdown diff --git src/hg/inc/cv.h src/hg/inc/cv.h index 10c6f04..403d90d 100644 --- src/hg/inc/cv.h +++ src/hg/inc/cv.h @@ -113,35 +113,40 @@ // CV term may be recognizable as int or float { cvIndeterminant =0, // Indeterminant, likely string cvString =1, // Just about all terms are strings cvInteger =2, // Some are known integers cvFloat =3, // Floats are possible cvDate =4, // Dates are expected as YYYY-MM-DD }; enum cvDataType cvDataType(const char *term); // returns the dataType if it can be determined boolean cvValidateTerm(const char *term,const char *val,char *reason,int len); // returns TRUE if term is valid. Can pass in a reason buffer of len to get reason. -const char *cvLabel(const char *term); +const char *cvLabel(const char *type,const char *term); // returns cv label if term found or else just term +// If type not supplied, must be a typeOfTerm definition const char *cvTag(const char *type,const char *term); // returns cv Tag if term found or else NULL boolean cvTermIsHidden(const char *term); // returns TRUE if term is defined as hidden in cv.ra +boolean cvTermIsCvDefined(const char *term); +// returns TRUE if the terms values are defined in the cv.ra +// For example anitobody is cv defined but expId isn't + boolean cvTermIsEmpty(const char *term,const char *val); // returns TRUE if term has validation of "cv or None" and the val is None char *cvLabNormalize(const 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 */