use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method setGroupPublic.
/**
* Insert the method's description here.
* Creation date: (11/28/00 5:43:44 PM)
* @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
*/
public VCImageInfo setGroupPublic(VCImageInfo imageInfo) throws DataAccessException {
try {
//
// publish from database
//
VCImageInfo newImageInfo = (VCImageInfo) setGroupPublic0(imageInfo, VersionableType.VCImage, imgInfoHash);
//
// delete Image from cache
//
xmlHash.remove(imageInfo.getVersion().getVersionKey());
fireDatabaseUpdate(new DatabaseEvent(this, DatabaseEvent.UPDATE, imageInfo, newImageInfo));
return newImageInfo;
} 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 save.
/**
* Insert the method's description here.
* Creation date: (10/28/00 12:08:30 AM)
*/
public Geometry save(Geometry geometry) throws DataAccessException {
try {
String geometryXML = null;
try {
geometryXML = XmlHelper.geometryToXML(geometry);
} catch (XmlParseException e) {
e.printStackTrace(System.out);
throw new DataAccessException(e.getMessage());
}
String savedGeometryXML = sessionManager.getUserMetaDbServer().saveGeometry(new BigString(geometryXML)).toString();
Geometry savedGeometry = getGeometryFromDatabaseXML(savedGeometryXML);
KeyValue savedKey = savedGeometry.getVersion().getVersionKey();
if (xmlHash.get(savedKey) == null) {
xmlHash.put(savedKey, savedGeometryXML);
}
updateGeometryRelatedHashes(savedGeometry);
return savedGeometry;
} catch (RemoteProxyException e) {
e.printStackTrace(System.out);
throw new DataAccessException(VCellErrorMessages.FAIL_SAVE_MESSAGE + "\n\n" + e.getMessage());
}
}
use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method reloadMathModelInfos.
/**
* Insert the method's description here.
* Creation date: (11/14/00 5:33:21 PM)
* @return cbit.vcell.biomodel.BioModelInfo[]
*/
private void reloadMathModelInfos() throws DataAccessException {
try {
System.out.println("ClientDocumentManager.reloadMathModelInfos()");
MathModelInfo[] mathModelInfos = sessionManager.getUserMetaDbServer().getMathModelInfos(true);
if (mathModelInfos != null) {
mathModelInfoHash.clear();
for (int i = 0; i < mathModelInfos.length; i++) {
mathModelInfoHash.put(mathModelInfos[i].getVersion().getVersionKey(), mathModelInfos[i]);
}
}
} catch (RemoteProxyException e) {
handleRemoteProxyException(e);
throw new DataAccessException("RemoteProxyException: " + 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: (11/28/00 5:43:44 PM)
* @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
*/
public void delete(BioModelInfo bioModelInfo) throws DataAccessException {
try {
// BioModelMetaData bioModelMetaData = getBioModelMetaData(bioModelInfo);
//
// delete from database
//
sessionManager.getUserMetaDbServer().deleteBioModel(bioModelInfo.getVersion().getVersionKey());
//
// delete BioModel from cache and BioModelInfo from bioModelInfo list
//
xmlHash.remove(bioModelInfo.getVersion().getVersionKey());
bioModelInfoHash.remove(bioModelInfo.getVersion().getVersionKey());
fireDatabaseDelete(new DatabaseEvent(this, DatabaseEvent.DELETE, bioModelInfo, null));
// //
// // go through list of Simulations in the BioModelMetaData and remove unreferenced Simulations
// //
// Enumeration enumSim = bioModelMetaData.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 setGroupPublic.
/**
* Insert the method's description here.
* Creation date: (11/28/00 5:43:44 PM)
* @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
*/
public GeometryInfo setGroupPublic(GeometryInfo geometryInfo) throws DataAccessException {
try {
//
// publish from database
//
GeometryInfo newGeometryInfo = (GeometryInfo) setGroupPublic0(geometryInfo, VersionableType.Geometry, geoInfoHash);
// //
// // delete Geometry from cache
// //
// xmlHash.remove(geometryInfo.getVersion().getVersionKey());
// //
// // delete any MathModelMetaData's that use this GeometryInfo from cache
// //
// MathModelInfo referencedMathModelInfos[] = getMathModelReferences(geometryInfo);
// for (int i = 0; i < referencedMathModelInfos.length; i++){
// xmlHash.remove(referencedMathModelInfos[i].getVersion().getVersionKey());
// }
// //
// // delete any BioModelMetaData's that use this GeometryInfo from cache
// //
// BioModelInfo referencedBioModelInfos[] = getBioModelReferences(geometryInfo);
// for (int i = 0; i < referencedBioModelInfos.length; i++){
// xmlHash.remove(referencedBioModelInfos[i].getVersion().getVersionKey());
// }
fireDatabaseUpdate(new DatabaseEvent(this, DatabaseEvent.UPDATE, geometryInfo, newGeometryInfo));
return newGeometryInfo;
} catch (RemoteProxyException e) {
handleRemoteProxyException(e);
throw new DataAccessException(e.getMessage());
}
}
Aggregations