use of org.vcell.util.document.VCellSoftwareVersion in project vcell by virtualcell.
the class BioModelTable 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 modelRef = new KeyValue(rset.getBigDecimal(table.modelRef.toString()));
BigDecimal groupid = rset.getBigDecimal(VersionTable.privacy_ColumnName);
Version version = getVersion(rset, DbDriver.getGroupAccessFromGroupID(con, groupid));
String softwareVersion = rset.getString(SoftwareVersionTable.table.softwareVersion.toString());
VCellSoftwareVersion vcSoftwareVersion = VCellSoftwareVersion.fromString(softwareVersion);
String serialDbChildSummary = DbDriver.varchar2_CLOB_get(rset, BioModelTable.table.childSummarySmall, BioModelTable.table.childSummaryLarge, dbSyntax);
return new org.vcell.util.document.BioModelInfo(version, modelRef, serialDbChildSummary, vcSoftwareVersion);
}
use of org.vcell.util.document.VCellSoftwareVersion in project vcell by virtualcell.
the class MathVisitor method filterMathModel.
@Override
public boolean filterMathModel(MathModelInfo mathModelInfo) {
VCellSoftwareVersion vers = mathModelInfo.getSoftwareVersion();
boolean current = vers.getMajorVersion() >= 5;
return current;
}
use of org.vcell.util.document.VCellSoftwareVersion in project vcell by virtualcell.
the class MicroscopyXmlproducer method getXML.
/**
* This method returns a XML representation for a Biomodel object.
* Creation date: (2/14/2001 3:41:13 PM)
* @param param cbit.vcell.biomodel.BioModel
* @return Element
* @throws XmlParseException
* @throws cbit.vcell.parser.ExpressionException
*/
private static Element getXML(FRAPStudy param, Xmlproducer vcellXMLProducer, ClientTaskStatusSupport progressListener, boolean bSaveCompressed) throws XmlParseException, cbit.vcell.parser.ExpressionException {
Element frapStudyNode = new Element(MicroscopyXMLTags.FRAPStudyTag);
// name
if (param.getName() != null) {
String name = param.getName();
frapStudyNode.setAttribute(XMLTags.NameAttrTag, name);
}
VCellSoftwareVersion vCellSoftwareVersion = VCellSoftwareVersion.fromSystemProperty();
if (vCellSoftwareVersion != null && vCellSoftwareVersion.getSoftwareVersionString() != null) {
frapStudyNode.setAttribute(XMLTags.SoftwareVersionAttrTag, vCellSoftwareVersion.getSoftwareVersionString());
}
// originalImageFilePath
if (param.getOriginalImageFilePath() != null && param.getOriginalImageFilePath().length() > 0) {
String name = param.getOriginalImageFilePath();
frapStudyNode.setAttribute(MicroscopyXMLTags.OriginalImagePathAttrTag, name);
}
// Description
if (param.getDescription() != null && param.getDescription().length() > 0) {
Element annotationElem = new Element(XMLTags.AnnotationTag);
annotationElem.setText(mangle(param.getDescription()));
frapStudyNode.addContent(annotationElem);
}
// starting index for recovery
if (param.getStartingIndexForRecovery() != null) {
Element indexElem = new Element(MicroscopyXMLTags.StartingIndexForRecoveryTag);
indexElem.setText(mangle(param.getStartingIndexForRecovery().toString()));
frapStudyNode.addContent(indexElem);
}
// Get frap best model index
if (param.getBestModelIndex() != null) {
Element bestModelIdxElem = new Element(MicroscopyXMLTags.BestModelIndexTag);
bestModelIdxElem.setText(mangle(param.getBestModelIndex().toString()));
frapStudyNode.addContent(bestModelIdxElem);
}
// Get selected ROIs
if (param.getSelectedROIsForErrorCalculation() != null && param.getSelectedROIsForErrorCalculation().length > 0) {
Element selectedROIsNode = new Element(MicroscopyXMLTags.SelectedROIsTag);
boolean[] selectedROIs = param.getSelectedROIsForErrorCalculation();
String rowText = "";
for (int i = 0; i < selectedROIs.length; i++) {
if (i > 0) {
rowText += " ";
}
rowText += selectedROIs[i];
}
selectedROIsNode.addContent(rowText);
frapStudyNode.addContent(selectedROIsNode);
}
// Get frap models
if (param.getModels() != null && param.getModels().length > 0) {
Element frapModelsNode = new Element(MicroscopyXMLTags.FrapModelsTag);
if (param.getModels()[FRAPModel.IDX_MODEL_DIFF_ONE_COMPONENT] != null) {
frapModelsNode.addContent(getXML(param.getModels()[FRAPModel.IDX_MODEL_DIFF_ONE_COMPONENT]));
}
if (param.getModels()[FRAPModel.IDX_MODEL_DIFF_TWO_COMPONENTS] != null) {
frapModelsNode.addContent(getXML(param.getModels()[FRAPModel.IDX_MODEL_DIFF_TWO_COMPONENTS]));
}
if (param.getModels()[FRAPModel.IDX_MODEL_REACTION_OFF_RATE] != null) {
frapModelsNode.addContent(getXML(param.getModels()[FRAPModel.IDX_MODEL_REACTION_OFF_RATE]));
}
if (param.getModels()[FRAPModel.IDX_MODEL_DIFF_BINDING] != null) {
frapModelsNode.addContent(getXML(param.getModels()[FRAPModel.IDX_MODEL_DIFF_BINDING]));
}
frapStudyNode.addContent(frapModelsNode);
}
// Get ExternalDataIdentifier (for timeseries)
if (param.getFrapDataExternalDataInfo() != null) {
Element imageDatasetEDINode = new Element(MicroscopyXMLTags.ImageDatasetExternalDataInfoTag);
imageDatasetEDINode.setAttribute(MicroscopyXMLTags.FilenameAttrTag, param.getFrapDataExternalDataInfo().getFilename());
imageDatasetEDINode.addContent(getXML(param.getFrapDataExternalDataInfo().getExternalDataIdentifier()));
frapStudyNode.addContent(imageDatasetEDINode);
}
// Get ExternalDataIdentifier (for ROIs)
if (param.getRoiExternalDataInfo() != null) {
Element roiEDINode = new Element(MicroscopyXMLTags.ROIExternalDataInfoTag);
roiEDINode.setAttribute(MicroscopyXMLTags.FilenameAttrTag, param.getRoiExternalDataInfo().getFilename());
roiEDINode.addContent(getXML(param.getRoiExternalDataInfo().getExternalDataIdentifier()));
frapStudyNode.addContent(roiEDINode);
}
// Get Reference Data (for reference data)
if (param.getStoredRefData() != null) {
frapStudyNode.addContent(getXML(param.getStoredRefData(), MicroscopyXMLTags.ReferenceDataTag));
}
// Get profile data for one diffusing component (list of profile data, one for each parameter)
if (param.getProfileData_oneDiffComponent() != null) {
frapStudyNode.addContent(getXML(param.getProfileData_oneDiffComponent(), MicroscopyXMLTags.ListOfProfileData_OneDiffTag));
}
if (param.getProfileData_twoDiffComponents() != null) {
frapStudyNode.addContent(getXML(param.getProfileData_twoDiffComponents(), MicroscopyXMLTags.ListOfProfileData_TwoDiffTag));
}
if (param.getProfileData_reactionOffRate() != null) {
frapStudyNode.addContent(getXML(param.getProfileData_reactionOffRate(), MicroscopyXMLTags.ListOfProfileData_ReacOffRateTag));
}
// Get BioModel
if (param.getBioModel() != null) {
frapStudyNode.addContent(vcellXMLProducer.getXML(param.getBioModel()));
}
// Get FrapData
if (param.getFrapData() != null) {
frapStudyNode.addContent(getXML(param.getFrapData(), vcellXMLProducer, progressListener, bSaveCompressed));
}
return frapStudyNode;
}
use of org.vcell.util.document.VCellSoftwareVersion in project vcell by virtualcell.
the class DocumentWindowAboutBox method parseVCellVersion.
public static void parseVCellVersion() {
try {
VCellSoftwareVersion vcellSoftwareVersion = VCellSoftwareVersion.fromSystemProperty();
EDITION = vcellSoftwareVersion.getSite().name().toUpperCase();
VERSION_NO = vcellSoftwareVersion.getVersionNumber();
BUILD_NO = vcellSoftwareVersion.getBuildNumber();
} catch (Exception exc) {
System.out.println("Failed to parse vcell.softwareVersion: " + exc.getMessage());
exc.printStackTrace(System.out);
}
}
use of org.vcell.util.document.VCellSoftwareVersion in project vcell by virtualcell.
the class ClientServerManager method checkClientServerSoftwareVersion.
private void checkClientServerSoftwareVersion(InteractiveContext requester, ClientServerInfo clientServerInfo) {
String clientSoftwareVersion = System.getProperty(PropertyLoader.vcellSoftwareVersion);
if (clientSoftwareVersion != null && clientSoftwareVersion.toLowerCase().contains("devel")) {
return;
}
if (clientServerInfo.getServerType() == ServerType.SERVER_REMOTE) {
String apihost = clientServerInfo.getApihost();
Integer apiport = clientServerInfo.getApiport();
String serverSoftwareVersion = RemoteProxyVCellConnectionFactory.getVCellSoftwareVersion(apihost, apiport);
if (serverSoftwareVersion != null && !serverSoftwareVersion.equals(clientSoftwareVersion)) {
VCellSoftwareVersion clientVersion = VCellSoftwareVersion.fromString(clientSoftwareVersion);
VCellSoftwareVersion serverVersion = VCellSoftwareVersion.fromString(serverSoftwareVersion);
if (clientVersion.getSite() == VCellSite.beta) {
requester.showWarningDialog("VCell Public Beta program has been discontinued - please use our Release VCell version\n\n" + "We have adopted a Release Early, Release Often software development approach\n\n" + "\nPlease exit VCell and download the latest client from VCell Software page (http://vcell.org).");
}
if (clientVersion.getMajorVersion() != serverVersion.getMajorVersion() || clientVersion.getMinorVersion() != serverVersion.getMinorVersion() || clientVersion.getPatchVersion() != serverVersion.getPatchVersion()) {
requester.showWarningDialog("software version mismatch between client and server:\n" + "client VCell version : " + clientSoftwareVersion + "\n" + "server VCell version : " + serverSoftwareVersion + "\n" + "\nPlease exit VCell and download the latest client from VCell Software page (http://vcell.org).");
}
}
}
}
Aggregations