use of org.vcell.util.document.Version in project vcell by virtualcell.
the class ImageTable method getInfo.
/**
* This method was created in VisualAge.
* @return VCImage
* @param rset ResultSet
* @param log SessionLog
*/
public VersionInfo getInfo(ResultSet rset, Connection con, DatabaseSyntax dbSyntax) throws SQLException, DataAccessException {
GIFImage gifImage = null;
try {
// gifImage = new GIFImage(rset.getBytes(BrowseImageDataTable.table.data.toString()));
byte[] gifData = (byte[]) DbDriver.getLOB(rset, BrowseImageDataTable.table.data, dbSyntax);
gifImage = new GIFImage(gifData);
//
} catch (GifParsingException e) {
throw new DataAccessException("Error Parsing browseImage");
}
java.math.BigDecimal groupid = rset.getBigDecimal(VersionTable.privacy_ColumnName);
Version version = getVersion(rset, DbDriver.getGroupAccessFromGroupID(con, groupid));
int x = rset.getInt(ImageTable.table.numX.toString());
int y = rset.getInt(ImageTable.table.numY.toString());
int z = rset.getInt(ImageTable.table.numZ.toString());
org.vcell.util.ISize size = new org.vcell.util.ISize(x, y, z);
double extentX = rset.getBigDecimal(ExtentTable.table.extentX.toString()).doubleValue();
double extentY = rset.getBigDecimal(ExtentTable.table.extentY.toString()).doubleValue();
double extentZ = rset.getBigDecimal(ExtentTable.table.extentZ.toString()).doubleValue();
org.vcell.util.Extent extent = new org.vcell.util.Extent(extentX, extentY, extentZ);
String softwareVersion = rset.getString(SoftwareVersionTable.table.softwareVersion.toString());
return new VCImageInfo(version, size, extent, gifImage, VCellSoftwareVersion.fromString(softwareVersion));
}
use of org.vcell.util.document.Version in project vcell by virtualcell.
the class MathDescriptionDbDriver method updateVersionable.
/**
* This method was created in VisualAge.
* @return cbit.image.VCImage
* @param user cbit.vcell.server.User
* @param image cbit.image.VCImage
*/
public KeyValue updateVersionable(InsertHashtable hash, Connection con, User user, MathDescription mathDescription, KeyValue updatedGeometryKey, boolean bVersion) throws DataAccessException, SQLException, RecordChangedException {
Version newVersion = null;
try {
newVersion = updateVersionableInit(hash, con, user, mathDescription, bVersion);
insertMathDescriptionSQL(hash, con, user, mathDescription, updatedGeometryKey, newVersion, bVersion);
} catch (MathException e) {
lg.error(e.getMessage(), e);
throw new DataAccessException("MathException: " + e.getMessage());
}
return newVersion.getVersionKey();
}
use of org.vcell.util.document.Version in project vcell by virtualcell.
the class MathModelDbDriver method insertVersionable.
/**
* This method was created in VisualAge.
* @return cbit.sql.KeyValue
* @param versionable cbit.sql.Versionable
* @param pRef cbit.sql.KeyValue
* @param bCommit boolean
*/
public KeyValue insertVersionable(InsertHashtable hash, Connection con, User user, MathModelMetaData mathModelMetaData, MathModelChildSummary mmcs, String name, boolean bVersion) throws DataAccessException, SQLException, RecordChangedException {
Version newVersion = insertVersionableInit(hash, con, user, mathModelMetaData, name, mathModelMetaData.getDescription(), bVersion);
insertMathModelMetaData(con, user, mathModelMetaData, mmcs, newVersion);
return newVersion.getVersionKey();
}
use of org.vcell.util.document.Version in project vcell by virtualcell.
the class MathModelTable method getMathModelMetaData.
/**
* This method was created in VisualAge.
* @return cbit.vcell.math.MathDescription
* @param user cbit.vcell.server.User
* @param rset java.sql.ResultSet
*/
public MathModelMetaData getMathModelMetaData(ResultSet rset, Connection con, KeyValue[] simulationKeys, DatabaseSyntax dbSyntax) throws SQLException, DataAccessException {
//
// Get Version
//
java.math.BigDecimal groupid = rset.getBigDecimal(VersionTable.privacy_ColumnName);
Version mathModelVersion = getVersion(rset, DbDriver.getGroupAccessFromGroupID(con, groupid));
KeyValue mathDescrRef = new KeyValue(rset.getBigDecimal(table.mathRef.toString()));
// MathModelMetaData mathModelMetaData = new MathModelMetaData(version,mathRef,simulationKeys);
MathModelMetaData mathModelMetaData = populateOutputFunctions(con, mathDescrRef, mathModelVersion, simulationKeys, dbSyntax);
return mathModelMetaData;
}
use of org.vcell.util.document.Version in project vcell by virtualcell.
the class MathModelTable method getInfo.
/**
* This method was created in VisualAge.
* @return cbit.vcell.geometry.GeometryInfo
* @param rset java.sql.ResultSet
* @param log cbit.vcell.server.SessionLog
*/
public VersionInfo getInfo(ResultSet rset, Connection con, DatabaseSyntax dbSyntax) throws SQLException, org.vcell.util.DataAccessException {
KeyValue mathRef = new KeyValue(rset.getBigDecimal(table.mathRef.toString()));
java.math.BigDecimal groupid = rset.getBigDecimal(VersionTable.privacy_ColumnName);
Version version = getVersion(rset, DbDriver.getGroupAccessFromGroupID(con, groupid));
String serialDbChildSummary = DbDriver.varchar2_CLOB_get(rset, MathModelTable.table.childSummarySmall, MathModelTable.table.childSummaryLarge, dbSyntax);
String softwareVersion = rset.getString(SoftwareVersionTable.table.softwareVersion.toString());
return new MathModelInfo(version, mathRef, serialDbChildSummary, VCellSoftwareVersion.fromString(softwareVersion));
}
Aggregations