use of org.vcell.pathway.Stoichiometry in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentConversion.
// right PhysicalEntity multiple
// participantStoichiometry Stoichiometry multiple
// left PhysicalEntity multiple
// spontaneous Boolean single
// conversionDirection String single
private Element addContentConversion(BioPaxObject bpObject, Element element) {
element = addContentInteraction(bpObject, element);
Conversion ob = (Conversion) bpObject;
Element tmpElement = null;
if (ob.getLeft() != null && ob.getLeft().size() > 0) {
List<PhysicalEntity> list = ob.getLeft();
for (PhysicalEntity item : list) {
tmpElement = new Element("left", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getRight() != null && ob.getRight().size() > 0) {
List<PhysicalEntity> list = ob.getRight();
for (PhysicalEntity item : list) {
tmpElement = new Element("right", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getParticipantStoichiometry() != null && ob.getParticipantStoichiometry().size() > 0) {
List<Stoichiometry> list = ob.getParticipantStoichiometry();
for (Stoichiometry item : list) {
tmpElement = new Element("participantStoichiometry", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getSpontaneous() != null) {
tmpElement = new Element("spontaneous", bp);
tmpElement.setAttribute("datatype", schemaBoolean, rdf);
tmpElement.setText(ob.getSpontaneous().toString());
element.addContent(tmpElement);
}
if (ob.getConversionDirection() != null && ob.getConversionDirection().length() > 0) {
tmpElement = new Element("conversionDirection", bp);
tmpElement.setAttribute("datatype", schemaString, rdf);
tmpElement.setText(ob.getConversionDirection());
element.addContent(tmpElement);
}
return element;
}
use of org.vcell.pathway.Stoichiometry in project vcell by virtualcell.
the class PathwayReader method addObjectStoichiometry.
private Stoichiometry addObjectStoichiometry(Element element) {
Stoichiometry stoichiometry = new Stoichiometry();
addAttributes(stoichiometry, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentStoichiometry(stoichiometry, element, childElement)) {
showUnexpected(childElement, stoichiometry);
}
}
}
pathwayModel.add(stoichiometry);
return stoichiometry;
}
Aggregations