You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(11) |
Jul
(34) |
Aug
(14) |
Sep
(10) |
Oct
(10) |
Nov
(11) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(56) |
Feb
(76) |
Mar
(68) |
Apr
(11) |
May
(97) |
Jun
(16) |
Jul
(29) |
Aug
(35) |
Sep
(18) |
Oct
(32) |
Nov
(23) |
Dec
(77) |
2004 |
Jan
(52) |
Feb
(44) |
Mar
(55) |
Apr
(38) |
May
(106) |
Jun
(82) |
Jul
(76) |
Aug
(47) |
Sep
(36) |
Oct
(56) |
Nov
(46) |
Dec
(61) |
2005 |
Jan
(52) |
Feb
(118) |
Mar
(41) |
Apr
(40) |
May
(35) |
Jun
(99) |
Jul
(84) |
Aug
(104) |
Sep
(53) |
Oct
(107) |
Nov
(68) |
Dec
(30) |
2006 |
Jan
(19) |
Feb
(27) |
Mar
(24) |
Apr
(9) |
May
(22) |
Jun
(11) |
Jul
(34) |
Aug
(8) |
Sep
(15) |
Oct
(55) |
Nov
(16) |
Dec
(2) |
2007 |
Jan
(12) |
Feb
(4) |
Mar
(8) |
Apr
|
May
(19) |
Jun
(3) |
Jul
(1) |
Aug
(6) |
Sep
(12) |
Oct
(3) |
Nov
|
Dec
|
2008 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(21) |
2009 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(19) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
(22) |
Apr
(12) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: steve f. <sfi...@pc...> - 2003-03-05 17:55:18
|
just want to clarify why debbie "committed when i should not have". the deal is that we are extremely rigorous about our tracking of bulk changes to the db. in particular, you cannot run a plugin with --commit unless that exact revision of the plugin has been registered in the db. and, you cannot do that registering unless you have checked in that version of the plugin to cvs. instead of checking in a crippled version of a plugin, hacks like this can be accomplished by other ways, such as: - introducing a temporary command line arg which the plugin tests for to run its hacky code. - copying the plugin to a new file, such as LoadTaxonDebbiesHack.pm, and registering it as a new plugin steve Deborah F. Pinney wrote: >This is my fault. I commited to cvs when I should not have. I have >uncommented those lines and recomitted to cvs. > > > Deboeah Pinney > > >On Wed, 5 Mar 2003, Arnaud >Kerhornou wrote: > > > >>Hi >> >>I'm trying to run LoadTaxon plugin. Why some lines are commented out ? >> >> #my $genCodes = $self->makeGeneticCode(); >> >> my $namesDmp = $self->getNames(); >> >> #my $nodesHash = $self->makeNodesHash($genCodes); >> >> #my $rootAttArray = $self->getRootAttArray($genCodes); >> >> #$self->makeTaxonEntry($rootAttArray, \$count); >> >> #if ($self->getCla->{'restart'} && $self->getCla->{'restart'} > 1) { >> #$self->getTaxonAtt($self->getCla->{'restart'},$nodesHash,\$count); >> #} >> #else { >> #$self->getTaxonAtt($rootAttArray->[0],$nodesHash,\$count); >> #} >> >>Arnaud >> >> >> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger >>for complex code. Debugging C/C++ programs can leave you feeling lost and >>disoriented. TotalView can help you find your way. Available on major UNIX >>and Linux platforms. Try it free. www.etnus.com >>_______________________________________________ >>Gusdev-gusdev mailing list >>Gus...@li... >>https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev >> >> >> > > > >------------------------------------------------------- >This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger >for complex code. Debugging C/C++ programs can leave you feeling lost and >disoriented. TotalView can help you find your way. Available on major UNIX >and Linux platforms. Try it free. www.etnus.com >_______________________________________________ >Gusdev-gusdev mailing list >Gus...@li... >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > > > |
From: Deborah F. P. <pi...@pc...> - 2003-03-05 17:07:42
|
This is my fault. I commited to cvs when I should not have. I have uncommented those lines and recomitted to cvs. Deboeah Pinney On Wed, 5 Mar 2003, Arnaud Kerhornou wrote: > Hi > > I'm trying to run LoadTaxon plugin. Why some lines are commented out ? > > #my $genCodes = $self->makeGeneticCode(); > > my $namesDmp = $self->getNames(); > > #my $nodesHash = $self->makeNodesHash($genCodes); > > #my $rootAttArray = $self->getRootAttArray($genCodes); > > #$self->makeTaxonEntry($rootAttArray, \$count); > > #if ($self->getCla->{'restart'} && $self->getCla->{'restart'} > 1) { > #$self->getTaxonAtt($self->getCla->{'restart'},$nodesHash,\$count); > #} > #else { > #$self->getTaxonAtt($rootAttArray->[0],$nodesHash,\$count); > #} > > Arnaud > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > |
From: Arnaud K. <ax...@sa...> - 2003-03-05 16:40:33
|
Hi I'm trying to run LoadTaxon plugin. Why some lines are commented out ? #my $genCodes = $self->makeGeneticCode(); my $namesDmp = $self->getNames(); #my $nodesHash = $self->makeNodesHash($genCodes); #my $rootAttArray = $self->getRootAttArray($genCodes); #$self->makeTaxonEntry($rootAttArray, \$count); #if ($self->getCla->{'restart'} && $self->getCla->{'restart'} > 1) { #$self->getTaxonAtt($self->getCla->{'restart'},$nodesHash,\$count); #} #else { #$self->getTaxonAtt($rootAttArray->[0],$nodesHash,\$count); #} Arnaud |
From: Angel P. <an...@pc...> - 2003-03-04 17:20:37
|
One other note on EasyCSP options: t Required. Specifies the data type of the argument. Allowed types are: id, float, int, date, string, boolean, table_id. "table_id"!?! I guess you can make the argument that a plugin will run within a specific DB env and that table_ids are already set, but is it good practice to allow such database instance dependent parameters? Maybe 'object_type' or 'object_name' or at the very least 'table_name' so that you can use the object layer to handle talking to the db. In short allowing a option like 'table_id' promotes use of hard-coded SQL in plugins. Not good for porting to different DBMS's Angel On Tue, 4 Mar 2003, steve fischer wrote: > folks- > > i have posted the API documentation for GUS::PluginMgr::Plugin, the > plugin superclass. > > have a look, and comments appreciated: > > http://www.gusdb.org/documentation/GUS-PluginMgr-Plugin.html > > steve > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > -- Angel Pizarro Programmer Analyst Center for Bioinformatics an...@pc... |
From: Angel P. <an...@pc...> - 2003-03-04 17:14:49
|
Just one note. For the method: className2oracleName($className) Convert a perl style class name for a database object to the form required in an SQL statement. For example, convert Core::Algorithm to core.algorithm note that schema.table names are database specific. Oracle is case-insensitive, but most other DBMS's are not. For this reason, I beleive that 'core.algorithm' should reflect the DatabaseInfo and TableInfo names. Angel On Tue, 4 Mar 2003, steve fischer wrote: > folks- > > i have posted the API documentation for GUS::PluginMgr::Plugin, the > plugin superclass. > > have a look, and comments appreciated: > > http://www.gusdb.org/documentation/GUS-PluginMgr-Plugin.html > > steve > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > -- Angel Pizarro Programmer Analyst Center for Bioinformatics an...@pc... |
From: steve f. <sfi...@pc...> - 2003-03-04 16:45:36
|
folks- i have posted the API documentation for GUS::PluginMgr::Plugin, the plugin superclass. have a look, and comments appreciated: http://www.gusdb.org/documentation/GUS-PluginMgr-Plugin.html steve |
From: Angel P. <an...@pc...> - 2003-02-28 18:57:30
|
On Fri, 28 Feb 2003, Pjm wrote: > Hi all, > > While updating LoadPfam I have come accross some interesting "things". A PFam > release has links to databases such as 'INTERPRO; IPR000308;'. The old schema > just had a link DBref ->ExternalDatabase. The new schema has a middle table to > take into account a release of database. > > My first issue is populating these tables - I found some XML for GUSdev that I > am tweaking to setup ExternalDatabase and ExternalDatabaseRelease for testing > LoadPfam. I will assume all releases for now are version one, just for testing. > When I do it proper, shall I just insert the latest release only? This really depends on the representation that your situation needs. For instance, when we represent either GenBank or dbEST, we use a "continuous" release and update the ExternalDatabaseRelease entry to reflect either the last day dbEST was imported or the last release of GenBank that was imported. DoTS build team correct me if I am wrong here. This allows us to have an alternate key on the (external_database_release_id, source_id) tuple and also a small number of ext_db_rel_id's to query for a particular type of source_id. For other databases, you may want to keep the entries distinct between releases. A good example of this would be unigene, that does not really have stable identifiers for a set of constiuent sequences (e.g. when sets split or merge, they old ID is completely lost). Another would be for handling ontologies such as the MGED Ontology, where terms and definitions may change, but you want to keep track of the changes in order to successfully migrate data from one release to the next and be able to track down deprecated terms. > > Do I need to create a small plugin to create new DB releases as needed? > Shouldn't be hard. Most times if a plugin is this simple, it is better to rely on UpdateGusFromXML to do the work for you. > > LoadPfam itself will assume any reference to a DB in the PFam file is to the > latest DB. For example, picking the last release of INTERPRO will mean getting > the youngest record by using ExternalDatabaseRelease.release_date for INTERPRO > and link a SRes.DBref to it. > Yes this works, but if you do not need multiple releases of Pfam, we may want to consider the continuous release route. DoTS build team comments? > How does this sound? > > Have a good weekend, > Paul. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > -- Angel Pizarro Programmer Analyst Center for Bioinformatics an...@pc... |
From: Pjm <pj...@sa...> - 2003-02-28 18:36:56
|
Hi all, While updating LoadPfam I have come accross some interesting "things". A PFam release has links to databases such as 'INTERPRO; IPR000308;'. The old schema just had a link DBref ->ExternalDatabase. The new schema has a middle table to take into account a release of database. My first issue is populating these tables - I found some XML for GUSdev that I am tweaking to setup ExternalDatabase and ExternalDatabaseRelease for testing LoadPfam. I will assume all releases for now are version one, just for testing. When I do it proper, shall I just insert the latest release only? Do I need to create a small plugin to create new DB releases as needed? Shouldn't be hard. LoadPfam itself will assume any reference to a DB in the PFam file is to the latest DB. For example, picking the last release of INTERPRO will mean getting the youngest record by using ExternalDatabaseRelease.release_date for INTERPRO and link a SRes.DBref to it. How does this sound? Have a good weekend, Paul. |
From: pjm <pj...@sa...> - 2003-02-27 09:37:59
|
thanks Steve. On our system we have gmd5sum which is part of the GNU toolset (I've been told :) Another developer mentioned a pure Perl implementation if dependancies become a problem; http://search.cpan.org/author/DELTA/Digest-Perl-MD5-1.5/lib/Digest/Perl/MD5.pm though it is a lot slower. cheers, Paul. steve fischer wrote: > > folks- > > paul at PSU discovered that ga had a hard-coded assumption about the > location of the md5sum program (used for check summing). > > i have added a new configuration file: GUS-PluginMgr.prop which has a > property 'md5sum' to specify this. > > paul- > > cd $PROJECT_HOME/GUS/PluginMgr > cvs -d update [should bring in the new > $PROJECT_HOME/GUS/PluginMgr/config dir] > build GUS/PluginMgr install -append > ... edit the file $GUS_HOME/config/GUS-PluginMgr.prop (copy the sample > to start out with) > ga +meta --commit > > steve > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! > Can't afford IT training? All 2003 ictp students receive scholarships. > Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. > www.ictp.com/training/sourceforge.asp > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev |
From: steve f. <sfi...@pc...> - 2003-02-26 21:32:43
|
folks- paul at PSU discovered that ga had a hard-coded assumption about the location of the md5sum program (used for check summing). i have added a new configuration file: GUS-PluginMgr.prop which has a property 'md5sum' to specify this. paul- cd $PROJECT_HOME/GUS/PluginMgr cvs -d update [should bring in the new $PROJECT_HOME/GUS/PluginMgr/config dir] build GUS/PluginMgr install -append ... edit the file $GUS_HOME/config/GUS-PluginMgr.prop (copy the sample to start out with) ga +meta --commit steve |
From: steve f. <sfi...@pc...> - 2003-02-25 16:13:21
|
paul- do a cvs update of $PROJECT_HOME/GUS i have finalized the upgrading of the plugin api to improve exception handling and logging, and some other minor cleanup. these methods will be defined now. the completion of the api was the first step towards the big project of documenting how to write plugins, which i will now start on. steve pjm wrote: >Hi Steve, > >At line 353 of GusApplication.pm (in CVS anyway) the call to >'$M->initArgs($cla);' doesn't work because the subroutine hasn't been defined >anywhere for it; > >pcs2b[pjm]96: ga GUS::Common::Plugin::LoadPfam >Can't locate object method "initArgs" via package >"GUS::PluginMgr::GusApplication" (perhaps you forgot to load >"GUS::PluginMgr::GusApplication"?) at >/nfs/team81/pjm/GUS/lib/perl/GUS/PluginMgr/GusApplication.pm line 353. > >Anyhow, I commented on the offending line to see if I could move on but found >the subroutine getArgs() isn't defined anywhere; > >pcs2b[pjm]100: ga GUS::Common::Plugin::LoadPfam >Can't locate object method "getArgs" via package >"GUS::PluginMgr::GusApplication" (perhaps you forgot to load >"GUS::PluginMgr::GusApplication"?) at >/nfs/team81/pjm/GUS/lib/perl/GUS/PluginMgr/GusApplication.pm line 244. > >Does some code need to be commited to cvs? > >Paul. > >steve fischer wrote: > > >>yes, jonathan, you should add these to the db create process, and you >>sanger guys should add em to your db for now. >> >>the values we have so far are: >> >>id >>date >>float >>int >>string >>boolean >>table_id >> >>steve >> >>Jonathan Crabtree wrote: >> >> >> >>>Arnaud- >>> >>>On Mon, 24 Feb 2003, Arnaud Kerhornou wrote: >>> >>> >>> >>> >>>>>when doing a `ga +create GUS::Common::Plugin::LoadPfam --commit` >>>>>it complained because my plugin did not match anything from >>>>>AlgorithmParamKeyType table. This was because it ws empty. >>>>> >>>>> >>>>> >>>>> >>>>I think I deleted them, sorry!! Can anyone confirm that they are >>>>generated during the build process ? >>>> >>>> >>>> >>>> >>>They're definitely not included in the create database scripts, which is >>>where they probably belong (or at least it's one option.) I don't believe >>>that either the build process or the 'ga +meta' command creates them >>>either, but I'm not sure about that; Steve or Jonathan S. should know. >>> >>>Jonathan >>> >>> >>> >>> >>>------------------------------------------------------- >>>This sf.net email is sponsored by:ThinkGeek >>>Welcome to geek heaven. >>>http://thinkgeek.com/sf >>>_______________________________________________ >>>Gusdev-gusdev mailing list >>>Gus...@li... >>>https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev >>> >>> >>> >>> >>> >>> >>------------------------------------------------------- >>This sf.net email is sponsored by:ThinkGeek >>Welcome to geek heaven. >>http://thinkgeek.com/sf >>_______________________________________________ >>Gusdev-gusdev mailing list >>Gus...@li... >>https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev >> >> > > > > |
From: Jonathan C. <cra...@pc...> - 2003-02-25 15:44:31
|
steve fischer wrote: > yes, jonathan, you should add these to the db create process, and you > sanger guys should add em to your db for now. > > the values we have so far are: > > id > date > float > int > string > boolean > table_id I've created the missing file, GUS/Model/schema/oracle/core-AlgorithmParamKeyType-rows.sql and checked it into CVS; just run the insert commands in the file to create the missing rows. Jonathan |
From: pjm <pj...@sa...> - 2003-02-25 15:41:13
|
Hi Steve, At line 353 of GusApplication.pm (in CVS anyway) the call to '$M->initArgs($cla);' doesn't work because the subroutine hasn't been defined anywhere for it; pcs2b[pjm]96: ga GUS::Common::Plugin::LoadPfam Can't locate object method "initArgs" via package "GUS::PluginMgr::GusApplication" (perhaps you forgot to load "GUS::PluginMgr::GusApplication"?) at /nfs/team81/pjm/GUS/lib/perl/GUS/PluginMgr/GusApplication.pm line 353. Anyhow, I commented on the offending line to see if I could move on but found the subroutine getArgs() isn't defined anywhere; pcs2b[pjm]100: ga GUS::Common::Plugin::LoadPfam Can't locate object method "getArgs" via package "GUS::PluginMgr::GusApplication" (perhaps you forgot to load "GUS::PluginMgr::GusApplication"?) at /nfs/team81/pjm/GUS/lib/perl/GUS/PluginMgr/GusApplication.pm line 244. Does some code need to be commited to cvs? Paul. steve fischer wrote: > > yes, jonathan, you should add these to the db create process, and you > sanger guys should add em to your db for now. > > the values we have so far are: > > id > date > float > int > string > boolean > table_id > > steve > > Jonathan Crabtree wrote: > > >Arnaud- > > > >On Mon, 24 Feb 2003, Arnaud Kerhornou wrote: > > > > > >>>when doing a `ga +create GUS::Common::Plugin::LoadPfam --commit` > >>>it complained because my plugin did not match anything from > >>>AlgorithmParamKeyType table. This was because it ws empty. > >>> > >>> > >>I think I deleted them, sorry!! Can anyone confirm that they are > >>generated during the build process ? > >> > >> > > > >They're definitely not included in the create database scripts, which is > >where they probably belong (or at least it's one option.) I don't believe > >that either the build process or the 'ga +meta' command creates them > >either, but I'm not sure about that; Steve or Jonathan S. should know. > > > >Jonathan > > > > > > > > > >------------------------------------------------------- > >This sf.net email is sponsored by:ThinkGeek > >Welcome to geek heaven. > >http://thinkgeek.com/sf > >_______________________________________________ > >Gusdev-gusdev mailing list > >Gus...@li... > >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev |
From: Jonathan C. <cra...@pc...> - 2003-02-25 15:36:34
|
Paul- pjm wrote: > I did a; > alter table AlgorithmParamKey MODIFY description VARCHAR2(512); > > on our DB to get the original command line description in. Unless otherwise told > I will alter the number in the original table creation script and cvs commit it. OK, I've made the same change on our database, and I've added an item to the appropriate SourceForge tracker to remind myself to include this change in the schema migration scripts. Jonathan -- Jonathan Crabtree Center for Bioinformatics, University of Pennsylvania 1406 Blockley Hall, 423 Guardian Drive Philadelphia, PA 19104-6021 215-573-3115 |
From: steve f. <sfi...@pc...> - 2003-02-25 14:33:38
|
yes, jonathan, you should add these to the db create process, and you sanger guys should add em to your db for now. the values we have so far are: id date float int string boolean table_id steve Jonathan Crabtree wrote: >Arnaud- > >On Mon, 24 Feb 2003, Arnaud Kerhornou wrote: > > >>>when doing a `ga +create GUS::Common::Plugin::LoadPfam --commit` >>>it complained because my plugin did not match anything from >>>AlgorithmParamKeyType table. This was because it ws empty. >>> >>> >>I think I deleted them, sorry!! Can anyone confirm that they are >>generated during the build process ? >> >> > >They're definitely not included in the create database scripts, which is >where they probably belong (or at least it's one option.) I don't believe >that either the build process or the 'ga +meta' command creates them >either, but I'm not sure about that; Steve or Jonathan S. should know. > >Jonathan > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Gusdev-gusdev mailing list >Gus...@li... >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > > > |
From: steve f. <sfi...@pc...> - 2003-02-25 14:20:59
|
paul- i'll only address the second question. i believe you have stumbled here on a known weakness in the Plugin API. (i am in the process of improving the api, and will put this on the list). the 'integer' of integer_value i suspect is coming from your plugin's easyCspOptions declared in its initialize method. one or more of your arg declarations is specifying its type as 'integer' while the allowed value is actually 'int'. i will add to the plugin manager a check of all such types to ensure that they are within the controlled vocab for allowed types. my $easycsp = [{ h => 'if true then update the row with new modification data and algorithmInvocation regardless if has changed from the database', t => 'int', MUST BE 'int' NOT 'integer' (obvious, no?) o => 'refresh', }, steve pjm wrote: >Morning, > >I did a; > alter table AlgorithmParamKey MODIFY description VARCHAR2(512); > >on our DB to get the original command line description in. Unless otherwise told >I will alter the number in the original table creation script and cvs commit it. > >Also, the GusApplication code wants to lookup 'algoinvo' which it knows should >be type integer. >Looking for this value in AlgorithmParam I get the following error; > > >ERROR: attempting to access attribute 'integer_value' of table AlgorithmParam, >but that table does not have such an attribute > > >The field name is int_value. Which should I change? > >Paul. > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Gusdev-gusdev mailing list >Gus...@li... >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > > > |
From: Jonathan C. <cra...@sn...> - 2003-02-25 13:57:38
|
Arnaud- On Mon, 24 Feb 2003, Arnaud Kerhornou wrote: > > when doing a `ga +create GUS::Common::Plugin::LoadPfam --commit` > > it complained because my plugin did not match anything from > > AlgorithmParamKeyType table. This was because it ws empty. > > I think I deleted them, sorry!! Can anyone confirm that they are > generated during the build process ? They're definitely not included in the create database scripts, which is where they probably belong (or at least it's one option.) I don't believe that either the build process or the 'ga +meta' command creates them either, but I'm not sure about that; Steve or Jonathan S. should know. Jonathan |
From: Jonathan C. <cra...@sn...> - 2003-02-25 13:55:28
|
Paul- > when doing a `ga +create GUS::Common::Plugin::LoadPfam --commit` > it complained because my plugin did not match anything from > AlgorithmParamKeyType table. This was because it ws empty. > > Finding this in the code; > > $RV = { 'str' => 0, > 'flo' => 1, > 'int' => 2, > 'ref' => 3, > 'boo' => 4, > > I did this; > > insert into AlgorithmParamKeyType > VALUES (0, 'string',sysdate, 1,1,1,1,1,1,1,1,1,1); > insert into AlgorithmParamKeyType > VALUES (1, 'float',sysdate, 1,1,1,1,1,1,1,1,1,1); > insert into AlgorithmParamKeyType > VALUES (2, 'integer',sysdate, 1,1,1,1,1,1,1,1,1,1); > insert into AlgorithmParamKeyType > VALUES (3, 'ref',sysdate, 1,1,1,1,1,1,1,1,1,1); > insert into AlgorithmParamKeyType > VALUES (4, 'boolean',sysdate, 1,1,1,1,1,1,1,1,1,1); This definitely looks like an omission on my part; I'll look into it and add a file to the schema create scripts if necessary. > After doing this I found the original string in ImportPfam describing the flat > file argument was too big! AlgorithmParamKey.DESCRIPTION > > h => ("Flat file containing the release of Pfam to load. Expects\n" . > "\t\t\tthe file containing the annotation and full alignments in Pfam\n" . > "\t\t\tformat of all Pfam-A families (called \"Pfam-A.full\" in release > 5.2)\n" . > "\t\t\tThe specified file may be in gzip (.gz) or compressed (.Z) format."), > > This string is 280 characters! Does anyone mind if I change the length to 512 > and do a cvs commit? Hmm, I don't know when this column would have been shortened, but yes, we can definitely make it larger. The only thing to remember is that whenever the schema is modified we also have to modify the appropriate migration script (in this case the 3.0 -> 3.1 migration script.) I haven't created these yet, but will get to it shortly. So for now just make sure that you let me know if you've made a schema change so that I can include it in the script. The way I've been keeping track of this so far is by creating items in the SourceForge schema (change request) tracker; I'll assign them to myself and make the changes but then I'll have a record of what I've done and why that I can then transfer into the schema change log. Jonathan |
From: Jonathan C. <cra...@sn...> - 2003-02-25 13:49:41
|
Paul- On Fri, 21 Feb 2003, pjm wrote: > I tried your instructions and did a: `ga +meta --commit` > Arnaud has setup the DB so maybe he knows why - I needed to create a record in > the MACHINE table so I created the following SQL; > > INSERT INTO MACHINE > (MACHINE_ID, > NAME, > CPUS, > MEMORY, > MODIFICATION_DATE, > USER_READ, > USER_WRITE, > GROUP_READ, > GROUP_WRITE, > OTHER_READ, > OTHER_WRITE, > ROW_USER_ID, > ROW_GROUP_ID, > ROW_PROJECT_ID, > ROW_ALG_INVOCATION_ID) > VALUES (0, 'Fake_machine', 1, 1, SYSDATE, 1,1,1,1,1,1,1,1,1,1); > > If this is useful I can create a new file called; > GUS/Model/schema/oracle/core-machine-row.sql > or something. If I shouldn't, please let me know :) > Anyway, creating this record made the `ga +meta --commit` work. I think we should just make the machine_id column nullable in core.AlgorithmInvocation; I noticed this problem with the reference to core.Machine a few weeks ago and I thought I'd changed the schema before putting it in CVS, but apparently not. This will go into the next release, and I'll start putting together the migration script today, since quite a few schema changes have been made since the initial 3.0 release. Jonathan |
From: Jonathan C. <cra...@sn...> - 2003-02-25 13:45:00
|
Paul- On Fri, 21 Feb 2003, pjm wrote: > Steve, Jonathan, > > Are there any plans to make DB specific code compartmentized? I know some SQL is > bound to be DB specific for performance or specific feature. Just wondered as > we'd love to give away GeneDB (and hence GUS) so others can have their own > installation. I guess you would too since you already have given it away :) Yes, we definitely want to separate the dbms-specific code from the rest in a clean and understandable way. However, we're definitely not there yet. When we made the switch from Sybase to Oracle a couple of years ago we did a fairly good job of isolating the dbms-specific code, at least in the Perl object layer, which is where most of it appears. But since then there's no question that we've been careless in allowing dbms-specific code to creep back in, and there's also the related issue that when *new* dbms-specific code was required, we would implement it only for Oracle, not for both Oracle and Sybase. Anyway, the short answer is that our eventual plan is to be able to support at least one other DBMS in addition to Oracle, and we're planning to do this for either MySQL or PostgreSQL, since both are open source and freely available. Jonathan |
From: pjm <pj...@sa...> - 2003-02-25 12:43:57
|
Morning, I did a; alter table AlgorithmParamKey MODIFY description VARCHAR2(512); on our DB to get the original command line description in. Unless otherwise told I will alter the number in the original table creation script and cvs commit it. Also, the GusApplication code wants to lookup 'algoinvo' which it knows should be type integer. Looking for this value in AlgorithmParam I get the following error; ERROR: attempting to access attribute 'integer_value' of table AlgorithmParam, but that table does not have such an attribute The field name is int_value. Which should I change? Paul. |
From: Jonathan C. <cra...@pc...> - 2003-02-24 21:51:29
|
Hi Chetna- Chetna Warade wrote: > I understand that in gus2.0 there is a single schema/user "gusdev" which > contains all tables but in 3.0 there are 5 users/schema (core,dots,tess > ..) Who is this single user (read+write both) sitting in .gus.properties. These are both additional users that aren't created by the schema install scripts. I didn't include them originally because I thought that different sites might have different requirements in terms of granting update/read privileges. However, given that the install process requires an account with read-only privileges on all of the 5 GUS schemas, I should probably include this in the next release. There are some details to be worked out, however. For generating the objects, you have 2 choices right now: 1. Create a new user and use the script $GUS_HOME/bin/grantPermissions.pl to grant it SELECT permissions on all 5 schemas. 2. Use a user with DBA privileges to create the objects, since such a user will be able to see all of the tables, views, etc. > Also I need your help (syntax types - I think I will have to give grant > permissions to this user explicitly) for creating such two users. > Basically one user with read+write permissions on all users/schema's > tables and one user with read only permissions on all the user/schema's > tables. Yes, if you'd like to go this route then you can use the grantPermissions.pl script to grant the permissions. Did you see my earlier e-mail where I was talking about the usage of this script? In any case, if you run it without any arguments it should give you a usage summary, and you can also look at the examples in create-db.sh (in the Oracle schema directory) to see how it works. Let me know if you have any questions; I'll document this more thoroughly in the schema install documentation, which I hope to finish tonight. Jonathan -- Jonathan Crabtree Center for Bioinformatics, University of Pennsylvania 1406 Blockley Hall, 423 Guardian Drive Philadelphia, PA 19104-6021 215-573-3115 |
From: Chetna W. <ch...@ar...> - 2003-02-24 18:10:54
|
Hi, I trying to figure the directory structure that I need to maintain for gus 3.0 perl object layer. I have downloaded the latest GUS tar from sanger cvs. Basically I am looking for plugin installation instruction. Let me know if I am wrong. Chetna |
From: Arnaud K. <ax...@sa...> - 2003-02-24 16:51:18
|
Pjm wrote: > Steve, Jonathan, > > when doing a `ga +create GUS::Common::Plugin::LoadPfam --commit` > it complained because my plugin did not match anything from > AlgorithmParamKeyType table. This was because it ws empty. I think I deleted them, sorry!! Can anyone confirm that they are generated during the build process ? Arnaud > > Finding this in the code; > > $RV = { 'str' => 0, > 'flo' => 1, > 'int' => 2, > 'ref' => 3, > 'boo' => 4, > > I did this; > > insert into AlgorithmParamKeyType > VALUES (0, 'string',sysdate, 1,1,1,1,1,1,1,1,1,1); > insert into AlgorithmParamKeyType > VALUES (1, 'float',sysdate, 1,1,1,1,1,1,1,1,1,1); > insert into AlgorithmParamKeyType > VALUES (2, 'integer',sysdate, 1,1,1,1,1,1,1,1,1,1); > insert into AlgorithmParamKeyType > VALUES (3, 'ref',sysdate, 1,1,1,1,1,1,1,1,1,1); > insert into AlgorithmParamKeyType > VALUES (4, 'boolean',sysdate, 1,1,1,1,1,1,1,1,1,1); > > After doing this I found the original string in ImportPfam describing > the flat file argument was too big! AlgorithmParamKey.DESCRIPTION > > h => ("Flat file containing the release of Pfam to load. Expects\n" . > "\t\t\tthe file containing the annotation and full alignments in > Pfam\n" . > "\t\t\tformat of all Pfam-A families (called \"Pfam-A.full\" in > release 5.2)\n" . > "\t\t\tThe specified file may be in gzip (.gz) or compressed > (.Z) format."), > > This string is 280 characters! Does anyone mind if I change the length > to 512 and do a cvs commit? > > > Also, could you pass this on to debbie please, although she may > already know? > > make step 2 of the conversion guide to include; > > "@ISA = qw(GUS::PluginMgr::Plugin); #defines what is inherited" > > > Paul. > > > steve fischer wrote: > >> yes, gus 3.0. >> >> can we set a time for tuesday? i think an hour will more than do it. >> we are 5 hours behind you. i get in around 10:30. >> >> meanwhile, i have attached debbie's notes on how to convert a plugin, >> and a canonical plugin so you can get a start. >> >> steve >> >> pjm wrote: >> >>> steve fischer wrote: >>> >>> >>>> paul- >>>> >>>> finally got the GUS grant out the door. >>>> >>>> still waiting for James Cuff to move the gus cvs to sanger. i sent it >>>> to him more than a week ago. i just reminded him again today. >>>> >>>> so, early next week will be a good time to go over the plugin stuff. >>>> >>>> i have a meeting monday morning, so maybe tuesday? >>>> >>>> steve >>>> >>> >>> >>> >>> Tuesday will be good. I have a couple of smaller jobs to do but we >>> are all keen >>> to get hacking, err, writing code for GUS30! >>> >>> I take it you mean you sent a GUS30 tar ball to James? >>> >>> >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> 1) Give the package name a complete path e.g.package >> DoTS::DotsBuild::Plugin::ExtractAndBlockAssemblySequences; >> >> 2) Give all of our 'use' objects full paths >> e.g.use GUS::Model::DoTS::AssemblySequence; >> use CBIL::Bio::SequenceUtils; >> >> 3) Change 'sub new' >> a. Copy new from template: >> >> sub new { >> my $Class = shift; >> my $self = {}; >> bless($self,$class); >> my $usage = 'Extract unprocessed AssembySequences........'; >> my $easycsp = >> [ >> {o => 'testnumber', >> t => 'int', >> h => 'number of iterations for testing', >> }]; >> $self->initialize({requiredDbVersion => {}, >> cvsRevision => '$Revision: 1.6 $', # cvs fills this in! >> cvsTag => '$Name: $', # cvs fills this in! >> name => ref($m), >> revisionNotes => 'make consistent with GUS 3.0', >> easyCspOptions => $easycsp, >> usage => $usage >> }); >> return $self; >> } >> b. Replace usage string with string in original usage sub, delete >> usage sub >> >> c. replace easycsp hashes with original EasyCspOptions hash, >> delete keys and conform to above model >> >> 4) put $self = shift at beginning of all subs >> 5) call all subs with $self->subname (search for & and replace with >> $self->) >> >> 6) replace $ctx->{cla}-> with $self->getCla >> >> 7) replace $ctx->{'self_inv'}->getQueryHandle with $self->getQueryHandle >> >> 8) use $self->getQueryHandle instead of passing a database handle or >> using a global database handle >> >> 9) avoid use DBI or DbiDatabase >> >> 10) search for 'new' (instantiating new database objects) and add the >> full path for objects e.g. GUS::Model::DoTS::AssemblySequence-> >> new( { 'assembly_sequence_id' => $id } ); >> >> 11) use $self->undefPointerCache instead of newObject->undefPointerCache >> >> 12) substitute 'sub run' for 'sub Run' >> >> >> ------------------------------------------------------------------------ >> >> package GUS::Common::Plugin::UpdateGusFromXML; >> >> @ISA = qw(GUS::PluginMgr::Plugin); >> use strict; >> >> use FileHandle; >> >> # ---------------------------------------------------------------------- >> # create and initalize new plugin instance. >> >> sub new { >> my ($class) = @_; >> >> my $self = {}; >> bless($self, $class); >> >> my $usage = 'update GUS from an XML file. ("// on newline delimits >> submits)'; >> >> my $easycsp = >> [ >> { h => 'if true then will update the row with new modification >> data and algorithmInvocation regardless if has changed from the >> database', >> t => 'boolean', >> o => 'refresh', >> }, >> { h => 'name of file containing XML', >> t => 'string', >> d => '-', >> o => 'filename', >> }, >> ]; >> >> $self->initialize({requiredDbVersion => {}, >> cvsRevision => '$Revision: 1.8 $', # cvs fills this in! >> cvsTag => '$Name: $', # cvs fills this in! >> name => ref($self), >> revisionNotes => 'make consistent with GUS 3.0', >> easyCspOptions => $easycsp, >> usage => $usage >> }); >> >> return $self; >> } >> >> # ---------------------------------------------------------------------- >> # plugin-global variables. >> >> my $countObjs = 0; >> my $countUpdates = 0; >> >> # ---------------------------------------------------------------------- >> # run method to do the work >> >> sub run { >> my $self = shift; >> >> my $RV; >> >> my $fh = FileHandle->new('<'.$self->getCla->{'filename'}); >> if ($fh) { >> >> $self->logAlert('COMMIT', $self->getCla->{commit} ? 'ON' : 'OFF' ); >> >> ##testing exitOnFailure... >> $self->getDb()->setExitOnSQLFailure(0); >> >> # process XML file. >> my @xml; >> while (<$fh>) { >> if (/^\/\/\s*$/) { ##"//" on a newline defines entry >> $self->process(\@xml) if scalar(@xml) > 1; ##must be at least 3 >> actually to be valid... >> undef @xml; ##reset for the new one... >> } else { >> push(@xml,$_); >> } >> } >> $self->process(\@xml) if scalar(@xml) > 1; ##must be at least 3 >> actually to be valid... >> $fh->close; >> >> # create, log, and return result string. >> $RV = join(' ', >> "processed $countObjs objects, inserted", >> $self->getSelfInv->getTotalInserts(), >> 'and updated', >> $self->getSelfInv->getTotalUpdates() || 0, >> ); >> } >> >> # no file. >> else { >> $RV = join(' ', >> 'a valid --filename <filename> must be on the commandline', >> $self->getCla->{filename}, >> $!); >> } >> >> $self->logAlert('RESULT', $RV); >> return $RV; >> } >> >> # ---------------------------------------------------------------------- >> # do the real work. >> sub process { >> my $self = shift; >> my($xml) = @_; >> >> $self->getSelfInv->parseXML($xml); >> $self->countChangedObjs($self->getSelfInv); >> >> ##now submit the sucker... >> ##must first remove invocation parent before submitting immediate >> children >> $self->getSelfInv->manageTransaction(undef,'begin'); >> foreach my $c ($self->getSelfInv->getAllChildren()) { >> $c->removeParent($self->getSelfInv); >> $c->submit(undef,1); >> $c->setParent($self->getSelfInv); ##add back so can see at the end... >> } >> $self->getSelfInv->manageTransaction(undef,'commit'); >> if (!$self->getCla->{commit}) { >> $self->logAlert('ERROR', "XML that was not committed to the >> database\n\n"); >> foreach my $c ($self->getSelfInv->getAllChildren()) { >> $self->logAlert('BAD-XML', $c->toXML()); >> } >> } >> $self->getSelfInv->removeAllChildren(); >> $self->getSelfInv->undefPointerCache(); >> } >> >> sub countChangedObjs { >> my $self = shift; >> my($par) = @_; >> >> foreach my $c ($par->getAllChildren()) { >> $self->logAlert('DEBUG', >> "Checking to see if has changed attributes\n".$c->toXML()) if >> $self->getCla->{debug}; >> $countObjs++; >> $countUpdates++; >> if (!$self->getCla->{refresh} && !$c->hasChangedAttributes()) { >> $self->logAlert('DEBUG','There are no changed attributes') if >> $self->getCla->{debug}; >> $countUpdates--; >> } >> $self->countChangedObjs($c); >> } >> } >> >> 1; >> > > |
From: Pjm <pj...@sa...> - 2003-02-24 16:39:45
|
Steve, Jonathan, when doing a `ga +create GUS::Common::Plugin::LoadPfam --commit` it complained because my plugin did not match anything from AlgorithmParamKeyType table. This was because it ws empty. Finding this in the code; $RV = { 'str' => 0, 'flo' => 1, 'int' => 2, 'ref' => 3, 'boo' => 4, I did this; insert into AlgorithmParamKeyType VALUES (0, 'string',sysdate, 1,1,1,1,1,1,1,1,1,1); insert into AlgorithmParamKeyType VALUES (1, 'float',sysdate, 1,1,1,1,1,1,1,1,1,1); insert into AlgorithmParamKeyType VALUES (2, 'integer',sysdate, 1,1,1,1,1,1,1,1,1,1); insert into AlgorithmParamKeyType VALUES (3, 'ref',sysdate, 1,1,1,1,1,1,1,1,1,1); insert into AlgorithmParamKeyType VALUES (4, 'boolean',sysdate, 1,1,1,1,1,1,1,1,1,1); After doing this I found the original string in ImportPfam describing the flat file argument was too big! AlgorithmParamKey.DESCRIPTION h => ("Flat file containing the release of Pfam to load. Expects\n" . "\t\t\tthe file containing the annotation and full alignments in Pfam\n" . "\t\t\tformat of all Pfam-A families (called \"Pfam-A.full\" in release 5.2)\n" . "\t\t\tThe specified file may be in gzip (.gz) or compressed (.Z) format."), This string is 280 characters! Does anyone mind if I change the length to 512 and do a cvs commit? Also, could you pass this on to debbie please, although she may already know? make step 2 of the conversion guide to include; "@ISA = qw(GUS::PluginMgr::Plugin); #defines what is inherited" Paul. steve fischer wrote: > yes, gus 3.0. > > can we set a time for tuesday? i think an hour will more than do it. > we are 5 hours behind you. i get in around 10:30. > > meanwhile, i have attached debbie's notes on how to convert a plugin, > and a canonical plugin so you can get a start. > > steve > > pjm wrote: > >> steve fischer wrote: >> >> >>> paul- >>> >>> finally got the GUS grant out the door. >>> >>> still waiting for James Cuff to move the gus cvs to sanger. i sent it >>> to him more than a week ago. i just reminded him again today. >>> >>> so, early next week will be a good time to go over the plugin stuff. >>> >>> i have a meeting monday morning, so maybe tuesday? >>> >>> steve >>> >> >> >> Tuesday will be good. I have a couple of smaller jobs to do but we are >> all keen >> to get hacking, err, writing code for GUS30! >> >> I take it you mean you sent a GUS30 tar ball to James? >> >> >> >> > > > ------------------------------------------------------------------------ > > 1) Give the package name a complete path > e.g.package DoTS::DotsBuild::Plugin::ExtractAndBlockAssemblySequences; > > 2) Give all of our 'use' objects full paths > e.g.use GUS::Model::DoTS::AssemblySequence; > use CBIL::Bio::SequenceUtils; > > 3) Change 'sub new' > a. Copy new from template: > > sub new { > my $Class = shift; > my $self = {}; > bless($self,$class); > my $usage = 'Extract unprocessed AssembySequences........'; > my $easycsp = > [ > {o => 'testnumber', > t => 'int', > h => 'number of iterations for testing', > }]; > $self->initialize({requiredDbVersion => {}, > cvsRevision => '$Revision: 1.6 $', # cvs fills this in! > cvsTag => '$Name: $', # cvs fills this in! > name => ref($m), > revisionNotes => 'make consistent with GUS 3.0', > easyCspOptions => $easycsp, > usage => $usage > }); > return $self; > } > b. Replace usage string with string in original usage sub, delete usage sub > > c. replace easycsp hashes with original EasyCspOptions hash, delete keys > and conform to above model > > 4) put $self = shift at beginning of all subs > > 5) call all subs with $self->subname (search for & and replace with $self->) > > 6) replace $ctx->{cla}-> with $self->getCla > > 7) replace $ctx->{'self_inv'}->getQueryHandle with $self->getQueryHandle > > 8) use $self->getQueryHandle instead of passing a database handle or using a > global database handle > > 9) avoid use DBI or DbiDatabase > > 10) search for 'new' (instantiating new database objects) and add the full > path for objects e.g. GUS::Model::DoTS::AssemblySequence-> > new( { 'assembly_sequence_id' => $id } ); > > 11) use $self->undefPointerCache instead of newObject->undefPointerCache > > 12) substitute 'sub run' for 'sub Run' > > > ------------------------------------------------------------------------ > > package GUS::Common::Plugin::UpdateGusFromXML; > > @ISA = qw(GUS::PluginMgr::Plugin); > use strict; > > use FileHandle; > > # ---------------------------------------------------------------------- > # create and initalize new plugin instance. > > sub new { > my ($class) = @_; > > my $self = {}; > bless($self, $class); > > my $usage = 'update GUS from an XML file. ("// on newline delimits submits)'; > > my $easycsp = > [ > { h => 'if true then will update the row with new modification data and algorithmInvocation regardless if has changed from the database', > t => 'boolean', > o => 'refresh', > }, > { h => 'name of file containing XML', > t => 'string', > d => '-', > o => 'filename', > }, > ]; > > $self->initialize({requiredDbVersion => {}, > cvsRevision => '$Revision: 1.8 $', # cvs fills this in! > cvsTag => '$Name: $', # cvs fills this in! > name => ref($self), > revisionNotes => 'make consistent with GUS 3.0', > easyCspOptions => $easycsp, > usage => $usage > }); > > return $self; > } > > # ---------------------------------------------------------------------- > # plugin-global variables. > > my $countObjs = 0; > my $countUpdates = 0; > > # ---------------------------------------------------------------------- > # run method to do the work > > sub run { > my $self = shift; > > my $RV; > > my $fh = FileHandle->new('<'.$self->getCla->{'filename'}); > if ($fh) { > > $self->logAlert('COMMIT', $self->getCla->{commit} ? 'ON' : 'OFF' ); > > ##testing exitOnFailure... > $self->getDb()->setExitOnSQLFailure(0); > > # process XML file. > my @xml; > while (<$fh>) { > if (/^\/\/\s*$/) { ##"//" on a newline defines entry > $self->process(\@xml) if scalar(@xml) > 1; ##must be at least 3 actually to be valid... > undef @xml; ##reset for the new one... > } else { > push(@xml,$_); > } > } > $self->process(\@xml) if scalar(@xml) > 1; ##must be at least 3 actually to be valid... > $fh->close; > > # create, log, and return result string. > $RV = join(' ', > "processed $countObjs objects, inserted", > $self->getSelfInv->getTotalInserts(), > 'and updated', > $self->getSelfInv->getTotalUpdates() || 0, > ); > } > > # no file. > else { > $RV = join(' ', > 'a valid --filename <filename> must be on the commandline', > $self->getCla->{filename}, > $!); > } > > $self->logAlert('RESULT', $RV); > return $RV; > } > > # ---------------------------------------------------------------------- > # do the real work. > sub process { > my $self = shift; > my($xml) = @_; > > $self->getSelfInv->parseXML($xml); > $self->countChangedObjs($self->getSelfInv); > > ##now submit the sucker... > ##must first remove invocation parent before submitting immediate children > $self->getSelfInv->manageTransaction(undef,'begin'); > foreach my $c ($self->getSelfInv->getAllChildren()) { > $c->removeParent($self->getSelfInv); > $c->submit(undef,1); > $c->setParent($self->getSelfInv); ##add back so can see at the end... > } > $self->getSelfInv->manageTransaction(undef,'commit'); > if (!$self->getCla->{commit}) { > $self->logAlert('ERROR', "XML that was not committed to the database\n\n"); > foreach my $c ($self->getSelfInv->getAllChildren()) { > $self->logAlert('BAD-XML', $c->toXML()); > } > } > $self->getSelfInv->removeAllChildren(); > $self->getSelfInv->undefPointerCache(); > } > > sub countChangedObjs { > my $self = shift; > my($par) = @_; > > foreach my $c ($par->getAllChildren()) { > $self->logAlert('DEBUG', > "Checking to see if has changed attributes\n".$c->toXML()) if $self->getCla->{debug}; > $countObjs++; > $countUpdates++; > if (!$self->getCla->{refresh} && !$c->hasChangedAttributes()) { > $self->logAlert('DEBUG','There are no changed attributes') if $self->getCla->{debug}; > $countUpdates--; > } > $self->countChangedObjs($c); > } > } > > 1; > |