use of cbit.vcell.math.ParticleMolecularType in project vcell by virtualcell.
the class XmlReader method getParticleMolecularTypePattern.
private ParticleMolecularTypePattern getParticleMolecularTypePattern(Element param, MathDescription mathDescription) throws XmlParseException {
String molecularTypeName = unMangle(param.getAttributeValue(XMLTags.NameAttrTag));
String matchLabel = unMangle(param.getAttributeValue(XMLTags.ParticleMolecularTypePatternMatchLabelAttrTag));
ParticleMolecularType particleMolecularType = mathDescription.getParticleMolecularType(molecularTypeName);
if (particleMolecularType != null) {
ParticleMolecularTypePattern var = new ParticleMolecularTypePattern(particleMolecularType);
if (matchLabel != null) {
var.setMatchLabel(matchLabel);
}
List<Element> componentPatternList = param.getChildren(XMLTags.ParticleMolecularComponentPatternTag, vcNamespace);
for (Element componentPattern : componentPatternList) {
ParticleMolecularComponentPattern p = getParticleMolecularComponentPattern(componentPattern, particleMolecularType);
var.addMolecularComponentPattern(p);
}
return var;
} else {
throw new XmlParseException("failed to find ParticleMolecularType named " + molecularTypeName);
}
}
Aggregations