940408c6bd688d9a804588cdd80051c73d6d13c2 kate Tue Apr 10 23:45:28 2012 -0700 hgEncodeApi and hgApi cleanup complete diff --git src/hg/inc/cv.h src/hg/inc/cv.h index ddfef2b..2038d00 100644 --- src/hg/inc/cv.h +++ src/hg/inc/cv.h @@ -16,31 +16,37 @@ #define CV_TITLE "title" #define CV_DESCRIPTION "description" // CV Less common settings #define CV_GEO "geo" #define CV_LINEAGE "lineage" #define CV_ORDER_URL "orderUrl" #define CV_ORGANISM "organism" #define CV_PROTOCOL "protocol" #define CV_SEX "sex" #define CV_TERM_ID "termId" #define CV_TERM_URL "termUrl" #define CV_TIER "tier" #define CV_TISSUE "tissue" #define CV_VENDOR_ID "vendorId" -#define CV_VENDER_NAME "vendorName" +#define CV_VENDOR_NAME "vendorName" +#define CV_KARYOTYPE "karyotype" +#define CV_ANTIBODY_DESCRIPTION "antibodyDescription" +#define CV_TARGET_DESCRIPTION "targetDescription" +#define CV_TARGET_ID "targetId" +#define CV_TARGET_URL "targetURL" +#define CV_DATA_GROUP "dataGroup" // Type of Terms defines #define CV_TOT "typeOfTerm" #define CV_TOT_HIDDEN "hidden" #define CV_TOT_CV_DEFINED "cvDefined" #define CV_TOT_PRIORITY "priority" #define CV_TOT_SEARCHABLE "searchable" // Validation Rules #define CV_VALIDATE "validate" #define CV_VALIDATE_CV "cv" #define CV_VALIDATE_CV_OR_NONE "cv or None" #define CV_VALIDATE_CV_OR_CONTROL "cv or control" #define CV_VALIDATE_DATE "date" #define CV_VALIDATE_EXISTS "exists" @@ -51,30 +57,34 @@ #define CV_VALIDATE_NONE "none" // CV TERMS (NOTE: UGLY Terms in cv.ra are hidden inside cv.c APIS) #define CV_TERM_GRANT "grant" #define CV_TERM_LAB "lab" #define CV_TERM_CELL "cell" #define CV_TERM_ANTIBODY "antibody" #define CV_TERM_CONTROL "control" #define CV_TERM_DATA_TYPE "dataType" #define CV_TERM_LOCALIZATION "localization" #define CV_TERM_VIEW "view" #define CV_TERM_SEQ_PLATFORM "seqPlatform" #define CV_LABEL_EMPTY_IS_NONE "None" +void cvTermJson(struct dyString *json, char *type, struct hash *termHash); +/* Print out CV term in JSON format. Currently just supports dataType, cellType, antibody + * and antibody types */ + void cvFileDeclare(const char *filePath); // Declare an altername cv.ra file to use // (The cv.ra file is normally discovered based upon CGI/Tool and envirnment) const char *cvFile(); // return default location of cv.ra const char *cvTypeNormalized(const char *sloppyTerm); // returns the proper term to use when requesting a typeOfTerm const char *cvTermNormalized(const char *sloppyTerm); // returns the proper term to use when requesting a cvTerm hash const struct hash *cvTermHash(const char *term); // returns a hash of hashes of a term which should be defined in cv.ra