use of org.vcell.util.document.MathModelInfo in project vcell by virtualcell.
the class EditTestCriteriaPanel method selectRefMathModel.
/**
* Comment
*/
private void selectRefMathModel(java.awt.event.ActionEvent actionEvent) {
MathModelInfo mmInfo = getTestingFrameworkWindowManager().selectMathModelInfo();
if (mmInfo != null) {
getRefMathModelLabel().setText("<html>" + mmInfo.getVersion().getName() + "<br>(MathModelKey=" + mmInfo.getVersion().getVersionKey() + ")<br>" + mmInfo.getVersion().getDate() + "</html>");
setReferenceSimInfo(null);
getRefSimLabel().setText(null);
setReferenceMathModelInfo(mmInfo);
} else {
PopupGenerator.showErrorDialog(this, "Selected MathModel is null!");
}
}
use of org.vcell.util.document.MathModelInfo in project vcell by virtualcell.
the class TestCaseAddPanel method setMathModelInfo.
/**
* Sets the mathModelInfo property (cbit.vcell.mathmodel.MathModelInfo) value.
* @param mathModelInfo The new value for the property.
* @see #getMathModelInfo
*/
private void setMathModelInfo(org.vcell.util.document.MathModelInfo mathModelInfo) {
org.vcell.util.document.MathModelInfo oldValue = fieldMathModelInfo;
fieldMathModelInfo = mathModelInfo;
firePropertyChange("mathModelInfo", oldValue, mathModelInfo);
refreshMathModelAppLabel();
}
use of org.vcell.util.document.MathModelInfo 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());
}
}
use of org.vcell.util.document.MathModelInfo in project vcell by virtualcell.
the class ClientDocumentManager method isChanged.
/**
* Insert the method's description here.
* Creation date: (10/28/00 12:08:30 AM)
*/
public boolean isChanged(MathModel mathModel, String mathModelXML) throws DataAccessException {
if (mathModel.getVersion() == null) {
//
return true;
} else {
//
if (!mathModel.getVersion().getName().equals(mathModel.getName())) {
return true;
}
//
if (!mathModel.getVersion().getAnnot().equals(mathModel.getDescription())) {
return true;
}
//
// check for same number of simulations as saved version
//
MathModelInfo savedMathModelInfo = getMathModelInfo(mathModel.getVersion().getVersionKey());
if (savedMathModelInfo == null) {
//
// if savedMathModelInfo is null, then the record was deleted
// while it was loaded in client (changed is true)
//
System.out.println("MathModel(" + mathModel.getVersion().getVersionKey() + ") must have been deleted, therefore isChanged() is true");
return true;
}
// MathModelMetaData savedMathModelMetaData = getMathModelMetaData(savedMathModelInfo);
// if (savedMathModelMetaData.getNumSimulations() != mathModel.getNumSimulations()){
// return true;
// }
//
// compare saved and this bioModel
//
XMLHolder<MathModel> savedMathModelXML = getMathModelXML(mathModel.getVersion().getVersionKey());
if (savedMathModelXML == null) {
// must have been deleted
return true;
}
try {
if (mathModelXML == null) {
mathModelXML = XmlHelper.mathModelToXML(mathModel);
}
return !VCMLComparator.compareEquals(savedMathModelXML.getXmlString(), mathModelXML, true);
} catch (XmlParseException e) {
e.printStackTrace(System.out);
throw new DataAccessException(e.getMessage());
}
}
}
use of org.vcell.util.document.MathModelInfo in project vcell by virtualcell.
the class ClientDocumentManager method addUserToGroup.
/**
* Insert the method's description here.
* Creation date: (11/28/00 5:43:44 PM)
* @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
*/
public MathModelInfo addUserToGroup(MathModelInfo mathModelInfo, String userToAdd) throws DataAccessException {
try {
//
// publish from database
//
MathModelInfo newMathModelInfo = (MathModelInfo) addUserToGroup0(mathModelInfo, VersionableType.MathModelMetaData, mathModelInfoHash, userToAdd);
//
// 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());
}
}
Aggregations