nmrshiftdb-devel Mailing List for NMRShiftDB (Page 9)
Brought to you by:
steinbeck
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
(170) |
Mar
(120) |
Apr
(191) |
May
(231) |
Jun
(147) |
Jul
(202) |
Aug
(132) |
Sep
(91) |
Oct
(43) |
Nov
(87) |
Dec
(75) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(111) |
Feb
(194) |
Mar
(102) |
Apr
(107) |
May
(88) |
Jun
(121) |
Jul
(166) |
Aug
(75) |
Sep
(89) |
Oct
(116) |
Nov
(117) |
Dec
(52) |
| 2004 |
Jan
(138) |
Feb
(150) |
Mar
(144) |
Apr
(144) |
May
(54) |
Jun
(116) |
Jul
(73) |
Aug
(29) |
Sep
(135) |
Oct
(96) |
Nov
(72) |
Dec
(28) |
| 2005 |
Jan
(32) |
Feb
(9) |
Mar
(69) |
Apr
(108) |
May
(130) |
Jun
(195) |
Jul
(104) |
Aug
(116) |
Sep
(106) |
Oct
(58) |
Nov
(74) |
Dec
(64) |
| 2006 |
Jan
(110) |
Feb
(63) |
Mar
(45) |
Apr
(11) |
May
(122) |
Jun
(106) |
Jul
(26) |
Aug
(48) |
Sep
(67) |
Oct
(105) |
Nov
(81) |
Dec
(6) |
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(11) |
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Stefan K. <sh...@us...> - 2006-10-09 13:24:45
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21218/src/java/org/openscience/nmrshiftdb/modules/actions/portlets Modified Files: OrderAction.java Log Message: this uses new cdk and new saturation stuff. should resolve a long standing problem Index: OrderAction.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets/OrderAction.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** OrderAction.java 6 Oct 2006 20:12:10 -0000 1.28 --- OrderAction.java 9 Oct 2006 13:24:37 -0000 1.29 *************** *** 220,239 **** context.put("typesc",getTypesC()); context.put("typesh",getTypesH()); - Vector days=new Vector(); - for (int i=1;i<32;i++){ - days.add(new Integer(i)); - } - context.put("days",days ); - Vector months=new Vector(); - for (int i=1;i<13;i++){ - months.add(new Integer(i)); - } - context.put("months",months ); - Vector years=new Vector(); - for (int i=2000;i<=new Date().getYear()+1900;i++){ - years.add(new Integer(i)); - } - context.put("years",years ); } } --- 220,239 ---- context.put("typesc",getTypesC()); context.put("typesh",getTypesH()); } + Vector days=new Vector(); + for (int i=1;i<32;i++){ + days.add(new Integer(i)); + } + context.put("days",days ); + Vector months=new Vector(); + for (int i=1;i<13;i++){ + months.add(new Integer(i)); + } + context.put("months",months ); + Vector years=new Vector(); + for (int i=2000;i<=new Date().getYear()+1900;i++){ + years.add(new Integer(i)); + } + context.put("years",years ); } |
|
From: Stefan K. <sh...@us...> - 2006-10-06 20:22:33
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/om/map In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv649/src/java/org/openscience/nmrshiftdb/om/map Added Files: DBMachineMapBuilder.java Log Message: new file --- NEW FILE: DBMachineMapBuilder.java --- package org.openscience.nmrshiftdb.om.map; import java.util.*; import java.math.*; import org.apache.turbine.services.db.PoolBrokerService; import org.apache.turbine.services.db.TurbineDB; import org.apache.turbine.util.db.map.MapBuilder; import org.apache.turbine.util.db.map.DatabaseMap; import org.apache.turbine.util.db.map.TableMap; /** */ public class DBMachineMapBuilder implements MapBuilder { /** the name of this class */ public static final String CLASS_NAME = "org.openscience.nmrshiftdb.om.map.DBMachineMapBuilder"; /** item */ public static String getTable( ) { return "MACHINE"; } /** MACHINE.MACHINE_ID */ public static String getDBMachine_MachineId() { return getTable() + ".MACHINE_ID"; } /** MACHINE.NAME */ public static String getDBMachine_Name() { return getTable() + ".NAME"; } /** MACHINE.FIELD_STRENGTH */ public static String getDBMachine_FieldStrength() { return getTable() + ".FIELD_STRENGTH"; } /** the database map */ private DatabaseMap dbMap = null; /** tells us if this DatabaseMapBuilder is built so that we don't have to re-build it every time */ public boolean isBuilt() { if ( dbMap != null ) return true; return false; } /** gets the databasemap this map builder built. */ public DatabaseMap getDatabaseMap() { return this.dbMap; } /** the doBuild() method builds the DatabaseMap */ public void doBuild() throws Exception { dbMap = TurbineDB.getDatabaseMap("default"); dbMap.addTable(getTable()); TableMap tMap = dbMap.getTable(getTable()); tMap.setPrimaryKeyMethod(TableMap.IDBROKERTABLE); tMap.addPrimaryKey ( getDBMachine_MachineId(), new Integer(0) ); tMap.addColumn ( getDBMachine_Name(), new String() ); tMap.addForeignKey ( getDBMachine_FieldStrength(), new Integer(0) , "CONDITION" , "CONDITION_ID" ); } } |
|
From: Stefan K. <sh...@us...> - 2006-10-06 20:18:40
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/om In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31468/src/java/org/openscience/nmrshiftdb/om Added Files: BaseDBMachine.java BaseDBMachinePeer.java DBMachine.java DBMachinePeer.java Log Message: new files --- NEW FILE: BaseDBMachine.java --- package org.openscience.nmrshiftdb.om; import java.util.*; import java.math.*; import org.apache.turbine.om.*; import org.apache.turbine.om.peer.BasePeer; import org.apache.turbine.util.db.Criteria; import org.apache.turbine.util.ObjectUtils; import org.apache.turbine.util.StringUtils; import org.apache.turbine.util.ParameterParser; import org.apache.turbine.util.Log; import org.apache.turbine.util.db.pool.DBConnection; /** * You should not use this class directly. It should not even be * extended all references should be to DBMachine */ public abstract class BaseDBMachine extends BaseObject implements Retrievable { /** the value for the machine_id field */ private NumberKey machine_id; /** the value for the name field */ private String name; /** the value for the field_strength field */ private NumberKey field_strength; /** * Get the MachineId * @return NumberKey */ public NumberKey getMachineId() { return machine_id; } /** * Set the value of MachineId */ public void setMachineId(NumberKey v ) throws Exception { // update associated DBSample if (collDBSamples != null ) { for (int i=0; i<collDBSamples.size(); i++) { ((DBSample)collDBSamples.get(i)) .setMachine(v); } } if ( !ObjectUtils.equals(this.machine_id, v) ) { if (this.machine_id == null) { this.machine_id = new NumberKey(v); } else { this.machine_id.setValue(v); } setModified(true); } } /** * Set the value of MachineId as a string. */ public void setMachineId(String v ) throws Exception { setMachineId(new NumberKey(v)); } /** * Get the Name * @return String */ public String getName() { return name; } /** * Set the value of Name */ public void setName(String v ) { if ( !ObjectUtils.equals(this.name, v) ) { this.name = v; setModified(true); } } /** * Get the FieldStrength * @return NumberKey */ public NumberKey getFieldStrength() { return field_strength; } /** * Set the value of FieldStrength */ public void setFieldStrength(NumberKey v ) throws Exception { aDBCondition = null; if ( !ObjectUtils.equals(this.field_strength, v) ) { if (this.field_strength == null) { this.field_strength = new NumberKey(v); } else { this.field_strength.setValue(v); } setModified(true); } } /** * Set the value of FieldStrength as a string. */ public void setFieldStrength(String v ) throws Exception { setFieldStrength(new NumberKey(v)); } private DBCondition aDBCondition; /** * Declares an association between this object and a DBCondition object * * @param DBCondition v */ public void setDBCondition(DBCondition v) throws Exception { setFieldStrength(v.getConditionId()); aDBCondition = v; } public DBCondition getDBCondition() throws Exception { if ( aDBCondition==null && (!ObjectUtils.equals(this.field_strength, null)) ) { aDBCondition = DBConditionPeer.retrieveByPK(this.field_strength); // The following can be used instead of the line above to // guarantee the related object contains a reference // to this object, but this level of coupling // may be undesirable in many circumstances. // As it can lead to a db query with many results that may // never be used. // DBCondition obj = DBConditionPeer.retrieveByPK(this.field_strength); // obj.addDBMachines(this); } return aDBCondition; } /** * Provides convenient way to set a relationship based on a * ObjectKey. e.g. * <code>bar.setFooKey(foo.getPrimaryKey())</code> * */ public void setDBConditionKey(ObjectKey key) throws Exception { setFieldStrength((NumberKey)key); } /** * Collection to store aggregation of collDBSamples */ protected Vector collDBSamples; /** * Temporary storage of collDBSamples to save a possible db hit in * the event objects are add to the collection, but the * complete collection is never requested. */ // private Vector tempcollDBSamples; protected void initDBSamples() { if (collDBSamples == null) collDBSamples = new Vector(); } /** * Method called to associate a DBSample object to this object * through the DBSample foreign key attribute * * @param DBSample l */ public void addDBSample(DBSample l) throws Exception { /* if (collDBSamples == null) { if (tempcollDBSamples == null) { tempcollDBSamples = new Vector(); } tempcollDBSamples.add(l); } else { collDBSamples.add(l); } */ getDBSamples().add(l); l.setDBMachine((DBMachine)this); } /** * The criteria used to select the current contents of collDBSamples */ private Criteria lastDBSamplesCriteria = null; /** * If this collection has already been initialized, returns * the collection. Otherwise returns the results of * getDBSamples(new Criteria()) */ public Vector getDBSamples() throws Exception { if (collDBSamples == null) { collDBSamples = getDBSamples(new Criteria(10)); } return collDBSamples; } /** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this DBMachine has previously * been saved, it will retrieve related DBSamples from storage. * If this DBMachine is new, it will return * an empty collection or the current collection, the criteria * is ignored on a new object. */ public Vector getDBSamples(Criteria criteria) throws Exception { if (collDBSamples == null) { if ( isNew() ) { collDBSamples = new Vector(); } else { criteria.add(DBSamplePeer.MACHINE, getMachineId() ); collDBSamples = DBSamplePeer.doSelect(criteria); } /* if (tempcollDBSamples != null) { for (int i=0; i<tempcollDBSamples.size(); i++) { collDBSamples.add(tempcollDBSamples.get(i)); } tempcollDBSamples = null; } */ } else { // criteria has no effect for a new object if ( !isNew() ) { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return the collection. criteria.add(DBSamplePeer.MACHINE, getMachineId() ); if ( !lastDBSamplesCriteria.equals(criteria) ) { collDBSamples = DBSamplePeer.doSelect(criteria); } } } lastDBSamplesCriteria = criteria; return collDBSamples; } /** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this DBMachine is new, it will return * an empty collection; or if this DBMachine has previously * been saved, it will retrieve related DBSamples from storage. */ protected Vector getDBSamplesJoinNmrshiftdbUser(Criteria criteria) throws Exception { if (collDBSamples == null) { if ( isNew() ) { collDBSamples = new Vector(); } else { criteria.add(DBSamplePeer.MACHINE, getMachineId() ); collDBSamples = DBSamplePeer.doSelectJoinNmrshiftdbUser(criteria); } } else { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return the collection. boolean newCriteria = true; criteria.add(DBSamplePeer.MACHINE, getMachineId() ); if ( !lastDBSamplesCriteria.equals(criteria) ) { collDBSamples = DBSamplePeer.doSelectJoinNmrshiftdbUser(criteria); } } lastDBSamplesCriteria = criteria; return collDBSamples; } /** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this DBMachine is new, it will return * an empty collection; or if this DBMachine has previously * been saved, it will retrieve related DBSamples from storage. */ protected Vector getDBSamplesJoinDBCondition(Criteria criteria) throws Exception { if (collDBSamples == null) { if ( isNew() ) { collDBSamples = new Vector(); } else { criteria.add(DBSamplePeer.MACHINE, getMachineId() ); collDBSamples = DBSamplePeer.doSelectJoinDBCondition(criteria); } } else { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return the collection. boolean newCriteria = true; criteria.add(DBSamplePeer.MACHINE, getMachineId() ); if ( !lastDBSamplesCriteria.equals(criteria) ) { collDBSamples = DBSamplePeer.doSelectJoinDBCondition(criteria); } } lastDBSamplesCriteria = criteria; return collDBSamples; } /** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this DBMachine is new, it will return * an empty collection; or if this DBMachine has previously * been saved, it will retrieve related DBSamples from storage. */ protected Vector getDBSamplesJoinDBMolecule(Criteria criteria) throws Exception { if (collDBSamples == null) { if ( isNew() ) { collDBSamples = new Vector(); } else { criteria.add(DBSamplePeer.MACHINE, getMachineId() ); collDBSamples = DBSamplePeer.doSelectJoinDBMolecule(criteria); } } else { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return the collection. boolean newCriteria = true; criteria.add(DBSamplePeer.MACHINE, getMachineId() ); if ( !lastDBSamplesCriteria.equals(criteria) ) { collDBSamples = DBSamplePeer.doSelectJoinDBMolecule(criteria); } } lastDBSamplesCriteria = criteria; return collDBSamples; } private static Vector fieldNames_ = null; /** * Generate a list of field names. */ public static synchronized List getFieldNames() { if (fieldNames_ == null) { fieldNames_ = new Vector(); fieldNames_.add("MachineId"); fieldNames_.add("Name"); fieldNames_.add("FieldStrength"); } return fieldNames_; } /** * Retrieves a field from the object by name passed in * as a String. */ public Object getByName(String name) { if (name.equals("MachineId")) { return getMachineId(); } if (name.equals("Name")) { return getName(); } if (name.equals("FieldStrength")) { return getFieldStrength(); } return null; } /** * Retrieves a field from the object by name passed in * as a String. The String must be one of the static * Strings defined in this Class' Peer. */ public Object getByPeerName(String name) { if (name.equals(DBMachinePeer.MACHINE_ID )) { return getMachineId(); } if (name.equals(DBMachinePeer.NAME )) { return getName(); } if (name.equals(DBMachinePeer.FIELD_STRENGTH )) { return getFieldStrength(); } return null; } /** * Retrieves a field from the object by Position as specified * in the xml schema. Zero-based. */ public Object getByPosition(int pos) { if ( pos == 0 ) { return getMachineId(); } if ( pos == 1 ) { return getName(); } if ( pos == 2 ) { return getFieldStrength(); } return null; } /** * Stores the object in the database. If the object is new, * it inserts it; otherwise an update is performed. */ public void save() throws Exception { save(DBMachinePeer.getMapBuilder() .getDatabaseMap().getName()); } /** * Stores the object in the database. If the object is new, * it inserts it; otherwise an update is performed. */ public void save(String dbName) throws Exception { DBConnection dbCon = null; try { dbCon = BasePeer.beginTransaction(dbName); save(dbCon); } catch(Exception e) { BasePeer.rollBackTransaction(dbCon); throw e; } BasePeer.commitTransaction(dbCon); } // flag to prevent endless save loop, if this object is referenced // by another object which falls in this transaction. private boolean alreadyInSave = false; /** * Stores the object in the database. If the object is new, * it inserts it; otherwise an update is performed. This method * is meant to be used as part of a transaction, otherwise use * the save() method and the connection details will be handled * internally */ public void save(DBConnection dbCon) throws Exception { if (!alreadyInSave) { alreadyInSave = true; if (isModified()) { if (isNew()) { DBMachinePeer.doInsert((DBMachine)this, dbCon); setNew(false); } else { DBMachinePeer.doUpdate((DBMachine)this, dbCon); } } if (collDBSamples != null ) { for (int i=0; i<collDBSamples.size(); i++) { ((DBSample)collDBSamples.get(i)).save(dbCon); } } alreadyInSave = false; } } /** * Set the PrimaryKey using ObjectKey. * * @param ObjectKey machine_id */ public void setPrimaryKey(ObjectKey machine_id) throws Exception { setMachineId((NumberKey)machine_id); } /** * Set the PrimaryKey using a String. */ public void setPrimaryKey(String key) throws Exception { setMachineId(new NumberKey(key) ); } /** * returns an id that differentiates this object from others * of its class. */ public ObjectKey getPrimaryKey() { return getMachineId(); } /** * get an id that differentiates this object from others * of its class. */ public String getQueryKey() { if (getPrimaryKey() == null) { return ""; } else { return getPrimaryKey().toString(); } } /** * set an id that differentiates this object from others * of its class. */ public void setQueryKey(String key) throws Exception { setPrimaryKey(key); } /** * Makes a copy of this object. * It creates a new object filling in the simple attributes. * It then fills all the association collections and sets the * related objects to isNew=true. */ public DBMachine copy() throws Exception { DBMachine copyObj = new DBMachine(); copyObj.setMachineId(machine_id); copyObj.setName(name); copyObj.setFieldStrength(field_strength); List v = copyObj.getDBSamples(); for (int i=0; i<v.size(); i++) { ((Persistent)v.get(i)).setNew(true); } copyObj.setMachineId((NumberKey)null); return copyObj; } } --- NEW FILE: BaseDBMachinePeer.java --- package org.openscience.nmrshiftdb.om; import java.util.*; import java.math.*; import java.sql.*; import com.workingdogs.village.*; import org.apache.turbine.om.*; import org.apache.turbine.om.peer.*; import org.apache.turbine.util.*; import org.apache.turbine.util.db.*; import org.apache.turbine.util.db.map.*; import org.apache.turbine.util.db.pool.DBConnection; import org.apache.turbine.services.db.TurbineDB; import org.apache.turbine.util.TurbineException; // Local classes import org.openscience.nmrshiftdb.om.map.*; /** */ public abstract class BaseDBMachinePeer extends BasePeer { /** the mapbuilder for this class */ private static final DBMachineMapBuilder mapBuilder = (DBMachineMapBuilder)getMapBuilder(DBMachineMapBuilder.CLASS_NAME); /** the table name for this class */ public static final String TABLE_NAME = mapBuilder.getTable(); /** * @return the map builder for this peer */ public static MapBuilder getMapBuilder() { return(mapBuilder); } /** the column name for the MACHINE_ID field */ public static final String MACHINE_ID = mapBuilder.getDBMachine_MachineId(); /** the column name for the NAME field */ public static final String NAME = mapBuilder.getDBMachine_Name(); /** the column name for the FIELD_STRENGTH field */ public static final String FIELD_STRENGTH = mapBuilder.getDBMachine_FieldStrength(); /** number of columns for this peer */ public static final int numColumns = 3; /** A class that can be returned by this peer. */ protected static final String CLASSNAME_DEFAULT = "org.openscience.nmrshiftdb.om.DBMachine"; /** A class that can be returned by this peer. */ protected static final Class CLASS_DEFAULT = initClass(); /** Initialization method for static CLASS_DEFAULT attribute */ private static Class initClass() { Class c = null; try { c = Class.forName(CLASSNAME_DEFAULT); } catch (Exception e) { Log.error("A FATAL ERROR has occurred which should not" + "have happened under any circumstance. Please notify" + "Turbine and give as many details as possible including the " + "error stacktrace.", e); } return c; } /** * Get the list of objects for a ResultSet. Please not that your * resultset MUST return columns in the right order. You can use * getFieldNames() in BaseObject to get the correct sequence. */ public static Vector resultSet2Objects (java.sql.ResultSet results) throws Exception { QueryDataSet qds = null; Vector rows = null; try { qds = new QueryDataSet( results ); rows = getSelectResults( qds ); } finally { if (qds != null) qds.close(); } return populateObjects (rows); } /** Method to do inserts */ public static ObjectKey doInsert( Criteria criteria ) throws Exception { return BasePeer.doInsert( criteria ); } /** * Method to do inserts. This method is to be used during a transaction, * otherwise use the doInsert(Criteria) method. It will take care of * the connection details internally. */ public static ObjectKey doInsert( Criteria criteria, DBConnection dbCon ) throws Exception { return BasePeer.doInsert( criteria, dbCon ); } /** Add all the columns needed to create a new object */ public static void addSelectColumns (Criteria criteria) throws Exception { criteria.addSelectColumn( MACHINE_ID ); criteria.addSelectColumn( NAME ); criteria.addSelectColumn( FIELD_STRENGTH ); } /** * Create a new object of type cls from a resultset row starting * from a specified offset. This is done so that you can select * other rows than just those needed for this object. You may * for example want to create two objects from the same row. */ public static DBMachine row2Object (Record row, int offset, Class cls ) throws Exception { DBMachine obj = (DBMachine)cls.newInstance(); populateObject(row, offset, obj); obj.setModified(false); obj.setNew(false); return obj; } /** * Populates an object from a resultset row starting * from a specified offset. This is done so that you can select * other rows than just those needed for this object. You may * for example want to create two objects from the same row. */ public static void populateObject (Record row, int offset, DBMachine obj ) throws Exception { obj.setMachineId( new NumberKey(row.getValue(offset+0).asBigDecimal())); obj.setName(row.getValue(offset+1).asString()); obj.setFieldStrength( new NumberKey(row.getValue(offset+2).asBigDecimal())); } /** Method to do selects */ public static Vector doSelect( Criteria criteria ) throws Exception { return populateObjects( doSelectVillageRecords(criteria) ); } /** Method to do selects within a transaction */ public static Vector doSelect( Criteria criteria, DBConnection dbCon ) throws Exception { return populateObjects( doSelectVillageRecords(criteria, dbCon) ); } /** * Grabs the raw Village records to be formed into objects. * This method handles connections internally. The Record objects * returned by this method should be considered readonly. Do not * alter the data and call save(), your results may vary, but are * certainly likely to result in hard to track MT bugs. */ public static Vector doSelectVillageRecords( Criteria criteria ) throws Exception { if (criteria.getSelectColumns().size() == 0) { addSelectColumns ( criteria ); } // BasePeer returns a Vector of Value (Village) arrays. The array // order follows the order columns were placed in the Select clause. return BasePeer.doSelect(criteria); } /** * Grabs the raw Village records to be formed into objects. * This method should be used for transactions */ public static Vector doSelectVillageRecords( Criteria criteria, DBConnection dbCon ) throws Exception { if (criteria.getSelectColumns().size() == 0) { addSelectColumns ( criteria ); } // BasePeer returns a Vector of Value (Village) arrays. The array // order follows the order columns were placed in the Select clause. return BasePeer.doSelect(criteria, dbCon); } /** * The returned vector will contain objects of the default type or * objects that inherit from the default. */ public static Vector populateObjects(Vector records) throws Exception { Vector results = new Vector(records.size()); // populate the object(s) for ( int i=0; i<records.size(); i++ ) { Record row = (Record)records.elementAt(i); results.add(DBMachinePeer.row2Object(row, 1, DBMachinePeer.getOMClass())); } return results; } /** * The class that the Peer will make instances of. * If the BO is abstract then you must implement this method * in the BO. */ public static Class getOMClass() throws Exception { return CLASS_DEFAULT; } /** * Method to do updates. * * @param Criteria object containing data that is used to create the UPDATE statement. */ public static void doUpdate(Criteria criteria) throws Exception { Criteria selectCriteria = new Criteria(mapBuilder.getDatabaseMap().getName(), 2); selectCriteria.put( MACHINE_ID, criteria.remove(MACHINE_ID) ); BasePeer.doUpdate( selectCriteria, criteria ); } /** * Method to do updates. This method is to be used during a transaction, * otherwise use the doUpdate(Criteria) method. It will take care of * the connection details internally. * * @param Criteria object containing data that is used to create the UPDATE statement. */ public static void doUpdate(Criteria criteria, DBConnection dbCon) throws Exception { Criteria selectCriteria = new Criteria(mapBuilder.getDatabaseMap().getName(), 2); selectCriteria.put( MACHINE_ID, criteria.remove(MACHINE_ID) ); BasePeer.doUpdate( selectCriteria, criteria, dbCon ); } /** * Method to do deletes. * * @param Criteria object containing data that is used DELETE from database. */ public static void doDelete(Criteria criteria) throws Exception { BasePeer.doDelete ( criteria ); } /** * Method to do deletes. This method is to be used during a transaction, * otherwise use the doDelete(Criteria) method. It will take care of * the connection details internally. * * @param Criteria object containing data that is used DELETE from database. */ public static void doDelete(Criteria criteria, DBConnection dbCon) throws Exception { BasePeer.doDelete ( criteria, dbCon ); } /** Method to do inserts */ public static void doInsert( DBMachine obj ) throws Exception { obj.setPrimaryKey(doInsert(buildCriteria(obj))); obj.setNew(false); } /** * @param obj the data object to update in the database. */ public static void doUpdate(DBMachine obj) throws Exception { doUpdate(buildCriteria(obj)); } /** * @param obj the data object to delete in the database. */ public static void doDelete(DBMachine obj) throws Exception { doDelete(buildCriteria(obj)); } /** * Method to do inserts. This method is to be used during a transaction, * otherwise use the doInsert(DBMachine) method. It will take * care of the connection details internally. * * @param obj the data object to insert into the database. */ public static void doInsert( DBMachine obj, DBConnection dbCon) throws Exception { obj.setPrimaryKey(doInsert(buildCriteria(obj), dbCon)); obj.setNew(false); } /** * Method to do update. This method is to be used during a transaction, * otherwise use the doUpdate(DBMachine) method. It will take * care of the connection details internally. * * @param obj the data object to update in the database. */ public static void doUpdate(DBMachine obj, DBConnection dbCon) throws Exception { doUpdate(buildCriteria(obj), dbCon); } /** * Method to delete. This method is to be used during a transaction, * otherwise use the doDelete(DBMachine) method. It will take * care of the connection details internally. * * @param obj the data object to delete in the database. */ public static void doDelete(DBMachine obj, DBConnection dbCon) throws Exception { doDelete(buildCriteria(obj), dbCon); } /** Build a Criteria object from the data object for this peer */ public static Criteria buildCriteria( DBMachine obj ) { Criteria criteria = new Criteria(); if ( !obj.isNew() ) criteria.add( MACHINE_ID, obj.getMachineId() ); criteria.add( NAME, obj.getName() ); criteria.add( FIELD_STRENGTH, obj.getFieldStrength() ); return criteria; } /** * Retrieve a single object by pk * * @param ObjectKey pk */ public static DBMachine retrieveByPK( ObjectKey pk ) throws Exception { DBConnection db = null; DBMachine retVal = null; try { db = TurbineDB.getConnection( mapBuilder.getDatabaseMap().getName() ); retVal = retrieveByPK( pk, db ); } finally { if (db != null) TurbineDB.releaseConnection(db); } return(retVal); } /** * Retrieve a single object by pk * * @param ObjectKey pk * @param DBConnection dbcon */ public static DBMachine retrieveByPK( ObjectKey pk, DBConnection dbcon ) throws Exception { Criteria criteria = new Criteria(); criteria.add( MACHINE_ID, pk ); Vector v = doSelect(criteria, dbcon); if ( v.size() != 1) { throw new Exception("Failed to select one and only one row."); } else { return (DBMachine)v.firstElement(); } } /** * selects a collection of DBMachine objects pre-filled with their * DBCondition objects. */ protected static Vector doSelectJoinDBCondition(Criteria c) throws Exception { c.setDbName(mapBuilder.getDatabaseMap().getName()); DBMachinePeer.addSelectColumns(c); int offset = numColumns + 1; DBConditionPeer.addSelectColumns(c); c.addJoin(DBMachinePeer.FIELD_STRENGTH, DBConditionPeer.CONDITION_ID); Vector rows = BasePeer.doSelect(c); Vector results = new Vector(); for (int i=0; i<rows.size(); i++) { Record row = (Record)rows.elementAt(i); Class omClass = DBMachinePeer.getOMClass(); DBMachine obj1 = (DBMachine)DBMachinePeer .row2Object( row, 1, omClass); omClass = DBConditionPeer.getOMClass(); DBCondition obj2 = (DBCondition)DBConditionPeer .row2Object(row, offset, omClass); boolean newObject = true; for (int j=0; j<results.size(); j++) { DBMachine temp_obj1 = (DBMachine)results.elementAt(j); DBCondition temp_obj2 = temp_obj1.getDBCondition(); if ( temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey() ) ) { newObject = false; temp_obj2.addDBMachine(obj1); break; } } if (newObject) { obj2.initDBMachines(); obj2.addDBMachine(obj1); } results.add(obj1); } return results; } /** * Returns the TableMap related to this peer. This method is not * needed for general use but a specific application could have a * need. */ protected static TableMap getTableMap() { return mapBuilder.getDatabaseMap().getTable(TABLE_NAME); } } --- NEW FILE: DBMachine.java --- package org.openscience.nmrshiftdb.om; // JDK classes import java.util.*; // Turbine classes import org.apache.turbine.om.*; import org.apache.turbine.om.peer.BasePeer; import org.apache.turbine.util.db.Criteria; import org.apache.turbine.util.ObjectUtils; import org.apache.turbine.util.StringUtils; import org.apache.turbine.util.ParameterParser; import org.apache.turbine.util.Log; import org.apache.turbine.util.db.pool.DBConnection; /** * You should add additional methods to this class to meet the * application requirements. This class will only be generated as * long as it does not already exist in the output directory. */ public class DBMachine extends org.openscience.nmrshiftdb.om.BaseDBMachine implements Persistent { } --- NEW FILE: DBMachinePeer.java --- package org.openscience.nmrshiftdb.om; // JDK classes import java.util.*; // Village classes import com.workingdogs.village.*; // Turbine classes import org.apache.turbine.om.peer.*; import org.apache.turbine.util.*; import org.apache.turbine.util.db.*; import org.apache.turbine.util.db.map.*; import org.apache.turbine.util.db.pool.DBConnection; // Local classes import org.openscience.nmrshiftdb.om.map.*; /** * You should add additional methods to this class to meet the * application requirements. This class will only be generated as * long as it does not already exist in the output directory. */ public class DBMachinePeer extends org.openscience.nmrshiftdb.om.BaseDBMachinePeer { } |
|
From: Stefan K. <sh...@us...> - 2006-10-06 20:12:17
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/sql In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28569/src/sql Modified Files: nmrshiftdb-schema.sql Log Message: orders now assigned to spectrometers Index: nmrshiftdb-schema.sql =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/sql/nmrshiftdb-schema.sql,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -r1.79 -r1.80 *** nmrshiftdb-schema.sql 11 Sep 2006 14:21:16 -0000 1.79 --- nmrshiftdb-schema.sql 6 Oct 2006 20:12:11 -0000 1.80 *************** *** 812,815 **** --- 812,829 ---- # ----------------------------------------------------------------------- + # MACHINE + # ----------------------------------------------------------------------- + drop table if exists MACHINE; + + CREATE TABLE MACHINE + ( + MACHINE_ID INTEGER NOT NULL, + NAME VARCHAR (20) NOT NULL, + FIELD_STRENGTH INTEGER NOT NULL, + PRIMARY KEY(MACHINE_ID), + FOREIGN KEY (FIELD_STRENGTH) REFERENCES CONDITION (CONDITION_ID), + ); + + # ----------------------------------------------------------------------- # SAMPLE # ----------------------------------------------------------------------- *************** *** 822,826 **** USER_ID INTEGER NOT NULL, SOLVENT INTEGER NOT NULL, ! FIELD_STRENGTH INTEGER NOT NULL, PROBABLE_STRUCTURE INTEGER, DATE DATETIME NOT NULL, --- 836,840 ---- USER_ID INTEGER NOT NULL, SOLVENT INTEGER NOT NULL, ! MACHINE INTEGER NOT NULL, PROBABLE_STRUCTURE INTEGER, DATE DATETIME NOT NULL, *************** *** 833,840 **** FOREIGN KEY (USER_ID) REFERENCES TURBINE_USER (USER_ID), FOREIGN KEY (SOLVENT) REFERENCES CONDITION (CONDITION_ID), ! FOREIGN KEY (FIELD_STRENGTH) REFERENCES CONDITION (CONDITION_ID), FOREIGN KEY (PROBABLE_STRUCTURE) REFERENCES MOLECULE (MOLECULE_ID), ! INDEX USER_ID_INDEX (USER_ID) ! ); --- 847,853 ---- FOREIGN KEY (USER_ID) REFERENCES TURBINE_USER (USER_ID), FOREIGN KEY (SOLVENT) REFERENCES CONDITION (CONDITION_ID), ! FOREIGN KEY (MACHINE) REFERENCES MACHINE (MACHINE_ID), FOREIGN KEY (PROBABLE_STRUCTURE) REFERENCES MOLECULE (MOLECULE_ID), ! INDEX USER_ID_INDEX (USER_ID) ); |
|
From: Stefan K. <sh...@us...> - 2006-10-06 20:12:17
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28569/src/vmtemplates/portlets/html Modified Files: user-order.vm worker-order.vm Log Message: orders now assigned to spectrometers Index: user-order.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html/user-order.vm,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** user-order.vm 6 Oct 2006 14:27:48 -0000 1.40 --- user-order.vm 6 Oct 2006 20:12:11 -0000 1.41 *************** *** 132,136 **** </select> #else ! : $sample.getDBConditionRelatedBySolvent().getValue() #end <br> --- 132,136 ---- </select> #else ! : $sample.getDBCondition().getValue() #end <br> *************** *** 191,203 **** #end <br> ! Field Strength #if($submitorshow=="submit") : <select name="fstrengths" size="1" onChange="document.restform.elements['fstrength'].value=''"> #foreach($existingcondition in $fstrengths) ! <option value="$existingcondition.getConditionId()" #if($strength==$existingcondition.getValue()) selected #end>$existingcondition.getValue()</option> #end </select> #else ! : $sample.getDBConditionRelatedByFieldStrength().getValue() #end <br> --- 191,203 ---- #end <br> ! Spectrometer #if($submitorshow=="submit") : <select name="fstrengths" size="1" onChange="document.restform.elements['fstrength'].value=''"> #foreach($existingcondition in $fstrengths) ! <option value="$existingcondition.getMachineId()" #if($strength==$existingcondition.getMachineId()) selected #end>$existingcondition.getName() ($existingcondition.getDBCondition().getValue() Mhz)</option> #end </select> #else ! : $sample.getDBMachine().getName() ($sample.getDBMachine().getDBCondition().getValue() #end <br> Index: worker-order.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html/worker-order.vm,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** worker-order.vm 6 Oct 2006 13:00:05 -0000 1.19 --- worker-order.vm 6 Oct 2006 20:12:11 -0000 1.20 *************** *** 8,67 **** #else The following orders for your labgroup wait to be fullfilled: ! <table border="3" rules="cols"><tr><td align="left" valign="top"> ! <table> ! <tr><th>250 MHz</th></tr> ! #foreach($sample in $openorders250) ! #set($greyorwhite=$velocityCount%2) ! <tr ! #if($greyorwhite==0) ! bgcolor="#D3D3D3" ! #end ! ><td><a href="portal/pane0/NMR+lab+administration?submitorshow=show&id=$sample.getSampleId()">$sample.getUsersId()</a></td></tr> ! #end ! </table></td><td align="left" valign="top"> ! <table> ! <tr><th>300 MHz</th></tr> ! #foreach($sample in $openorders300) ! #set($greyorwhite=$velocityCount%2) ! <tr ! #if($greyorwhite==0) ! bgcolor="#D3D3D3" ! #end ! ><td><a href="portal/pane0/NMR+lab+administration?submitorshow=show&id=$sample.getSampleId()">$sample.getUsersId()</a></td></tr> ! #end ! </table></td><td align="left" valign="top"> ! <table> ! <tr><th>400 MHz</th></tr> ! #foreach($sample in $openorders400) ! #set($greyorwhite=$velocityCount%2) ! <tr ! #if($greyorwhite==0) ! bgcolor="#D3D3D3" ! #end ! ><td><a href="portal/pane0/NMR+lab+administration?submitorshow=show&id=$sample.getSampleId()">$sample.getUsersId()</a></td></tr> ! #end ! </table></td><td align="left" valign="top"> ! <table> ! <tr><th>500 MHz</th></tr> ! #foreach($sample in $openorders500) ! #set($greyorwhite=$velocityCount%2) ! <tr ! #if($greyorwhite==0) ! bgcolor="#D3D3D3" ! #end ! ><td><a href="portal/pane0/NMR+lab+administration?submitorshow=show&id=$sample.getSampleId()">$sample.getUsersId()</a></td></tr> ! #end ! </table></td><td align="left" valign="top"> ! <table> ! <tr><th>600 MHz</th></tr> ! #foreach($sample in $openorders600) ! #set($greyorwhite=$velocityCount%2) ! <tr ! #if($greyorwhite==0) ! bgcolor="#D3D3D3" ! #end ! ><td><a href="portal/pane0/NMR+lab+administration?submitorshow=show&id=$sample.getSampleId()">$sample.getUsersId()</a></td></tr> ! #end ! </table></td></tr></table> #end </td> --- 8,27 ---- #else The following orders for your labgroup wait to be fullfilled: ! <table border="3" rules="cols"><tr> ! #foreach($machine in $machines) ! <td align="left" valign="top"> ! <table> ! <tr><th>$machine.getName() ($machine.getDBCondition().getValue() Mhz)</th></tr> ! #foreach($sample in $openorders.get($machine.getMachineId())) ! #set($greyorwhite=$velocityCount%2) ! <tr ! #if($greyorwhite==0) ! bgcolor="#D3D3D3" ! #end ! ><td><a href="portal/pane0/NMR+lab+administration?submitorshow=show&id=$sample.getSampleId()">$sample.getUsersId()</a></td></tr> ! #end ! </table></td> ! #end ! </tr></table> #end </td> *************** *** 75,83 **** Sample I. D.: $sample.getUsersId()<br> Date: $date<br> ! Solvent: $sample.getDBConditionRelatedBySolvent().getValue()<br> #if($image) <img src="$image"><br> #end ! Field Strength: $sample.getDBConditionRelatedByFieldStrength().getValue()<br> $sample.getWishedSpectrum()<br> Other nuclei (please specify): $sample.getOtherNuclei()<br> --- 35,43 ---- Sample I. D.: $sample.getUsersId()<br> Date: $date<br> ! Solvent: $sample.getDBConditionRelated().getValue()<br> #if($image) <img src="$image"><br> #end ! Spectrometer: $sample.getDBMachine() ($sample.getDBMachine().getDBCondition().getValue()<br> $sample.getWishedSpectrum()<br> Other nuclei (please specify): $sample.getOtherNuclei()<br> |
|
From: Stefan K. <sh...@us...> - 2006-10-06 20:12:17
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/om/map In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28569/src/java/org/openscience/nmrshiftdb/om/map Modified Files: DBSampleMapBuilder.java Log Message: orders now assigned to spectrometers Index: DBSampleMapBuilder.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/om/map/DBSampleMapBuilder.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** DBSampleMapBuilder.java 11 Sep 2006 14:21:16 -0000 1.6 --- DBSampleMapBuilder.java 6 Oct 2006 20:12:11 -0000 1.7 *************** *** 47,54 **** } ! /** SAMPLE.FIELD_STRENGTH */ ! public static String getDBSample_FieldStrength() { ! return getTable() + ".FIELD_STRENGTH"; } --- 47,54 ---- } ! /** SAMPLE.MACHINE */ ! public static String getDBSample_Machine() { ! return getTable() + ".MACHINE"; } *************** *** 134,138 **** tMap.addForeignKey ( getDBSample_Solvent(), new Integer(0) , "CONDITION" , "CONDITION_ID" ); ! tMap.addForeignKey ( getDBSample_FieldStrength(), new Integer(0) , "CONDITION" , "CONDITION_ID" ); tMap.addForeignKey ( getDBSample_ProbableStructure(), new Integer(0) , "MOLECULE" , "MOLECULE_ID" ); --- 134,138 ---- tMap.addForeignKey ( getDBSample_Solvent(), new Integer(0) , "CONDITION" , "CONDITION_ID" ); ! tMap.addForeignKey ( getDBSample_Machine(), new Integer(0) , "MACHINE" , "MACHINE_ID" ); tMap.addForeignKey ( getDBSample_ProbableStructure(), new Integer(0) , "MOLECULE" , "MOLECULE_ID" ); |
|
From: Stefan K. <sh...@us...> - 2006-10-06 20:12:14
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28569/src/java/org/openscience/nmrshiftdb/modules/actions/portlets Modified Files: OrderAction.java OrderFullfillAction.java Log Message: orders now assigned to spectrometers Index: OrderAction.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets/OrderAction.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** OrderAction.java 6 Oct 2006 13:00:04 -0000 1.27 --- OrderAction.java 6 Oct 2006 20:12:10 -0000 1.28 *************** *** 6,13 **** import java.io.StringReader; import java.text.SimpleDateFormat; - import java.util.Calendar; import java.util.Collections; import java.util.Date; - import java.util.GregorianCalendar; import java.util.Locale; import java.util.Vector; --- 6,11 ---- *************** *** 25,28 **** --- 23,28 ---- import org.openscience.nmrshiftdb.om.DBCondition; import org.openscience.nmrshiftdb.om.DBConditionPeer; + import org.openscience.nmrshiftdb.om.DBMachine; + import org.openscience.nmrshiftdb.om.DBMachinePeer; import org.openscience.nmrshiftdb.om.DBRawFile; import org.openscience.nmrshiftdb.om.DBRawFileDBSpectrumPeer; *************** *** 151,159 **** context.put("probablestructure",toshow.getProbableStructure()); //The mol is put into the MView applet via a file ! File outputFile = new File(ServletUtils.expandRelative(data.getServletConfig(), "/nmrshiftdbhtml/" + System.currentTimeMillis() + "order.mol")); ! FileWriter out = new FileWriter(outputFile); ! out.write(toshow.getDBMolecule().getStructureFile(1,false)); ! out.close(); ! context.put("molfile", "/nmrshiftdbhtml/" + outputFile.getName()); //this is for the self fullfill if(toshow.getProcess().equals(this.SELF) && toshow.getFinished().equals("false")){ --- 151,161 ---- context.put("probablestructure",toshow.getProbableStructure()); //The mol is put into the MView applet via a file ! if(!new String(toshow.getProbableStructure()+"").equals("")){ ! File outputFile = new File(ServletUtils.expandRelative(data.getServletConfig(), "/nmrshiftdbhtml/" + System.currentTimeMillis() + "order.mol")); ! FileWriter out = new FileWriter(outputFile); ! out.write(toshow.getDBMolecule().getStructureFile(1,false)); ! out.close(); ! context.put("molfile", "/nmrshiftdbhtml/" + outputFile.getName()); ! } //this is for the self fullfill if(toshow.getProcess().equals(this.SELF) && toshow.getFinished().equals("false")){ *************** *** 214,230 **** crit.add(DBConditionPeer.CONDITION_TYPE_ID,"2"); context.put("solvents", DBConditionPeer.doSelect(crit)); ! Vector strengths=new Vector(); ! crit.add(DBConditionPeer.CONDITION_TYPE_ID,"3"); ! crit.add(DBConditionPeer.VALUE,"250"); ! strengths.addAll(DBConditionPeer.doSelect(crit)); ! crit.add(DBConditionPeer.VALUE,"300"); ! strengths.addAll(DBConditionPeer.doSelect(crit)); ! crit.add(DBConditionPeer.VALUE,"400"); ! strengths.addAll(DBConditionPeer.doSelect(crit)); ! crit.add(DBConditionPeer.VALUE,"500"); ! strengths.addAll(DBConditionPeer.doSelect(crit)); ! crit.add(DBConditionPeer.VALUE,"600"); ! strengths.addAll(DBConditionPeer.doSelect(crit)); ! context.put("fstrengths", strengths); context.put("data",data); context.put("typesc",getTypesC()); --- 216,220 ---- crit.add(DBConditionPeer.CONDITION_TYPE_ID,"2"); context.put("solvents", DBConditionPeer.doSelect(crit)); ! context.put("fstrengths", DBMachinePeer.doSelect(new Criteria())); context.put("data",data); context.put("typesc",getTypesC()); *************** *** 293,301 **** solvent=(DBCondition)DBConditionPeer.doSelect(crit).get(0); } ! sample.setDBConditionRelatedBySolvent(solvent); Criteria crit=new Criteria(); ! crit.add(DBConditionPeer.CONDITION_ID,data.getParameters().get("fstrengths")); ! DBCondition fstrength=(DBCondition)DBConditionPeer.doSelect(crit).get(0); ! sample.setDBConditionRelatedByFieldStrength(fstrength); String molecule = data.getParameters().get("MolTxt"); Molecule mol = (Molecule) new MDLReader(new StringReader(molecule)).read(new Molecule()); --- 283,291 ---- solvent=(DBCondition)DBConditionPeer.doSelect(crit).get(0); } ! sample.setDBCondition(solvent); Criteria crit=new Criteria(); ! crit.add(DBMachinePeer.MACHINE_ID,data.getParameters().get("fstrengths")); ! DBMachine fstrength=(DBMachine)DBMachinePeer.doSelect(crit).get(0); ! sample.setDBMachine(fstrength); String molecule = data.getParameters().get("MolTxt"); Molecule mol = (Molecule) new MDLReader(new StringReader(molecule)).read(new Molecule()); *************** *** 341,344 **** --- 331,335 ---- context.put("care",sample.getSpecialCare()); context.put("nuclei",wishedSpectrum); + context.put("strength",fstrength.getMachineId()); if(mol!= null && mol.getAtomCount()>0){ //The mol is put into the MView applet via a file Index: OrderFullfillAction.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets/OrderFullfillAction.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** OrderFullfillAction.java 6 Oct 2006 13:00:04 -0000 1.23 --- OrderFullfillAction.java 6 Oct 2006 20:12:10 -0000 1.24 *************** *** 6,10 **** import java.util.Collections; import java.util.Comparator; ! import java.util.Date; import java.util.Vector; import java.util.zip.ZipOutputStream; --- 6,10 ---- import java.util.Collections; import java.util.Comparator; ! import java.util.HashMap; import java.util.Vector; import java.util.zip.ZipOutputStream; *************** *** 19,24 **** import org.apache.turbine.util.db.Criteria; import org.apache.velocity.context.Context; - import org.openscience.nmrshiftdb.om.DBConditionPeer; import org.openscience.nmrshiftdb.om.DBLabGroupPeer; import org.openscience.nmrshiftdb.om.DBRawFile; import org.openscience.nmrshiftdb.om.DBSample; --- 19,25 ---- import org.apache.turbine.util.db.Criteria; import org.apache.velocity.context.Context; import org.openscience.nmrshiftdb.om.DBLabGroupPeer; + import org.openscience.nmrshiftdb.om.DBMachine; + import org.openscience.nmrshiftdb.om.DBMachinePeer; import org.openscience.nmrshiftdb.om.DBRawFile; import org.openscience.nmrshiftdb.om.DBSample; *************** *** 52,55 **** --- 53,59 ---- private void buildOrderContext(Context context, RunData data) throws Exception{ Criteria crit=new Criteria(); + Vector machines=DBMachinePeer.doSelect(crit); + context.put("machines",machines); + crit=new Criteria(); crit.addJoin(DBSamplePeer.USER_ID,NmrshiftdbUserPeer.USER_ID); crit.addJoin(NmrshiftdbUserPeer.LABGROUP,DBLabGroupPeer.LABGROUP_ID); *************** *** 57,73 **** crit.add(DBSamplePeer.FINISHED, "false"); crit.add(DBSamplePeer.PROCESS,OrderAction.WORKER); - crit.addJoin(DBSamplePeer.FIELD_STRENGTH, DBConditionPeer.CONDITION_ID); - crit.add(DBConditionPeer.CONDITION_TYPE_ID,"3"); - crit.add(DBConditionPeer.VALUE,"250"); crit.addDescendingOrderByColumn(DBSamplePeer.DATE); ! context.put("openorders250",DBSamplePeer.doSelect(crit)); ! crit.add(DBConditionPeer.VALUE,"300"); ! context.put("openorders300",DBSamplePeer.doSelect(crit)); ! crit.add(DBConditionPeer.VALUE,"400"); ! context.put("openorders400",DBSamplePeer.doSelect(crit)); ! crit.add(DBConditionPeer.VALUE,"500"); ! context.put("openorders500",DBSamplePeer.doSelect(crit)); ! crit.add(DBConditionPeer.VALUE,"600"); ! context.put("openorders600",DBSamplePeer.doSelect(crit)); context.put("data", data); context.put("submitorshow","submit"); --- 61,71 ---- crit.add(DBSamplePeer.FINISHED, "false"); crit.add(DBSamplePeer.PROCESS,OrderAction.WORKER); crit.addDescendingOrderByColumn(DBSamplePeer.DATE); ! HashMap openorders=new HashMap(); ! for(int i=0;i<machines.size();i++){ ! crit.add(DBSamplePeer.MACHINE,((DBMachine)machines.get(i)).getMachineId()); ! openorders.put(((DBMachine)machines.get(i)).getMachineId(),DBSamplePeer.doSelect(crit)); ! } ! context.put("openorders",openorders); context.put("data", data); context.put("submitorshow","submit"); |
|
From: Stefan K. <sh...@us...> - 2006-10-06 14:27:59
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17181/src/vmtemplates Modified Files: homeportlet.vm Log Message: some changes Index: homeportlet.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/homeportlet.vm,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** homeportlet.vm 6 Oct 2006 13:00:05 -0000 1.43 --- homeportlet.vm 6 Oct 2006 14:27:48 -0000 1.44 *************** *** 9,13 **** <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/links.html">Links</a><br> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/faq.html">FAQ</a><br> ! <a href="mailto:$!config.getString("mail.support")" tabindex="4">Contact</a><br> #if ($data.User.hasLoggedIn()) <a href="$link.setAction("LogoutUser")">$l10n.TOP_LOGOUT</a><br> --- 9,13 ---- <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/links.html">Links</a><br> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/faq.html">FAQ</a><br> ! <a href="mailto:$email" tabindex="4">Contact</a><br> #if ($data.User.hasLoggedIn()) <a href="$link.setAction("LogoutUser")">$l10n.TOP_LOGOUT</a><br> |
|
From: Stefan K. <sh...@us...> - 2006-10-06 14:27:59
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/conf/jetspeed/WEB-INF/templates/vm/navigations/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17181/src/conf/jetspeed/WEB-INF/templates/vm/navigations/html Modified Files: top.vm Log Message: some changes Index: top.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/conf/jetspeed/WEB-INF/templates/vm/navigations/html/top.vm,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** top.vm 23 Sep 2006 16:02:13 -0000 1.25 --- top.vm 6 Oct 2006 14:27:47 -0000 1.26 *************** *** 23,26 **** --- 23,27 ---- <td align=center class=MENUBUTTON><a href="$link.setPage("EditAccount");jsessionid=$data.getSession().getId()">Personal Page ($data.User.UserName)</a></td> <td align=center class=MENUBUTTON><NOBR> <a href="$link.setPage("ResetInterface")" tabindex="4">Reset User Interface</a> </NOBR></td> + <td align=center class=MENUBUTTON><a href="$link.setAction("LogoutUser")">$l10n.TOP_LOGOUT</a></td> </tr> </table> |
|
From: Stefan K. <sh...@us...> - 2006-10-06 14:27:56
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17181/src/vmtemplates/portlets/html Modified Files: user-order.vm Log Message: some changes Index: user-order.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html/user-order.vm,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** user-order.vm 6 Oct 2006 13:00:05 -0000 1.39 --- user-order.vm 6 Oct 2006 14:27:48 -0000 1.40 *************** *** 65,69 **** bgcolor="#D3D3D3" #end ! ><td><a href="portal/pane0/NMR+lab+administration;jsessionid=$data.getSession().getId()?submitorshow=show&id=$sample.getSampleId()">$sample.getUsersId()</a></td></tr> #end </table> --- 65,69 ---- bgcolor="#D3D3D3" #end ! ><td><a href="portal/pane0/NMR+lab+administration;jsessionid=$data.getSession().getId()?submitorshow=show&id=$sample.getSampleId()">$sample.getUsersId()</a> ($sample.getDate())</td></tr> #end </table> |
|
From: Stefan K. <sh...@us...> - 2006-10-06 14:27:56
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/daemons In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17181/src/java/org/openscience/nmrshiftdb/daemons Modified Files: BuildHomeDaemon.java Log Message: some changes Index: BuildHomeDaemon.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/daemons/BuildHomeDaemon.java,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -r1.51 -r1.52 *** BuildHomeDaemon.java 23 Aug 2006 14:04:55 -0000 1.51 --- BuildHomeDaemon.java 6 Oct 2006 14:27:47 -0000 1.52 *************** *** 98,101 **** --- 98,102 ---- } //lets make a Context and put thedata into it + context.put("email",GeneralUtils.getAdminEmail(servcon)); context.put("users", users); context.put("url","portal"); |
|
From: Stefan K. <sh...@us...> - 2006-10-06 14:27:53
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/util In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17181/src/java/org/openscience/nmrshiftdb/util Modified Files: UrlTool.java Log Message: some changes Index: UrlTool.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/util/UrlTool.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** UrlTool.java 22 May 2006 12:48:46 -0000 1.16 --- UrlTool.java 6 Oct 2006 14:27:48 -0000 1.17 *************** *** 5,8 **** --- 5,9 ---- import java.io.StringWriter; import java.net.URL; + import java.sql.ResultSet; import java.util.HashMap; import java.util.List; *************** *** 31,34 **** --- 32,36 ---- import org.openscience.nmrshiftdb.om.DBLabGroupPeer; import org.openscience.nmrshiftdb.om.DBMoleculePeer; + import org.openscience.nmrshiftdb.om.NmrshiftdbUser; import org.openscience.nmrshiftdb.om.NmrshiftdbUserPeer; *************** *** 158,163 **** public String getResetMessage() throws Exception { try{ ! NmrshiftdbUserPeer.executeStatement("update JETSPEED_USER_PROFILE set PROFILE =(select DISTINCT PROFILE from JETSPEED_ANON_PROFILE where MEDIA_TYPE ='html' and LANGUAGE ='en' and PAGE='default.psml') where USER_NAME ='" + data.getUser().getUserName() + "' and MEDIA_TYPE='html';"); ! return ("The user interface has been reset to initial configuration!"); }catch(Exception ex){ return(GeneralUtils.logError(ex,"reset user interface user "+data.getUser().getUserName(),data,true)); --- 160,173 ---- public String getResetMessage() throws Exception { try{ ! if(((NmrshiftdbUser)data.getUser()).isLabgroupUser(data)){ ! Vector rs=NmrshiftdbUserPeer.executeQuery("select DISTINCT PROFILE from JETSPEED_USER_PROFILE where MEDIA_TYPE ='html' and PAGE='default.psml' and USER_NAME='testuser'"); ! NmrshiftdbUserPeer.executeStatement("update JETSPEED_USER_PROFILE set PROFILE ='"+((Record)rs.get(0)).getValue(1)+"' where USER_NAME ='" + data.getUser().getUserName() + "' and MEDIA_TYPE='html';"); ! }else if(((NmrshiftdbUser)data.getUser()).isLabgroupUser(data)){ ! Vector rs=NmrshiftdbUserPeer.executeQuery("select DISTINCT PROFILE from JETSPEED_USER_PROFILE where MEDIA_TYPE ='html' and PAGE='default.psml' and USER_NAME='testworker'"); ! NmrshiftdbUserPeer.executeStatement("update JETSPEED_USER_PROFILE set PROFILE ='"+((Record)rs.get(0)).getValue(1)+"' where USER_NAME ='" + data.getUser().getUserName() + "' and MEDIA_TYPE='html';"); ! }else{ ! NmrshiftdbUserPeer.executeStatement("update JETSPEED_USER_PROFILE set PROFILE =(select DISTINCT PROFILE from JETSPEED_ANON_PROFILE where MEDIA_TYPE ='html' and LANGUAGE ='en' and PAGE='default.psml') where USER_NAME ='" + data.getUser().getUserName() + "' and MEDIA_TYPE='html';"); ! } ! return ("The user interface has been reset to initial configuration!"); }catch(Exception ex){ return(GeneralUtils.logError(ex,"reset user interface user "+data.getUser().getUserName(),data,true)); |
|
From: Stefan K. <sh...@us...> - 2006-10-06 13:00:18
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13604/src/java/org/openscience/nmrshiftdb/modules/actions/portlets Modified Files: OrderAction.java OrderFullfillAction.java Log Message: the time for the done orders can be set Index: OrderAction.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets/OrderAction.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** OrderAction.java 23 Sep 2006 22:10:44 -0000 1.26 --- OrderAction.java 6 Oct 2006 13:00:04 -0000 1.27 *************** *** 5,10 **** --- 5,14 ---- import java.io.FileWriter; import java.io.StringReader; + import java.text.SimpleDateFormat; + import java.util.Calendar; import java.util.Collections; import java.util.Date; + import java.util.GregorianCalendar; + import java.util.Locale; import java.util.Vector; import java.util.zip.ZipOutputStream; *************** *** 99,104 **** Vector v=DBSamplePeer.doSelect(crit); Vector v3=new Vector(); for(int i=0;i<v.size();i++){ ! sql="select distinct SAMPLE.SAMPLE_ID from SAMPLE join RAW_FILE using(SAMPLE_ID) left join RAW_FILE_SPECTRUM using (RAW_FILE_ID) where SAMPLE.SAMPLE_ID ="+((DBSample)v.get(i)).getSampleId()+" and RAW_FILE_SPECTRUM.SPECTRUM_ID is null"; Vector v4=DBSamplePeer.executeQuery(sql); if(v4.size()>0) --- 103,122 ---- Vector v=DBSamplePeer.doSelect(crit); Vector v3=new Vector(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd", Locale.US); + Date end=(Date)data.getSession().getAttribute("end"); + if(end==null){ + end=new Date(); + data.getSession().setAttribute("end",end); + } + Date start=(Date)data.getSession().getAttribute("start"); + if(start==null){ + long millis=System.currentTimeMillis(); + start=new Date(millis-(7*24*60*60*1000)); + data.getSession().setAttribute("start",start); + } + context.put("start",start); + context.put("end",end); for(int i=0;i<v.size();i++){ ! sql="select distinct SAMPLE.SAMPLE_ID from SAMPLE join RAW_FILE using(SAMPLE_ID) left join RAW_FILE_SPECTRUM using (RAW_FILE_ID) where SAMPLE.SAMPLE_ID ="+((DBSample)v.get(i)).getSampleId()+" and RAW_FILE_SPECTRUM.SPECTRUM_ID is null and SAMPLE.DATE>='"+formatter.format(start)+"' and SAMPLE.DATE<='"+formatter.format(end)+"'"; Vector v4=DBSamplePeer.executeQuery(sql); if(v4.size()>0) *************** *** 212,217 **** --- 230,272 ---- context.put("typesc",getTypesC()); context.put("typesh",getTypesH()); + Vector days=new Vector(); + for (int i=1;i<32;i++){ + days.add(new Integer(i)); + } + context.put("days",days ); + Vector months=new Vector(); + for (int i=1;i<13;i++){ + months.add(new Integer(i)); + } + context.put("months",months ); + Vector years=new Vector(); + for (int i=2000;i<=new Date().getYear()+1900;i++){ + years.add(new Integer(i)); + } + context.put("years",years ); } } + + + public void doChangedates(RunData data, Context context) throws Exception { + try{ + Date start=new Date(); + start.setDate(Integer.parseInt(data.getParameters().get("fromday"))); + start.setMonth(Integer.parseInt(data.getParameters().get("frommonth"))-1); + start.setYear(Integer.parseInt(data.getParameters().get("fromyear"))-1900); + data.getSession().setAttribute("start",start); + Date end=new Date(); + end.setDate(Integer.parseInt(data.getParameters().get("today"))); + end.setMonth(Integer.parseInt(data.getParameters().get("tomonth"))-1); + end.setYear(Integer.parseInt(data.getParameters().get("toyear"))-1900); + data.getSession().setAttribute("end",end); + buildOrderContext(context,data); + } + catch(Exception ex){ + ex.printStackTrace(); + GeneralUtils.logError(ex,"guestbook/doentry",data,true); + } + } + Index: OrderFullfillAction.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets/OrderFullfillAction.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** OrderFullfillAction.java 23 Sep 2006 22:10:44 -0000 1.22 --- OrderFullfillAction.java 6 Oct 2006 13:00:04 -0000 1.23 *************** *** 6,9 **** --- 6,10 ---- import java.util.Collections; import java.util.Comparator; + import java.util.Date; import java.util.Vector; import java.util.zip.ZipOutputStream; *************** *** 138,141 **** --- 139,143 ---- } + public void doSubmitdelete(RunData data, Context context) throws Exception { try{ |
|
From: Stefan K. <sh...@us...> - 2006-10-06 13:00:18
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13604/src/vmtemplates Modified Files: homeportlet.vm Log Message: the time for the done orders can be set Index: homeportlet.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/homeportlet.vm,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** homeportlet.vm 23 Sep 2006 16:02:13 -0000 1.42 --- homeportlet.vm 6 Oct 2006 13:00:05 -0000 1.43 *************** *** 8,12 **** <a href="http://almost.cubic.uni-koeln.de/nmrshiftdb.names.html">Static name list</a><br> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/links.html">Links</a><br> ! <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/faq.html">FAQ</a><br><br> <a href="mailto:$!config.getString("mail.support")" tabindex="4">Contact</a><br> #if ($data.User.hasLoggedIn()) --- 8,12 ---- <a href="http://almost.cubic.uni-koeln.de/nmrshiftdb.names.html">Static name list</a><br> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/links.html">Links</a><br> ! <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/faq.html">FAQ</a><br> <a href="mailto:$!config.getString("mail.support")" tabindex="4">Contact</a><br> #if ($data.User.hasLoggedIn()) |
|
From: Stefan K. <sh...@us...> - 2006-10-06 13:00:15
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13604/src/java/org/openscience/nmrshiftdb Modified Files: AdminPanel.java Log Message: the time for the done orders can be set Index: AdminPanel.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/AdminPanel.java,v retrieving revision 1.232 retrieving revision 1.233 diff -C2 -r1.232 -r1.233 *** AdminPanel.java 29 Aug 2006 16:10:04 -0000 1.232 --- AdminPanel.java 6 Oct 2006 13:00:04 -0000 1.233 *************** *** 35,42 **** --- 35,45 ---- import libsvm.svm_train; + import org.apache.jetspeed.services.JetspeedSecurity; + import org.apache.jetspeed.services.rundata.DefaultJetspeedRunData; import org.apache.log4j.Category; import org.apache.log4j.FileAppender; import org.apache.log4j.SimpleLayout; import org.apache.turbine.om.NumberKey; + import org.apache.turbine.om.security.User; import org.apache.turbine.services.db.TurbineDB; import org.apache.turbine.util.Log; *************** *** 994,1003 **** DBConnection dbconn = TurbineDB.getConnection(); Statement stmt = dbconn.createStatement(); ! ResultSet rs = stmt.executeQuery("select SPECTRUM_ID, COMMENT from SPECTRUM;"); FileOutputStream fos=new FileOutputStream("/tmp/gr.sql"); while (rs.next()) { fos.write(new String("update SPECTRUM set COMMENT='"+GeneralUtils.escape(rs.getString(2))+"' where SPECTRUM_ID="+rs.getInt(1)+";\r\n").getBytes()); } ! fos.close(); /*ResultSet rs = stmt.executeQuery("select MOLECULE_ID from MOLECULE;"); int errors=0; --- 997,1013 ---- DBConnection dbconn = TurbineDB.getConnection(); Statement stmt = dbconn.createStatement(); ! ResultSet rs = stmt.executeQuery("select LOGIN_NAME,FIRST_NAME,LAST_NAME,ADDRESS,CITY from TURBINE_USER where FIRST_NAME=LAST_NAME;"); ! while (rs.next()){ ! if (warn(rs.getString(2)+" "+rs.getString(3)+" "+rs.getString(4)+" "+rs.getString(5)+" delete?", new BufferedReader(new InputStreamReader(System.in)))) { ! User user = JetspeedSecurity.getUser(rs.getString(1)); ! JetspeedSecurity.removeUser(user, new DefaultJetspeedRunData()); ! } ! } ! /*ResultSet rs = stmt.executeQuery("select SPECTRUM_ID, COMMENT from SPECTRUM;"); FileOutputStream fos=new FileOutputStream("/tmp/gr.sql"); while (rs.next()) { fos.write(new String("update SPECTRUM set COMMENT='"+GeneralUtils.escape(rs.getString(2))+"' where SPECTRUM_ID="+rs.getInt(1)+";\r\n").getBytes()); } ! fos.close();*/ /*ResultSet rs = stmt.executeQuery("select MOLECULE_ID from MOLECULE;"); int errors=0; |
|
From: Stefan K. <sh...@us...> - 2006-10-06 13:00:14
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13604/src/vmtemplates/portlets/html Modified Files: user-order.vm worker-order.vm Log Message: the time for the done orders can be set Index: user-order.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html/user-order.vm,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** user-order.vm 23 Sep 2006 22:10:44 -0000 1.38 --- user-order.vm 6 Oct 2006 13:00:05 -0000 1.39 *************** *** 69,72 **** --- 69,107 ---- </table> #end + <form name="orderform" method="post" action="portal/pane0/NMR+lab+administration"> + Show orders from + <select name="fromday" size="1"> + #foreach($day in $days) + <option value="$day" #if($day==$start.getDate()) selected #end>$day</option> + #end + </select> + <select name="frommonth" size="1"> + #foreach($day in $months) + <option value="$day" #if($day==$start.getMonth()+1) selected #end>$day</option> + #end + </select> + <select name="fromyear" size="1"> + #foreach($day in $years) + <option value="$day" #if($day==$start.getYear()+1900) selected #end>$day</option> + #end + </select> + to + <select name="today" size="1"> + #foreach($day in $days) + <option value="$day" #if($day==$end.getDate()) selected #end>$day</option> + #end + </select> + <select name="tomonth" size="1"> + #foreach($day in $months) + <option value="$day" #if($day==$end.getMonth()+1) selected #end>$day</option> + #end + </select> + <select name="toyear" size="1"> + #foreach($day in $years) + <option value="$day" #if($day==$end.getYear()+1900) selected #end>$day</option> + #end + </select> + <input type="submit" name="eventSubmit_doChangedates" value="Change dates"/> + </form> </td> </tr> Index: worker-order.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html/worker-order.vm,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** worker-order.vm 23 Sep 2006 22:10:44 -0000 1.18 --- worker-order.vm 6 Oct 2006 13:00:05 -0000 1.19 *************** *** 8,12 **** #else The following orders for your labgroup wait to be fullfilled: ! <table border="3" rules="cols">><tr><td align="left" valign="top"> <table> <tr><th>250 MHz</th></tr> --- 8,12 ---- #else The following orders for your labgroup wait to be fullfilled: ! <table border="3" rules="cols"><tr><td align="left" valign="top"> <table> <tr><th>250 MHz</th></tr> |
|
From: Stefan K. <sh...@us...> - 2006-09-23 22:10:55
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12776/src/java/org/openscience/nmrshiftdb/modules/actions/portlets Modified Files: OrderAction.java OrderFullfillAction.java Log Message: no arrows after files Index: OrderAction.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets/OrderAction.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** OrderAction.java 21 Sep 2006 12:22:11 -0000 1.25 --- OrderAction.java 23 Sep 2006 22:10:44 -0000 1.26 *************** *** 177,180 **** --- 177,181 ---- local.add("portal/pane0/NMR+lab+administration?nmrshiftdbaction=browseto&filename="+filesindir[i].getName()+"&submitorshow=show&id="+toshow.getSampleId()); files.add(local); + local.add(new Boolean(filesindir[i].isFile())); } Collections.sort(files, new OrderFullfillAction.LocalComparator()); *************** *** 185,188 **** --- 186,190 ---- local.add("portal/pane0/NMR+lab+administration?nmrshiftdbaction=browseto&filename=..&submitorshow=show&id="+toshow.getSampleId()); files.add(local); + local.add(new Boolean(true)); } context.put("files",files); *************** *** 335,338 **** --- 337,341 ---- for(int i=0;i<v.size();i++){ GeneralUtils.zipDir(((File)v.get(i)), zipout,new File(GeneralUtils.getNmrshiftdbProperty("rawfiledirectory",data))); + GeneralUtils.alreadyAttached.clear(); attachedfiles.append(((File)v.get(i)).getName()+"; "); } Index: OrderFullfillAction.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/modules/actions/portlets/OrderFullfillAction.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** OrderFullfillAction.java 21 Sep 2006 12:22:11 -0000 1.21 --- OrderFullfillAction.java 23 Sep 2006 22:10:44 -0000 1.22 *************** *** 122,125 **** --- 122,126 ---- local.add(filesindir[i].getName()); local.add("portal/pane0/NMR+lab+administration?nmrshiftdbaction=browseto&filename="+filesindir[i].getName()+"&submitorshow=show&id="+toshow.getSampleId()); + local.add(new Boolean(filesindir[i].isFile())); files.add(local); } *************** *** 130,133 **** --- 131,135 ---- local.add(".."); local.add("portal/pane0/NMR+lab+administration?nmrshiftdbaction=browseto&filename=..&submitorshow=show&id="+toshow.getSampleId()); + local.add(new Boolean(true)); files.add(local); } *************** *** 168,171 **** --- 170,174 ---- for(int i=0;i<v.size();i++){ GeneralUtils.zipDir(((File)v.get(i)), zipout,new File(GeneralUtils.getNmrshiftdbProperty("rawfiledirectory",data))); + GeneralUtils.alreadyAttached.clear(); attachedfiles.append(((File)v.get(i)).getName()+"; "); } |
|
From: Stefan K. <sh...@us...> - 2006-09-23 22:10:54
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12776/src/vmtemplates/portlets/html Modified Files: user-order.vm worker-order.vm Log Message: no arrows after files Index: user-order.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html/user-order.vm,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** user-order.vm 21 Sep 2006 12:22:12 -0000 1.37 --- user-order.vm 23 Sep 2006 22:10:44 -0000 1.38 *************** *** 223,227 **** <table><tr><td> #foreach($file in $files) ! <a href="$file.get(0)">$file.get(1)</a> <a href="$file.get(2)">>>>></a><br> #set($test=$velocityCount % 50) #if($test==0) --- 223,227 ---- <table><tr><td> #foreach($file in $files) ! <a href="$file.get(0)">$file.get(1)</a> #if($file.get(3)) <a href="$file.get(2)">>>>></a> #end <br> #set($test=$velocityCount % 50) #if($test==0) Index: worker-order.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/portlets/html/worker-order.vm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** worker-order.vm 21 Sep 2006 12:22:13 -0000 1.17 --- worker-order.vm 23 Sep 2006 22:10:44 -0000 1.18 *************** *** 97,101 **** <table><tr><td> #foreach($file in $files) ! <a href="$file.get(0)">$file.get(1)</a> <a href="$file.get(2)">>>>></a><br> #set($test=$velocityCount % 50) #if($test==0) --- 97,101 ---- <table><tr><td> #foreach($file in $files) ! <a href="$file.get(0)">$file.get(1)</a> #if($file.get(3)) <a href="$file.get(2)">>>>></a> #end <br> #set($test=$velocityCount % 50) #if($test==0) |
|
From: Stefan K. <sh...@us...> - 2006-09-23 22:10:50
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/util In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12776/src/java/org/openscience/nmrshiftdb/util Modified Files: GeneralUtils.java Log Message: no arrows after files Index: GeneralUtils.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/util/GeneralUtils.java,v retrieving revision 1.186 retrieving revision 1.187 diff -C2 -r1.186 -r1.187 *** GeneralUtils.java 29 Aug 2006 16:10:05 -0000 1.186 --- GeneralUtils.java 23 Sep 2006 22:10:44 -0000 1.187 *************** *** 149,152 **** --- 149,155 ---- static GeneralUtils instance=new GeneralUtils(); + //attention - problem with static + public static Vector alreadyAttached=new Vector(); + /** *Constructor for the GeneralUtils object (private since only static methods) *************** *** 1844,1857 **** int bytesIn = 0; byte[] readBuffer = new byte[2156]; ! FileInputStream fis = new FileInputStream(zipDir); ! ZipEntry anEntry = new ZipEntry(zipDir.getPath()); ! //place the zip entry in the ZipOutputStream object ! zos.putNextEntry(anEntry); ! //now write the content of the file to the ZipOutputStream ! while ((bytesIn = fis.read(readBuffer)) != -1) { ! zos.write(readBuffer, 0, bytesIn); } - //close the Stream - fis.close(); }else{ //get a listing of the directory content --- 1847,1863 ---- int bytesIn = 0; byte[] readBuffer = new byte[2156]; ! if(!alreadyAttached.contains(zipDir.getPath())){ ! FileInputStream fis = new FileInputStream(zipDir); ! ZipEntry anEntry = new ZipEntry(zipDir.getPath()); ! alreadyAttached.add(zipDir.getPath()); ! //place the zip entry in the ZipOutputStream object ! zos.putNextEntry(anEntry); ! //now write the content of the file to the ZipOutputStream ! while ((bytesIn = fis.read(readBuffer)) != -1) { ! zos.write(readBuffer, 0, bytesIn); ! } ! //close the Stream ! fis.close(); } }else{ //get a listing of the directory content *************** *** 1870,1885 **** continue; } ! //if we reached here, the File object f was not a directory ! //create a FileInputStream on top of f ! FileInputStream fis = new FileInputStream(f); ! ZipEntry anEntry = new ZipEntry(getRelativePath(rawdatadir,f)); ! //place the zip entry in the ZipOutputStream object ! zos.putNextEntry(anEntry); ! //now write the content of the file to the ZipOutputStream ! while ((bytesIn = fis.read(readBuffer)) != -1) { ! zos.write(readBuffer, 0, bytesIn); } - //close the Stream - fis.close(); } } --- 1876,1894 ---- continue; } ! if(!alreadyAttached.contains(getRelativePath(rawdatadir,f))){ ! //if we reached here, the File object f was not a directory ! //create a FileInputStream on top of f ! FileInputStream fis = new FileInputStream(f); ! ZipEntry anEntry = new ZipEntry(getRelativePath(rawdatadir,f)); ! alreadyAttached.add(getRelativePath(rawdatadir,f)); ! //place the zip entry in the ZipOutputStream object ! zos.putNextEntry(anEntry); ! //now write the content of the file to the ZipOutputStream ! while ((bytesIn = fis.read(readBuffer)) != -1) { ! zos.write(readBuffer, 0, bytesIn); ! } ! //close the Stream ! fis.close(); } } } |
|
From: Stefan K. <sh...@us...> - 2006-09-23 16:02:20
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/conf/jetspeed/WEB-INF/templates/vm/navigations/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26307/src/conf/jetspeed/WEB-INF/templates/vm/navigations/html Modified Files: top.vm Log Message: changes suggested by sab Index: top.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/conf/jetspeed/WEB-INF/templates/vm/navigations/html/top.vm,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** top.vm 27 Jun 2006 14:29:17 -0000 1.24 --- top.vm 23 Sep 2006 16:02:13 -0000 1.25 *************** *** 11,26 **** </table> </td> ! <td rowspan=2><img src="images/blank.gif" width=60 height=1></td> <td align="left" width="100%"> <FONT class=welcome>Welcome to NMRShiftDB</font><br/> ## <sup>Logged in since: $!data.getUser().getLastLogin()</sup> </td> - <td align=center> - <table cellpadding=1 cellspacing=3 border=0 width=100%> - <tr> - <td align=center class=MENUBUTTON><NOBR> <a href="$link.setPage("ResetInterface")" tabindex="4">Reset User Interface</a> </NOBR></td><td align=center class=MENUBUTTON><NOBR> <a href="mailto:$!config.getString("mail.support")" tabindex="4">Contact</a> </NOBR></td> - </tr> - </table> - </td> </tr> <tr> --- 11,19 ---- </table> </td> ! <td rowspan=3><img src="images/blank.gif" width=60 height=1></td> <td align="left" width="100%"> <FONT class=welcome>Welcome to NMRShiftDB</font><br/> ## <sup>Logged in since: $!data.getUser().getLastLogin()</sup> </td> </tr> <tr> *************** *** 29,33 **** <tr> <td align=center class=MENUBUTTON><a href="$link.setPage("EditAccount");jsessionid=$data.getSession().getId()">Personal Page ($data.User.UserName)</a></td> ! <td align=center class=MENUBUTTON><a href="$link.setAction("LogoutUser")">$l10n.TOP_LOGOUT</a></td> </tr> </table> --- 22,26 ---- <tr> <td align=center class=MENUBUTTON><a href="$link.setPage("EditAccount");jsessionid=$data.getSession().getId()">Personal Page ($data.User.UserName)</a></td> ! <td align=center class=MENUBUTTON><NOBR> <a href="$link.setPage("ResetInterface")" tabindex="4">Reset User Interface</a> </NOBR></td> </tr> </table> *************** *** 74,80 **** <td align=center class=MENUBUTTON><NOBR> <a href="$link.setPage("RememberPassword")">Forgot password?</a> </NOBR></td> </tr> - <tr> - <td align=center class=MENUBUTTON><NOBR> <a href="mailto:$!config.getString("mail.support")" tabindex="4">Contact</a> </NOBR></td> - </tr> </table> </td> --- 67,70 ---- |
|
From: Stefan K. <sh...@us...> - 2006-09-23 16:02:20
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26307/src/vmtemplates Modified Files: homeportlet.vm Log Message: changes suggested by sab Index: homeportlet.vm =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/vmtemplates/homeportlet.vm,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** homeportlet.vm 23 Aug 2006 14:04:55 -0000 1.41 --- homeportlet.vm 23 Sep 2006 16:02:13 -0000 1.42 *************** *** 3,9 **** <td width="200"> <h2 style="color:#0000AA">NMRShiftDB Links</h2> - <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=t1.html#about">About NMRShiftDB</a><br> <a href="http://sourceforge.net/projects/nmrshiftdb" target="_blank">Developers' page</a><br> - <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()">Help</a><br> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/sponsoring.html">Sponsoring</a><br> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/clippings">Media coverage</a><br> --- 3,7 ---- *************** *** 11,14 **** --- 9,16 ---- <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/links.html">Links</a><br> <a href="portal/pane0/Help;jsessionid=$data.getSession().getId()?URL=http://nmrshiftdb.sf.net/faq.html">FAQ</a><br><br> + <a href="mailto:$!config.getString("mail.support")" tabindex="4">Contact</a><br> + #if ($data.User.hasLoggedIn()) + <a href="$link.setAction("LogoutUser")">$l10n.TOP_LOGOUT</a><br> + #end #parse("halloffame.vm") <h2 style="color:#0000AA">NMRShiftDB Servers</h2> |
|
From: Stefan K. <sh...@us...> - 2006-09-22 16:30:39
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/daemons In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9931/src/java/org/openscience/nmrshiftdb/daemons Modified Files: AssignRobotDaemon.java Log Message: more robot stuff Index: AssignRobotDaemon.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/daemons/AssignRobotDaemon.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** AssignRobotDaemon.java 22 Sep 2006 15:44:55 -0000 1.6 --- AssignRobotDaemon.java 22 Sep 2006 16:30:35 -0000 1.7 *************** *** 64,67 **** --- 64,68 ---- private void searchfiles(File tolookin, String usersid, ZipOutputStream zipoutputstream, StringBuffer attachedfiles, File dirtoignore) throws IOException{ File[] filesindir=tolookin.listFiles(); + //System.err.println("search "+tolookin+" "+usersid+" "+filesindir[0].getName()); if(filesindir!=null){ for(int i=0;i<filesindir.length;i++){ *************** *** 88,91 **** --- 89,93 ---- private void addfiles(File toadd, ZipOutputStream zipoutputstream, StringBuffer attachedfiles) throws IOException{ File[] filesindir=toadd.listFiles(); + //System.err.println("add "+toadd); if(filesindir!=null){ for(int i=0;i<filesindir.length;i++){ *************** *** 93,97 **** addfiles(filesindir[i],zipoutputstream,attachedfiles); }else if(filesindir[i].isFile()){ ! zipoutputstream.putNextEntry(new ZipEntry(toadd.getName()+"/"+filesindir[i].getName())); FileInputStream fis=new FileInputStream(filesindir[i]); int read=0; --- 95,99 ---- addfiles(filesindir[i],zipoutputstream,attachedfiles); }else if(filesindir[i].isFile()){ ! zipoutputstream.putNextEntry(new ZipEntry(toadd+"/"+filesindir[i].getName())); FileInputStream fis=new FileInputStream(filesindir[i]); int read=0; |
|
From: Stefan K. <sh...@us...> - 2006-09-22 15:44:58
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/daemons In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23708/src/java/org/openscience/nmrshiftdb/daemons Modified Files: AssignRobotDaemon.java Log Message: avoids npe (hopefully) Index: AssignRobotDaemon.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/daemons/AssignRobotDaemon.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** AssignRobotDaemon.java 22 Sep 2006 10:56:34 -0000 1.5 --- AssignRobotDaemon.java 22 Sep 2006 15:44:55 -0000 1.6 *************** *** 64,84 **** private void searchfiles(File tolookin, String usersid, ZipOutputStream zipoutputstream, StringBuffer attachedfiles, File dirtoignore) throws IOException{ File[] filesindir=tolookin.listFiles(); ! for(int i=0;i<filesindir.length;i++){ ! if(filesindir[i].isDirectory() && filesindir[i].getName().indexOf(usersid)!=0 && !filesindir[i].getName().equals(".") && !filesindir[i].getName().equals("..") && !filesindir[i].equals(dirtoignore)){ ! searchfiles(filesindir[i],usersid,zipoutputstream,attachedfiles, dirtoignore); ! }else if(filesindir[i].isDirectory() && filesindir[i].getName().indexOf(usersid)==0){ ! addfiles(filesindir[i], zipoutputstream, attachedfiles); ! }else{ ! if(filesindir[i].getName().indexOf(usersid)==0){ ! zipoutputstream.putNextEntry(new ZipEntry(filesindir[i].getName())); ! FileInputStream fis=new FileInputStream(filesindir[i]); ! int read=0; ! while((read=fis.read())!=-1){ ! zipoutputstream.write(read); ! } ! attachedfiles.append(filesindir[i]+"; "); ! zipoutputstream.closeEntry(); ! } ! } } } --- 64,86 ---- private void searchfiles(File tolookin, String usersid, ZipOutputStream zipoutputstream, StringBuffer attachedfiles, File dirtoignore) throws IOException{ File[] filesindir=tolookin.listFiles(); ! if(filesindir!=null){ ! for(int i=0;i<filesindir.length;i++){ ! if(filesindir[i].isDirectory() && filesindir[i].getName().indexOf(usersid)!=0 && !filesindir[i].getName().equals(".") && !filesindir[i].getName().equals("..") && !filesindir[i].equals(dirtoignore)){ ! searchfiles(filesindir[i],usersid,zipoutputstream,attachedfiles, dirtoignore); ! }else if(filesindir[i].isDirectory() && filesindir[i].getName().indexOf(usersid)==0){ ! addfiles(filesindir[i], zipoutputstream, attachedfiles); ! }else{ ! if(filesindir[i].getName().indexOf(usersid)==0){ ! zipoutputstream.putNextEntry(new ZipEntry(filesindir[i].getName())); ! FileInputStream fis=new FileInputStream(filesindir[i]); ! int read=0; ! while((read=fis.read())!=-1){ ! zipoutputstream.write(read); ! } ! attachedfiles.append(filesindir[i]+"; "); ! zipoutputstream.closeEntry(); ! } ! } ! } } } *************** *** 86,102 **** private void addfiles(File toadd, ZipOutputStream zipoutputstream, StringBuffer attachedfiles) throws IOException{ File[] filesindir=toadd.listFiles(); ! for(int i=0;i<filesindir.length;i++){ ! if(filesindir[i].isDirectory() && !filesindir[i].getName().equals(".") && !filesindir[i].getName().equals("..")){ ! addfiles(filesindir[i],zipoutputstream,attachedfiles); ! }else{ ! zipoutputstream.putNextEntry(new ZipEntry(toadd.getName()+"/"+filesindir[i].getName())); ! FileInputStream fis=new FileInputStream(filesindir[i]); ! int read=0; ! while((read=fis.read())!=-1){ ! zipoutputstream.write(read); ! } ! attachedfiles.append(filesindir[i]+"; "); ! zipoutputstream.closeEntry(); ! } } } --- 88,106 ---- private void addfiles(File toadd, ZipOutputStream zipoutputstream, StringBuffer attachedfiles) throws IOException{ File[] filesindir=toadd.listFiles(); ! if(filesindir!=null){ ! for(int i=0;i<filesindir.length;i++){ ! if(filesindir[i].isDirectory() && !filesindir[i].getName().equals(".") && !filesindir[i].getName().equals("..")){ ! addfiles(filesindir[i],zipoutputstream,attachedfiles); ! }else if(filesindir[i].isFile()){ ! zipoutputstream.putNextEntry(new ZipEntry(toadd.getName()+"/"+filesindir[i].getName())); ! FileInputStream fis=new FileInputStream(filesindir[i]); ! int read=0; ! while((read=fis.read())!=-1){ ! zipoutputstream.write(read); ! } ! attachedfiles.append(filesindir[i]+"; "); ! zipoutputstream.closeEntry(); ! } ! } } } |
|
From: Stefan K. <sh...@us...> - 2006-09-22 10:56:36
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/conf/jetspeed/WEB-INF/conf In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3306/src/conf/jetspeed/WEB-INF/conf Modified Files: JetspeedResources.properties NMRShiftDB.properties Log Message: still the robot stuff Index: JetspeedResources.properties =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/conf/jetspeed/WEB-INF/conf/JetspeedResources.properties,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** JetspeedResources.properties 11 Sep 2006 14:21:16 -0000 1.23 --- JetspeedResources.properties 22 Sep 2006 10:56:33 -0000 1.24 *************** *** 216,220 **** #daemon.entry=buildsdf daemon.entry=buildsvm ! #daemon.entry=robotdaemon daemon.feeddaemon.classname=org.apache.jetspeed.daemon.impl.FeedDaemon --- 216,220 ---- #daemon.entry=buildsdf daemon.entry=buildsvm ! daemon.entry=robotdaemon daemon.feeddaemon.classname=org.apache.jetspeed.daemon.impl.FeedDaemon Index: NMRShiftDB.properties =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/conf/jetspeed/WEB-INF/conf/NMRShiftDB.properties,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -r1.50 -r1.51 *** NMRShiftDB.properties 11 Sep 2006 14:21:16 -0000 1.50 --- NMRShiftDB.properties 22 Sep 2006 10:56:33 -0000 1.51 *************** *** 32,36 **** rawfiledirectoryuser=/home/shk3 #A directory where raw files can be found for robot assignment ! rawfiledirectoryrobot=/home/shk3 #A directoy where to put compressed raw files for download compressedfiledirectory=/home/shk3 --- 32,36 ---- rawfiledirectoryuser=/home/shk3 #A directory where raw files can be found for robot assignment ! rawfiledirectoryrobot=/home/shk3/packtest #A directoy where to put compressed raw files for download compressedfiledirectory=/home/shk3 |
|
From: Stefan K. <sh...@us...> - 2006-09-22 10:56:36
|
Update of /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/daemons In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3306/src/java/org/openscience/nmrshiftdb/daemons Modified Files: AssignRobotDaemon.java Log Message: still the robot stuff Index: AssignRobotDaemon.java =================================================================== RCS file: /cvsroot/nmrshiftdb/nmrshiftdb/src/java/org/openscience/nmrshiftdb/daemons/AssignRobotDaemon.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** AssignRobotDaemon.java 22 Sep 2006 09:26:28 -0000 1.4 --- AssignRobotDaemon.java 22 Sep 2006 10:56:34 -0000 1.5 *************** *** 64,68 **** private void searchfiles(File tolookin, String usersid, ZipOutputStream zipoutputstream, StringBuffer attachedfiles, File dirtoignore) throws IOException{ File[] filesindir=tolookin.listFiles(); - System.err.println("search "+tolookin+" "+usersid+" "+filesindir[0].getName()); for(int i=0;i<filesindir.length;i++){ if(filesindir[i].isDirectory() && filesindir[i].getName().indexOf(usersid)!=0 && !filesindir[i].getName().equals(".") && !filesindir[i].getName().equals("..") && !filesindir[i].equals(dirtoignore)){ --- 64,67 ---- *************** *** 86,90 **** private void addfiles(File toadd, ZipOutputStream zipoutputstream, StringBuffer attachedfiles) throws IOException{ - System.err.println("add "+toadd); File[] filesindir=toadd.listFiles(); for(int i=0;i<filesindir.length;i++){ --- 85,88 ---- *************** *** 92,96 **** addfiles(filesindir[i],zipoutputstream,attachedfiles); }else{ ! zipoutputstream.putNextEntry(new ZipEntry(filesindir[i].getName())); FileInputStream fis=new FileInputStream(filesindir[i]); int read=0; --- 90,94 ---- addfiles(filesindir[i],zipoutputstream,attachedfiles); }else{ ! zipoutputstream.putNextEntry(new ZipEntry(toadd.getName()+"/"+filesindir[i].getName())); FileInputStream fis=new FileInputStream(filesindir[i]); int read=0; |