Search in sources :

Example 46 with DataAccessException

use of org.vcell.util.DataAccessException 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 GeometryInfo setGroupPrivate(GeometryInfo geometryInfo) throws DataAccessException {
    try {
        // 
        // unpublish from database
        // 
        GeometryInfo newGeometryInfo = (GeometryInfo) setGroupPrivate0(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)

Example 47 with DataAccessException

use of org.vcell.util.DataAccessException 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 MathModelInfo setGroupPrivate(MathModelInfo mathModelInfo) throws DataAccessException {
    try {
        // 
        // unpublish from database
        // 
        MathModelInfo newMathModelInfo = (MathModelInfo) setGroupPrivate0(mathModelInfo, VersionableType.MathModelMetaData, mathModelInfoHash);
        // 
        // delete MathModelMetaData from cache
        // 
        xmlHash.remove(mathModelInfo.getVersion().getVersionKey());
        fireDatabaseUpdate(new DatabaseEvent(this, DatabaseEvent.UPDATE, mathModelInfo, newMathModelInfo));
        return newMathModelInfo;
    } catch (RemoteProxyException e) {
        handleRemoteProxyException(e);
        throw new DataAccessException(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 48 with DataAccessException

use of org.vcell.util.DataAccessException in project vcell by virtualcell.

the class ClientDocumentManager method curate.

/**
 * Insert the method's description here.
 * Creation date: (5/23/2006 9:23:34 AM)
 */
public void curate(CurateSpec curateSpec) throws DataAccessException {
    try {
        VCDocumentInfo newVCDocumentInfo = getSessionManager().getUserMetaDbServer().curate(curateSpec);
        xmlHash.remove(curateSpec.getVCDocumentInfo().getVersion().getVersionKey());
        if (curateSpec.getVCDocumentInfo() instanceof MathModelInfo) {
            mathModelInfoHash.remove(curateSpec.getVCDocumentInfo().getVersion().getVersionKey());
            mathModelInfoHash.put(newVCDocumentInfo.getVersion().getVersionKey(), (MathModelInfo) newVCDocumentInfo);
        } else if (curateSpec.getVCDocumentInfo() instanceof BioModelInfo) {
            bioModelInfoHash.remove(curateSpec.getVCDocumentInfo().getVersion().getVersionKey());
            bioModelInfoHash.put(newVCDocumentInfo.getVersion().getVersionKey(), (BioModelInfo) newVCDocumentInfo);
        }
        fireDatabaseUpdate(new DatabaseEvent(this, DatabaseEvent.UPDATE, curateSpec.getVCDocumentInfo(), newVCDocumentInfo));
    } catch (Exception e) {
        e.printStackTrace();
        throw new DataAccessException(e.getClass().getName() + " " + e.getMessage());
    }
}
Also used : VCDocumentInfo(org.vcell.util.document.VCDocumentInfo) BioModelInfo(org.vcell.util.document.BioModelInfo) MathModelInfo(org.vcell.util.document.MathModelInfo) PermissionException(org.vcell.util.PermissionException) ObjectNotFoundException(org.vcell.util.ObjectNotFoundException) XmlParseException(cbit.vcell.xml.XmlParseException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException) DataAccessException(org.vcell.util.DataAccessException) ExpressionException(cbit.vcell.parser.ExpressionException) MathException(cbit.vcell.math.MathException) DataAccessException(org.vcell.util.DataAccessException)

Example 49 with DataAccessException

use of org.vcell.util.DataAccessException in project vcell by virtualcell.

the class ClientDocumentManager method reloadGeometryInfos.

/**
 * Insert the method's description here.
 * Creation date: (11/14/00 5:33:21 PM)
 * @return cbit.vcell.biomodel.BioModelInfo[]
 */
private void reloadGeometryInfos() throws DataAccessException {
    try {
        System.out.println("ClientDocumentManager.reloadGeometryInfos()");
        GeometryInfo[] geometryInfos = sessionManager.getUserMetaDbServer().getGeometryInfos(true);
        if (geometryInfos != null) {
            geoInfoHash.clear();
            for (int i = 0; i < geometryInfos.length; i++) {
                geoInfoHash.put(geometryInfos[i].getVersion().getVersionKey(), geometryInfos[i]);
            }
        }
    } catch (RemoteProxyException e) {
        handleRemoteProxyException(e);
        throw new DataAccessException("RemoteProxyException: " + e.getMessage());
    }
}
Also used : GeometryInfo(cbit.vcell.geometry.GeometryInfo) DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Example 50 with DataAccessException

use of org.vcell.util.DataAccessException 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)

Aggregations

DataAccessException (org.vcell.util.DataAccessException)345 KeyValue (org.vcell.util.document.KeyValue)82 XmlParseException (cbit.vcell.xml.XmlParseException)80 ExpressionException (cbit.vcell.parser.ExpressionException)78 ObjectNotFoundException (org.vcell.util.ObjectNotFoundException)71 SQLException (java.sql.SQLException)67 IOException (java.io.IOException)60 MathException (cbit.vcell.math.MathException)59 RemoteProxyException (cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)46 BigString (org.vcell.util.BigString)45 User (org.vcell.util.document.User)42 FileNotFoundException (java.io.FileNotFoundException)38 ResultSet (java.sql.ResultSet)38 PropertyVetoException (java.beans.PropertyVetoException)37 File (java.io.File)34 PermissionException (org.vcell.util.PermissionException)34 Statement (java.sql.Statement)33 ExpressionBindingException (cbit.vcell.parser.ExpressionBindingException)32 BioModelInfo (org.vcell.util.document.BioModelInfo)29 Vector (java.util.Vector)26