use of org.vcell.util.BigString in project vcell by virtualcell.
the class BNGOutput method insertEntitiesInNetFile.
public void insertEntitiesInNetFile(String entities, String kind) {
if (entities == null) {
return;
}
HashSet<Integer> netFileIndices = new HashSet<Integer>();
for (int i = 0; i < bng_filenames.length; i++) {
if (bng_filenames[i].toLowerCase().endsWith(BNG_NET_FILE_SUFFIX)) {
netFileIndices.add(i);
}
}
if (netFileIndices.size() != 1) {
throw new RuntimeException("BioNetGen was unable to generate reaction network.");
}
int location = netFileIndices.iterator().next();
String s = bng_fileContents[location].toString();
String prologue = s.substring(0, s.indexOf("begin " + kind));
String epilogue = s.substring(s.indexOf("end " + kind));
String d = prologue;
d += "begin " + kind + "\n";
d += entities;
d += epilogue;
bng_fileContents[location] = new BigString(d);
}
use of org.vcell.util.BigString in project vcell by virtualcell.
the class BNGOutput method extractCompartmentsFromNetFile.
public void extractCompartmentsFromNetFile() {
HashSet<Integer> netFileIndices = new HashSet<Integer>();
for (int i = 0; i < bng_filenames.length; i++) {
if (bng_filenames[i].toLowerCase().endsWith(BNG_NET_FILE_SUFFIX)) {
netFileIndices.add(i);
}
}
if (netFileIndices.size() != 1) {
throw new RuntimeException("BioNetGen was unable to generate reaction network.");
}
int location = netFileIndices.iterator().next();
String s = bng_fileContents[location].toString();
String p = BNGOutputFileParser.extractCompartments(s);
bng_fileContents[location] = new BigString(p);
}
use of org.vcell.util.BigString in project vcell by virtualcell.
the class LocalUserMetaDbServerMessaging method saveMathModel.
/**
* getVersionInfo method comment.
* @throws RemoteException
*/
public BigString saveMathModel(BigString mathModelXML, String[] independentSims) throws DataAccessException {
try {
log.print("LocalUserMetaDbServerMessaging.saveMathModel()");
BigString savedMathModelXML = dbServerProxy.saveMathModel(mathModelXML, independentSims);
return savedMathModelXML;
} catch (DataAccessException e) {
log.exception(e);
throw e;
} catch (Throwable e) {
log.exception(e);
throw new DataAccessException(e.getMessage());
}
}
use of org.vcell.util.BigString in project vcell by virtualcell.
the class LocalUserMetaDbServerMessaging method saveMathModelAs.
/**
* getVersionInfo method comment.
* @throws RemoteException
*/
public BigString saveMathModelAs(BigString mathModelXML, String newName, String[] independentSims) throws DataAccessException {
try {
log.print("LocalUserMetaDbServerMessaging.saveMathModel(newName=" + newName + ")");
BigString savedMathModelXML = dbServerProxy.saveMathModelAs(mathModelXML, newName, independentSims);
return savedMathModelXML;
} catch (DataAccessException e) {
log.exception(e);
throw e;
} catch (Throwable e) {
log.exception(e);
throw new DataAccessException(e.getMessage());
}
}
use of org.vcell.util.BigString in project vcell by virtualcell.
the class LocalUserMetaDbServerMessaging method getGeometryXML.
/**
* getVersionInfo method comment.
* @throws RemoteException
*/
public BigString getGeometryXML(KeyValue geometryKey) throws DataAccessException {
try {
log.print("LocalUserMetaDbServerMessaging.getGeometryXML(key=" + geometryKey + ")");
BigString geometryXML = dbServerProxy.getGeometryXML(geometryKey);
return geometryXML;
} catch (DataAccessException e) {
log.exception(e);
throw e;
} catch (Throwable e) {
log.exception(e);
throw new DataAccessException(e.getMessage());
}
}
Aggregations