From: Steve F. <st...@pc...> - 2004-06-17 16:06:17
|
michael- would you consider putting this on the gus wiki? steve Michael Luchtan wrote: >Here you go: >We wanted to enter new data into GUS. Mass Spec data. This required >the use of a plug-in that was provided by Martin Fraunholz. The plugin >needed two perl modules that we did not have. DoTS::MassSpecSummary and >DoTS::MassSpecFeature. These are plug-ins of the type that are >automatically generated by a gus install with regards to the tables that >are in the GUS schema > >We did not have these modules in our $GUS_HOME/lib/perl/GUS/Model/DoTS/ >directory, because we did not have these tables in our schema. >Obviously >this required us to update our gus installation. > >So this is what we did: >1. Create the tables > * Very important to add the primary key constraints >2. Add the tables description to Core.TableInfo > * Very important to describe correctly the table for perl objects >automatic generation >3. Download GUS from CVS >4. Build > * If the build resets all sequences to 1, we have a clue on how to >fix them. > >Describing the steps in detail: > >1. Create the tables: >If the table that you want to create has been incorporated into later >versions of GUS, then chances are you can find the sql to create the >table somewhere in the latest version of GUS from CVS. > >Look in >$PROJECT_HOME/GUS/Model/schema/oracle/ >There are 6 types of files containing the sql commands for each schema. >For example, for DoTS schema: > dots-constraints.sql > dots-indexes.sql > dots-pkey-constraints.sql > dots-sequences.sql > dots-tables.sql > dots-views.sql > >- Create table commands > >create table dots.massspecsummary( > mass_spec_summary_id number(12) not null, > aa_sequence_id number(12) not null, > prediction_algorithm_id number(12) not null, > external_database_release_id number(12) null, > developmental_stage varchar2(20) not null, > is_expressed number(1) not null, > number_of_spans number(12) not null, > sequence_count number(12) not null, > spectrum_count number(12) not null, > aa_seq_percent_covered float(22) not null, > aa_seq_length number(12) not null, > aa_seq_molecular_weight number(12) not null, > aa_seq_pi float(22) not null, > modification_date date not null, > user_read number(1) not null, > user_write number(1) not null, > group_read number(1) not null, > group_write number(1) not null, > other_read number(1) not null, > other_write number(1) not null, > row_user_id number(12) not null, > row_group_id number(3) not null, > row_project_id number(4) not null, > row_alg_invocation_id number(12) not null) > storage( maxextents unlimited ); > >- Add the primary key constraints. >If the table has a primary key, you must make sure to enter the >constraint. > > alter table dots.massspecsummary add constraint >PK_MASSSPECSUMARY > primary key (MASS_SPEC_SUMMARY_ID); > >- Add the foreign key constraints, create the views, indexes, and >sequences. Again the sql for this can usually be found somewhere in >$PROJECT_HOME/GUS/Model/schema/oracle/ > >2. Add the tables description to Core.TableInfo > >The description of the new tables then need to be entered into >Core.TableInfo, since this is the place that the GUS installation will >look for tables to automatically create modules for. It is imperative >that you set the attributes correctly, otherwise the build will not >work. > >table_id -> Unique identifier to the tables (automatic generated by >SubmitRow plug-in). >name -> Name of the table without the schema prefix 'Schema::'. eg: for >DoTS::MassSpecSummary, the table name is MassSpecSummary. >table_type -> controlled vocabulary, many to many, standard, version, >view. >primary_key_column -> Which is the column from this new table you're >describing that identifies uniquely the data inside? (This column must >be set as primary key on the database schema) >database_id -> Here you supply information about the schemas Core, DoTS, >SRes, RAD3, TESS. You must provide the database_id for the correct entry >in the Core.DatabaseInfo table. >is_versioned -> If the table is to be in a Ver schema. >is_view -> This must be set to 1 if you're describing a view. Otherwise, >set it to 0. >view_on_table_id -> Insert the table_id of the table where your new view >gets its data, null otherwise. >superclass_table_id -> Insert the table_id of the table of which your >new table is a child, null if it is not a child table. >is_updatable -> this seems to always be set to 1. > >Example: > >ga GUS::Common::Plugin::SubmitRow > --tablename Core::TableInfo > --attrlist >"name,table_type,primary_key_column,database_id,is_versioned,is_view,is_updatable" > --valuelist >"MassSpecSummary^^^standard^^^mass_spec_summary_id^^^5^^^0^^^0^^^1" > >3. Download GUS from CVS > Go ahead and get the latest version. You might want to make a >back up copy of what > you presently have. > > >4. Build >If you have customized some modules, you might want to make back-ups of >them in a temporary directory. >The last step is to rebuild the GUS installation by executing the >command: > > build GUS install -append > >Our first attempt to rebuild reset all our sequences to 1. We developed >a perl script to autofix all sequences based on the primary_keys current >value. But this is not supposed to happen with the latest version of >GUS from CVS. >If it happens, it is an easy fix. Just ask for the script... > > > >On Wed, 2004-06-16 at 13:20, Sucheta Tripathy wrote: > > >>Hi Michael, >> >>I am sure I will find my answer if I browse through the source forge page, >>but just to get a qucik answer I am writing to you.In case you have some >>time please address this. >> >>I know you added some tables and re-generated the objects, I just wanted >>to make sure what is the sequence of events. >> >>I understand it to be >> >>1. Change the table definition >>2. Rebuild the schema by giving install -append option. >> >>In our case I have the old CVS, not updated. I am afraid if I will be >>stuck at the re building stage. And also what happens to the plugins that >>are modified by us locally.And also what happens to the data already >>present in the tables? >> >> >> >>Many thanks >> >>Sucheta >> >> >> >>>No worry about this. >>>The class was not defined because I had not done the following: >>>alter table dots.massspecsummary add constraint PK_MASSSPECSUMMARY >>>primary key\ >>> (mass_spec_summary_id); >>> >>> >>>On Wed, 2004-06-16 at 11:01, Michael Luchtan wrote: >>> >>> >>>>Hello- >>>>Is this class some kind of standard notation for the gus development >>>>team? I would assume that it means that the class has not been defined >>>>yet. I get the following error message sometimes when trying to run >>>> >>>>build GUS install -append >>>> >>>> [javac] Compiling 1095 source files to >>>>/var/local/checkout/GUS/Model/classes >>>> [javac] >>>>/var/local/checkout/GUS/Model/src/java/org/gusdb/model/DoTS/MassSpecSummary_Row.java:312: >>>>\ >>>>cannot resolve symbol >>>> [javac] symbol : class notdefyet >>>> [javac] location: class org.gusdb.model.DoTS.MassSpecSummary_Row >>>> [javac] notdefyet pk = get(); >>>> [javac] ^ >>>> [javac] >>>>/var/local/checkout/GUS/Model/src/java/org/gusdb/model/DoTS/MassSpecSummary_Row.java:312: >>>>\ >>>>cannot resolve symbol >>>> [javac] symbol : method get () >>>> [javac] location: class org.gusdb.model.DoTS.MassSpecSummary_Row >>>> [javac] notdefyet pk = get(); >>>> [javac] ^ >>>> [javac] >>>>/var/local/checkout/GUS/Model/src/java/org/gusdb/model/DoTS/MassSpecSummary_Row.java:312: >>>>\ >>>>cannot resolve symbol >>>> [javac] symbol : method get () >>>> [javac] location: class org.gusdb.model.DoTS.MassSpecSummary_Row >>>> [javac] notdefyet pk = get(); >>>> [javac] ^ >>>> [javac] >>>>/var/local/checkout/GUS/Model/src/java/org/gusdb/model/DoTS/MassSpecSummary_Row.java:320: >>>>\ >>>>cannot resolve symbol >>>> [javac] symbol : class notdefyet >>>> [javac] location: class org.gusdb.model.DoTS.MassSpecSummary_Row >>>> [javac] set(new notdefyet(pk)); >>>> [javac] ^ >>>> [javac] 3 errors >>>> >>>>BUILD FAILED >>>>file:/var/local/checkout/install/build.xml:235: Compile failed; see the >>>>compiler error output for deta\ >>>>ils. >>>> >>>>Am I doing something wrong that would cause this class to not be >>>>defined, or is this just part of the latest version from CVS? >>>> >>>> >>> >>>------------------------------------------------------- >>>This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference >>>Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer >>>Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA >>>REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND >>>_______________________________________________ >>>Gusdev-gusdev mailing list >>>Gus...@li... >>>https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev >>> >>> >>> > > > >------------------------------------------------------- >This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference >Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer >Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA >REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND >_______________________________________________ >Gusdev-gusdev mailing list >Gus...@li... >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > |