use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method delete.
/**
* Insert the method's description here.
* Creation date: (11/28/00 5:43:44 PM)
* @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
*/
public void delete(GeometryInfo geometryInfo) throws DataAccessException {
try {
//
// delete from database
//
sessionManager.getUserMetaDbServer().deleteGeometry(geometryInfo.getVersion().getVersionKey());
//
// delete Geometry from cache and GeometryInfo from geometryInfo list
//
xmlHash.remove(geometryInfo.getVersion().getVersionKey());
geoInfoHash.remove(geometryInfo.getVersion().getVersionKey());
fireDatabaseDelete(new DatabaseEvent(this, DatabaseEvent.DELETE, geometryInfo, null));
} catch (RemoteProxyException e) {
handleRemoteProxyException(e);
throw new DataAccessException(e.getMessage());
}
}
use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method setGroupPrivate.
/**
* Insert the method's description here.
* Creation date: (11/28/00 5:43:44 PM)
* @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
*/
public BioModelInfo setGroupPrivate(BioModelInfo bioModelInfo) throws DataAccessException {
try {
//
// unpublish from database
//
BioModelInfo newBioModelInfo = (BioModelInfo) setGroupPrivate0(bioModelInfo, VersionableType.BioModelMetaData, bioModelInfoHash);
//
// delete BioModelMetaData from cache
//
xmlHash.remove(bioModelInfo.getVersion().getVersionKey());
fireDatabaseUpdate(new DatabaseEvent(this, DatabaseEvent.UPDATE, bioModelInfo, newBioModelInfo));
return newBioModelInfo;
} catch (RemoteProxyException e) {
handleRemoteProxyException(e);
throw new DataAccessException(e.getMessage());
}
}
use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method delete.
/**
* Insert the method's description here.
* Creation date: (3/26/2001 11:26:16 PM)
* @param bioModelInfo cbit.vcell.mathmodel.MathModelInfo
*/
public void delete(MathModelInfo mathModelInfo) throws DataAccessException {
try {
// MathModelMetaData mathModelMetaData = getMathModelMetaData(mathModelInfo);
//
// delete from database
//
sessionManager.getUserMetaDbServer().deleteMathModel(mathModelInfo.getVersion().getVersionKey());
//
// delete MathModel from cache and MathModelInfo from mathModelInfo list
//
xmlHash.remove(mathModelInfo.getVersion().getVersionKey());
mathModelInfoHash.remove(mathModelInfo.getVersion().getVersionKey());
fireDatabaseDelete(new DatabaseEvent(this, DatabaseEvent.DELETE, mathModelInfo, null));
// //
// // go through list of Simulations in the MathModelMetaData and remove unreferenced Simulations
// //
// Enumeration enumSim = mathModelMetaData.getSimulationInfos();
// while (enumSim.hasMoreElements()){
// SimulationInfo simInfo = (SimulationInfo)enumSim.nextElement();
// if (isSimulationReferenced(simInfo)==false){
// simInfoHash.remove(simInfo.getVersion().getVersionKey());
// resultSetInfoHash.remove(simInfo.getVersion().getVersionKey());
// fireDatabaseDelete(new DatabaseEvent(this, DatabaseEvent.DELETE, simInfo, null));
// }
// }
} catch (RemoteProxyException e) {
handleRemoteProxyException(e);
throw new DataAccessException(e.getMessage());
}
}
use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method getReactionStepAsModel.
/**
* Insert the method's description here.
* Creation date: (8/25/2003 5:10:41 PM)
*/
public Model getReactionStepAsModel(KeyValue reactionStepKey) throws DataAccessException {
try {
Model reactionModel = sessionManager.getUserMetaDbServer().getReactionStepAsModel(reactionStepKey);
if (reactionModel != null) {
try {
reactionModel = (Model) BeanUtils.cloneSerializable(reactionModel);
reactionModel.refreshDependencies();
} catch (Exception e) {
e.printStackTrace(System.out);
throw new DataAccessException(e.getMessage());
}
}
return reactionModel;
} catch (RemoteProxyException e) {
e.printStackTrace(System.out);
throw new DataAccessException(e.getMessage());
}
}
use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method save.
/**
* Insert the method's description here.
* Creation date: (10/28/00 12:08:30 AM)
*/
public BioModel save(BioModel bioModel, String[] independentSims) throws DataAccessException {
try {
String bioModelXML = null;
try {
bioModel.getVCMetaData().cleanupMetadata();
bioModelXML = XmlHelper.bioModelToXML(bioModel);
} catch (XmlParseException e) {
e.printStackTrace(System.out);
throw new DataAccessException(e.getMessage());
}
String savedBioModelXML = sessionManager.getUserMetaDbServer().saveBioModel(new BigString(bioModelXML), independentSims).toString();
BioModel savedBioModel = getBioModelFromDatabaseXML(new XMLHolder<BioModel>(savedBioModelXML));
KeyValue savedKey = savedBioModel.getVersion().getVersionKey();
if (xmlHash.get(savedKey) == null) {
xmlHash.put(savedKey, savedBioModelXML);
}
BioModelInfo savedBioModelInfo = new BioModelInfo(savedBioModel.getVersion(), savedBioModel.getModel().getKey(), savedBioModel.createBioModelChildSummary(), VCellSoftwareVersion.fromSystemProperty());
bioModelInfoHash.put(savedKey, savedBioModelInfo);
SimulationContext[] scArr = savedBioModel.getSimulationContexts();
for (int i = 0; i < scArr.length; i++) {
updateGeometryRelatedHashes(scArr[i].getGeometry());
}
// copy some transient info from the old model to the new one
for (SimulationContext newsc : scArr) {
SimulationContext oldsc = bioModel.getSimulationContext(newsc.getName());
newsc.getTaskCallbackProcessor().initialize((oldsc.getTaskCallbackProcessor()));
newsc.setMostRecentlyCreatedOutputSpec(oldsc.getMostRecentlyCreatedOutputSpec());
newsc.setMd5hash(oldsc.getMd5hash());
}
fireDatabaseInsert(new DatabaseEvent(this, DatabaseEvent.INSERT, null, savedBioModelInfo));
return savedBioModel;
} catch (RemoteProxyException e) {
e.printStackTrace(System.out);
throw new DataAccessException(VCellErrorMessages.FAIL_SAVE_MESSAGE + "\n\n" + e.getMessage());
}
}
Aggregations