5dcfe2b1322ee5d4c989006b6161fcdac490580e
tdreszer
  Fri Jan 28 16:13:11 2011 -0800
Added -validate option to mdbPrint, which will validate mdb vars against cv.ra.
diff --git src/hg/inc/mdb.h src/hg/inc/mdb.h
index 085575d..2fdb690 100644
--- src/hg/inc/mdb.h
+++ src/hg/inc/mdb.h
@@ -348,41 +348,47 @@
 // This method will use mdbObjsQueryByVars()
 
 struct slName *mdbObjNameSearch(struct sqlConnection *conn, char *var, char *val, char *op, int limit, boolean tables, boolean files);
 // Search the metaDb table for objs by var and val.  Can restrict by op "is" or "like" and accept (non-zero) limited string size
 // Search is via mysql, so it's case-insensitive.  Return is sorted on obj.
 
 struct slName *mdbValSearch(struct sqlConnection *conn, char *var, int limit, boolean tables, boolean files);
 // Search the metaDb table for vals by var.  Can impose (non-zero) limit on returned string size of val
 // Search is via mysql, so it's case-insensitive.  Return is sorted on val.
 
 struct slPair *mdbValLabelSearch(struct sqlConnection *conn, char *var, int limit, boolean tables, boolean files);
 // Search the metaDb table for vals by var and returns controlled vocabulary (cv) label
 // (if it exists) and val as a pair.  Can impose (non-zero) limit on returned string size of name.
 // Return is case insensitive sorted on name (label or else val).
 
+struct hash *mdbCvTermHash(char *term);
+// returns a hash of hashes of a term which should be defined in cv.ra
+
 struct hash *mdbCvTermTypeHash();
 // returns a hash of hashes of mdb and controlled vocabulary (cv) term types
 // Those terms should contain label,descrition,searchable,cvDefined,hidden
 
 struct slPair *mdbCvWhiteList(boolean searchTracks, boolean cvLinks);
 // returns the official mdb/controlled vocabulary terms that have been whitelisted for certain uses.
 
 enum mdbCvSearchable
 // metadata Variavble are only certain declared types
     {
     cvsNotSearchable        =0,  // Txt is default
     cvsSearchByMultiSelect  =1,  // Search by drop down multi-select of supplied list (NOT YET IMPLEMENTED)
     cvsSearchBySingleSelect =2,  // Search by drop down single-select of supplied list
     cvsSearchByFreeText     =3,  // Search by free text field (NOT YET IMPLEMENTED)
     cvsSearchByDateRange    =4,  // Search by discovered date range (NOT YET IMPLEMENTED)
     cvsSearchByIntegerRange =5   // Search by discovered integer range (NOT YET IMPLEMENTED)
     };
 
 enum mdbCvSearchable mdbCvSearchMethod(char *term);
 // returns whether the term is searchable // TODO: replace with mdbCvWhiteList() returning struct
 
 const char *cvLabel(char *term);
 // returns cv label if term found or else just term
 
+int mdbObjsValidate(struct mdbObj *mdbObjs);
+// Validates vars and vals against cv.ra.  Returns count of errors found
+
 #endif /* MDB_H */