use of cbit.vcell.biomodel.meta.VCMetaData in project vcell by virtualcell.
the class AnnotationMapping method getComponentInfo.
private ArrayList<String> getComponentInfo(BioModel bioModel, Identifiable identifiable) {
ArrayList<String> info = new ArrayList<String>();
VCMetaData vcMetaData = bioModel.getVCMetaData();
VCID vcid = vcMetaData.getIdentifiableProvider().getVCID(identifiable);
String modelComponentType = vcid.getClassName();
String modelComponentName = vcid.getLocalName();
info.add(modelComponentName);
info.add(modelComponentType);
return info;
}
use of cbit.vcell.biomodel.meta.VCMetaData in project vcell by virtualcell.
the class StructurePropertiesPanel method changeAnnotation.
/**
* Comment
*/
private void changeAnnotation() {
try {
if (structure == null || fieldModel == null) {
return;
}
VCMetaData vcMetaData = fieldModel.getVcMetaData();
String textAreaStr = (annotationTextArea.getText() == null || annotationTextArea.getText().length() == 0 ? null : annotationTextArea.getText());
if (!Compare.isEqualOrNull(vcMetaData.getFreeTextAnnotation(structure), textAreaStr)) {
vcMetaData.setFreeTextAnnotation(structure, textAreaStr);
}
} catch (Exception e) {
e.printStackTrace(System.out);
PopupGenerator.showErrorDialog(this, e.getMessage(), e);
}
}
use of cbit.vcell.biomodel.meta.VCMetaData in project vcell by virtualcell.
the class ReactionPropertiesPanel method changeFreeTextAnnotation.
private void changeFreeTextAnnotation() {
try {
if (reactionStep == null) {
return;
}
// set text from annotationTextField in free text annotation for simple reactions in vcMetaData (from model)
if (bioModel.getModel() != null && bioModel.getModel().getVcMetaData() != null) {
VCMetaData vcMetaData = bioModel.getModel().getVcMetaData();
String textAreaStr = (annotationTextArea.getText() == null || annotationTextArea.getText().length() == 0 ? null : annotationTextArea.getText());
if (!Compare.isEqualOrNull(vcMetaData.getFreeTextAnnotation(reactionStep), textAreaStr)) {
vcMetaData.setFreeTextAnnotation(reactionStep, textAreaStr);
}
}
} catch (Exception e) {
e.printStackTrace(System.out);
PopupGenerator.showErrorDialog(this, "Edit Reaction Error\n" + e.getMessage(), e);
}
}
use of cbit.vcell.biomodel.meta.VCMetaData in project vcell by virtualcell.
the class SpeciesPropertiesPanel method changeFreeTextAnnotation.
/**
* Comment
*/
private void changeFreeTextAnnotation() {
try {
if (getSpeciesContext() == null) {
return;
}
// set text from annotationTextField in free text annotation for species in vcMetaData (from model)
if (bioModel.getModel() != null && bioModel.getModel().getVcMetaData() != null) {
VCMetaData vcMetaData = bioModel.getModel().getVcMetaData();
String textAreaStr = (annotationTextArea.getText() == null || annotationTextArea.getText().length() == 0 ? null : annotationTextArea.getText());
if (!Compare.isEqualOrNull(vcMetaData.getFreeTextAnnotation(getSpeciesContext().getSpecies()), textAreaStr)) {
vcMetaData.setFreeTextAnnotation(getSpeciesContext().getSpecies(), textAreaStr);
}
}
} catch (Exception e) {
e.printStackTrace(System.out);
PopupGenerator.showErrorDialog(this, "Edit Species Error\n" + e.getMessage(), e);
}
}
use of cbit.vcell.biomodel.meta.VCMetaData in project vcell by virtualcell.
the class ObservablePropertiesPanel method changeFreeTextAnnotation.
private void changeFreeTextAnnotation() {
try {
if (observable == null) {
return;
}
// set text from annotationTextField in free text annotation for species in vcMetaData (from model)
if (bioModel.getModel() != null && bioModel.getModel().getVcMetaData() != null) {
VCMetaData vcMetaData = bioModel.getModel().getVcMetaData();
String textAreaStr = (annotationTextArea.getText() == null || annotationTextArea.getText().length() == 0 ? null : annotationTextArea.getText());
if (!Compare.isEqualOrNull(vcMetaData.getFreeTextAnnotation(observable), textAreaStr)) {
vcMetaData.setFreeTextAnnotation(observable, textAreaStr);
}
}
} catch (Exception e) {
e.printStackTrace(System.out);
PopupGenerator.showErrorDialog(this, "Edit Observable Error\n" + e.getMessage(), e);
}
}
Aggregations