use of org.vcell.util.document.BioModelChildSummary.MathType in project vcell by virtualcell.
the class BioModelTreeModel method addBioModelContents.
/**
* Insert the method's description here.
* Creation date: (11/28/00 2:41:43 PM)
* @param bioModelNode cbit.vcell.desktop.BioModelNode
* @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
*/
private void addBioModelContents(BioModelNode bioModelNode, BioModel bioModel) {
//
if (bioModel == null) {
return;
}
// bioModelNode.add(new BioModelNode(bioModel.getModel(),false));
// if (bioModel.getDescription() != null && !bioModel.getDescription().equals("")){
bioModelNode.add(new BioModelNode(new Annotation(bioModel.getVCMetaData().getFreeTextAnnotation(bioModel)), false));
// }
Set<MiriamRefGroup> isDescribedByAnnotation = bioModel.getVCMetaData().getMiriamManager().getMiriamRefGroups(bioModel, MIRIAMQualifier.MODEL_isDescribedBy);
for (MiriamRefGroup refGroup : isDescribedByAnnotation) {
for (MiriamResource miriamResources : refGroup.getMiriamRefs()) {
bioModelNode.add(new MiriamTreeModel.LinkNode(MIRIAMQualifier.MODEL_isDescribedBy, miriamResources));
}
}
Set<MiriamRefGroup> isAnnotation = bioModel.getVCMetaData().getMiriamManager().getMiriamRefGroups(bioModel, MIRIAMQualifier.MODEL_is);
for (MiriamRefGroup refGroup : isAnnotation) {
for (MiriamResource miriamResources : refGroup.getMiriamRefs()) {
bioModelNode.add(new MiriamTreeModel.LinkNode(MIRIAMQualifier.MODEL_is, miriamResources));
}
}
SimulationContext[] scArray = bioModel.getSimulationContexts();
if (scArray != null) {
for (int i = 0; i < scArray.length; i++) {
BioModelNode scNode = new BioModelNode(scArray[i], true);
bioModelNode.add(scNode);
// scNode.add(new BioModelNode(scArray[i].getModel(),false));
// add application type node
MathType typeInfo = scArray[i].getMathType();
BioModelNode appTypeNode = new BioModelNode(typeInfo, false);
appTypeNode.setRenderHint("type", "AppType");
scNode.add(appTypeNode);
//
// Display Annotation on tree
//
scNode.add(new BioModelNode(new Annotation(scArray[i].getDescription()), false));
scNode.add(new BioModelNode(scArray[i].getGeometry(), false));
if (scArray[i].getMathDescription() != null) {
scNode.add(new BioModelNode(scArray[i].getMathDescription(), false));
} else {
scNode.add(new BioModelNode("math not generated", false));
}
//
// add simulations to simulationContext
//
Simulation[] simArray = bioModel.getSimulations();
if (simArray != null) {
for (int j = 0; j < simArray.length; j++) {
if (simArray[j].getMathDescription() == scArray[i].getMathDescription()) {
BioModelNode simNode = new BioModelNode(simArray[j], true);
scNode.add(simNode);
//
// add simulation children (simulation annotations)
//
// if (simArray[j].getDescription() != null && simArray[j].getDescription().length() > 0){
simNode.add(new BioModelNode(new Annotation(simArray[j].getDescription()), false));
// }
// simNode.add(new BioModelNode(simArray[i].getMathDescription(),false));
// simNode.add(new BioModelNode(simArray[i].getMathOverrides(),false));
// simNode.add(new BioModelNode(simArray[i].getMeshSpecification(),false));
// simNode.add(new BioModelNode(simArray[i].getSolverTaskDescription(),false));
}
}
}
}
}
}
Aggregations