Search in sources :

Example 16 with RemoteProxyException

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());
    }
}
Also used : VCImageInfo(cbit.image.VCImageInfo) DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Example 17 with RemoteProxyException

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());
    }
}
Also used : Geometry(cbit.vcell.geometry.Geometry) KeyValue(org.vcell.util.document.KeyValue) BigString(org.vcell.util.BigString) XmlParseException(cbit.vcell.xml.XmlParseException) BigString(org.vcell.util.BigString) DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Example 18 with RemoteProxyException

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());
    }
}
Also used : MathModelInfo(org.vcell.util.document.MathModelInfo) DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Example 19 with RemoteProxyException

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());
    }
}
Also used : DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Example 20 with RemoteProxyException

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());
    }
}
Also used : GeometryInfo(cbit.vcell.geometry.GeometryInfo) DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Aggregations

RemoteProxyException (cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)39 DataAccessException (org.vcell.util.DataAccessException)38 XmlParseException (cbit.vcell.xml.XmlParseException)9 BigString (org.vcell.util.BigString)8 KeyValue (org.vcell.util.document.KeyValue)8 BioModelInfo (org.vcell.util.document.BioModelInfo)7 MathModelInfo (org.vcell.util.document.MathModelInfo)7 VCImageInfo (cbit.image.VCImageInfo)6 GeometryInfo (cbit.vcell.geometry.GeometryInfo)5 BioModel (cbit.vcell.biomodel.BioModel)3 MathException (cbit.vcell.math.MathException)3 MathModel (cbit.vcell.mathmodel.MathModel)3 ExpressionException (cbit.vcell.parser.ExpressionException)3 ObjectNotFoundException (org.vcell.util.ObjectNotFoundException)3 PermissionException (org.vcell.util.PermissionException)3 GIFImage (cbit.image.GIFImage)2 VCImage (cbit.image.VCImage)2 Geometry (cbit.vcell.geometry.Geometry)2 SimulationContext (cbit.vcell.mapping.SimulationContext)2 SimulationStatus (cbit.vcell.server.SimulationStatus)2