From: Michael S. <msa...@pc...> - 2005-06-06 21:05:34
|
sounds good to me. --Mike On 6/6/05 4:58 PM, "Steve Fischer" <sfi...@pc...> wrote: > ok. yes, the format will be two columns, tab delimited. how's that? > > what we can do is rename my method from: > > checkControlledVocab($file, $table, $column) > > to: > > my cvHash = getControlledVocab($file, $table, $column) > > (it still dies if there is a problem.) > > the key of the hash is the input value. the value of the hash is a > little hash with keys "term" and "primaryKey" > > steve > > Michael Saffitz wrote: > >> Hi Steve, >> >> Ok. We'll have to standardize the format of the dinky CV mapping files, >> right? >> >> I think the following methods would be really helpful as well: >> >> getInternalTermPrimaryKey( $external_term) >> getInternalTerm( $external_term) >> >> This way the individual plugins don't need to implement parsing the dinky >> cvs file. (method names are just quick suggestions, change at will :) >> >> --Mike >> >> >> >> On 6/6/05 4:11 PM, "Steve Fischer" <sfi...@pc...> wrote: >> >> >> >>> ok, now i think i've cracked it. and its simple simple simple. >>> >>> any plugin that uses a dinky CV takes a mapping file from the input to >>> the GUS CV. the case where the input is identical to the GUS CV is not >>> given special handling. >>> >>> i will write a method in Plugin.pm: >>> >>> checkControlledVocab($cvMappingFile, $table, $column); >>> >>> it throws an exception (dies) unless every entry in the GUS column of >>> the file is found in the db. >>> >>> the message will include every entry not found. >>> >>> then the user of the plugin has to update the table with the cv, or >>> change the mapping file. >>> >>> as far as consistency across applications within a site: the user of >>> the plugin will dump the table to see the allowed values. that will >>> serve as the authoritative version from which to make the mapping file. >>> >>> steve >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: NEC IT Guy Games. How far can you >>> shotput >>> a projector? How fast can you ride your desk chair down the office luge >>> track? >>> If you want to score the big prize, get to know the little guy. >>> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 >>> _______________________________________________ >>> Gusdev-gusdev mailing list >>> Gus...@li... >>> https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev >>> >>> >> >> >> |