use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method reloadBioModelInfos.
/**
* Insert the method's description here.
* Creation date: (11/14/00 5:33:21 PM)
* @return cbit.vcell.biomodel.BioModelInfo[]
*/
private void reloadBioModelInfos() throws DataAccessException {
try {
System.out.println("ClientDocumentManager.reloadBioModelInfos()");
BioModelInfo[] bioModelInfos = sessionManager.getUserMetaDbServer().getBioModelInfos(true);
if (bioModelInfos != null) {
bioModelInfoHash.clear();
for (int i = 0; i < bioModelInfos.length; i++) {
bioModelInfoHash.put(bioModelInfos[i].getVersion().getVersionKey(), bioModelInfos[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 saveAsNew.
/**
* Insert the method's description here.
* Creation date: (1/19/01 11:27:52 AM)
*/
public Geometry saveAsNew(Geometry geometry, java.lang.String newName) throws DataAccessException {
try {
String geometryXML = null;
try {
geometryXML = XmlHelper.geometryToXML(geometry);
} catch (XmlParseException e) {
e.printStackTrace(System.out);
throw new DataAccessException(e.getMessage());
}
if (isChanged(geometry, geometryXML) == false) {
System.out.println("<<<<<WARNING>>>>>>>ClientDocumentManger.save(Geometry), called on unchanged geometry");
return geometry;
}
String savedGeometryXML = sessionManager.getUserMetaDbServer().saveGeometryAs(new BigString(geometryXML), newName).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 preloadSimulationStatus.
/**
* Insert the method's description here.
* Creation date: (9/1/2004 12:33:16 PM)
* @param simKeys cbit.sql.KeyValue[]
*/
private void preloadSimulationStatus(KeyValue[] simKeys) {
boolean bNeedRefreshStatus = false;
for (int i = 0; i < simKeys.length; i++) {
if (!simulationStatusHash.containsKey(simKeys[i])) {
bNeedRefreshStatus = true;
}
}
if (bNeedRefreshStatus) {
try {
SimulationStatus[] simulationStatusArray = null;
try {
simulationStatusArray = sessionManager.getSimulationController().getSimulationStatus(simKeys);
} catch (RemoteProxyException e) {
handleRemoteProxyException(e);
try {
simulationStatusArray = sessionManager.getSimulationController().getSimulationStatus(simKeys);
} catch (RemoteProxyException e2) {
handleRemoteProxyException(e2);
}
}
for (int i = 0; i < simKeys.length; i++) {
SimulationStatus simulationStatus = null;
for (int j = 0; simulationStatusArray != null && j < simulationStatusArray.length; j++) {
// these are server-supplied statuses, jobStatus array is not null
if (simulationStatusArray[j] != null && simulationStatusArray[j].getVCSimulationIdentifier().getSimulationKey().equals(simKeys[i])) {
simulationStatus = simulationStatusArray[j];
}
}
simulationStatusHash.put(simKeys[i], simulationStatus);
}
} catch (DataAccessException e) {
e.printStackTrace(System.out);
}
}
}
use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class RemoteProxyVCellConnectionFactoryTest method test.
@Test
public void test() throws IOException {
BiomodelRepresentation[] biomodelReps = apiClient.getBioModels(new BioModelsQuerySpec());
assertNotNull(biomodelReps);
VCInfoContainer vcInfoContainer = null;
try {
vcInfoContainer = vcConn.getUserMetaDbServer().getVCInfoContainer();
} catch (DataAccessException | RemoteProxyException e) {
e.printStackTrace();
fail("exception");
}
assertNotNull(vcInfoContainer);
}
Aggregations