use of org.vcell.pathway.GeneticInteraction in project vcell by virtualcell.
the class PathwayReader method addObjectGeneticInteraction.
private GeneticInteraction addObjectGeneticInteraction(Element element) {
GeneticInteraction geneticInteraction = new GeneticInteraction();
addAttributes(geneticInteraction, element);
for (Object child : element.getChildren()) {
if (!addContentGeneticInteraction(geneticInteraction, element, (Element) child)) {
showUnexpected((Element) child, geneticInteraction);
}
}
pathwayModel.add(geneticInteraction);
return geneticInteraction;
}
use of org.vcell.pathway.GeneticInteraction in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentGeneticInteraction.
private Element addContentGeneticInteraction(BioPaxObject bpObject, Element element) {
element = addContentInteraction(bpObject, element);
GeneticInteraction ob = (GeneticInteraction) bpObject;
Element tmpElement = null;
return element;
}
use of org.vcell.pathway.GeneticInteraction in project vcell by virtualcell.
the class PathwayReaderBiopax3 method addContentControl.
private boolean addContentControl(Control control, Element element, Element childElement) {
if (addContentInteraction(control, element, childElement)) {
return true;
}
/**
* InteractionImpl controlledInteraction
* Pathway controlledPathway
* String controlType
* ArrayList<Pathway> pathwayControllers
* ArrayList<PhysicalEntity> physicalControllers
*/
if (childElement.getName().equals("controller")) {
// if (resourceAttribute != null){
if (childElement.getChildren().size() == 0) {
// if there are no children it must be a resource inside another object
// we don't know yet whether it's Interaction or Pathway, we make a proxy for each
// at the time when we solve the references we'll find out which is fake
PhysicalEntityProxy proxyE = new PhysicalEntityProxy();
addAttributes(proxyE, childElement);
pathwayModel.add(proxyE);
control.addPhysicalController(proxyE);
PathwayProxy proxyP = new PathwayProxy();
addAttributes(proxyP, childElement);
pathwayModel.add(proxyP);
control.getPathwayControllers().add(proxyP);
return true;
} else {
for (Object child : element.getChildren()) {
if (child instanceof Element) {
if (((Element) child).getName().equals("Pathway")) {
Pathway thingie = addObjectPathway((Element) child);
control.getPathwayControllers().add(thingie);
return true;
} else if (((Element) child).getName().equals("Complex")) {
Complex thingie = addObjectComplex((Element) child);
control.getPhysicalControllers().add(thingie);
return true;
} else if (((Element) child).getName().equals("Dna")) {
Dna thingie = addObjectDna((Element) child);
control.getPhysicalControllers().add(thingie);
return true;
} else if (((Element) child).getName().equals("DnaRegion")) {
DnaRegion thingie = addObjectDnaRegion((Element) child);
control.getPhysicalControllers().add(thingie);
return true;
} else if (((Element) child).getName().equals("Rna")) {
Rna thingie = addObjectRna((Element) child);
control.getPhysicalControllers().add(thingie);
return true;
} else if (((Element) child).getName().equals("RnaRegion")) {
RnaRegion thingie = addObjectRnaRegion((Element) child);
control.getPhysicalControllers().add(thingie);
return true;
} else if (((Element) child).getName().equals("Protein")) {
Protein thingie = addObjectProtein((Element) child);
control.getPhysicalControllers().add(thingie);
return true;
} else if (((Element) child).getName().equals("SmallMolecule")) {
SmallMolecule thingie = addObjectSmallMolecule((Element) child);
control.getPhysicalControllers().add(thingie);
return true;
} else {
return false;
}
}
}
}
return false;
} else if (childElement.getName().equals("controlled")) {
if (childElement.getChildren().size() == 0) {
InteractionProxy proxyI = new InteractionProxy();
addAttributes(proxyI, childElement);
pathwayModel.add(proxyI);
control.setControlledInteraction(proxyI);
PathwayProxy proxyP = new PathwayProxy();
addAttributes(proxyP, childElement);
pathwayModel.add(proxyP);
control.setControlledPathway(proxyP);
return true;
} else {
for (Object child : childElement.getChildren()) {
if (child instanceof Element) {
if (((Element) child).getName().equals("Pathway")) {
Pathway thingie = addObjectPathway((Element) child);
control.setControlledPathway(thingie);
return true;
} else {
Interaction thingie = (Interaction) addObjectBioPaxObjectSubclass((Element) child);
if (thingie == null) {
return false;
} else {
control.setControlledInteraction(thingie);
return true;
}
}
// if(((Element)child).getName().equals("Pathway")) {
// Pathway thingie = addObjectPathway((Element)child);
// control.setControlledPathway(thingie);
// return true;
// } else if(((Element)child).getName().equals("Interaction")) {
// Interaction thingie = addObjectInteraction((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("Control")) {
// Control thingie = addObjectControl((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("Modulation")) {
// Modulation thingie = addObjectModulation((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("Catalysis")) {
// Catalysis thingie = addObjectCatalysis((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("TemplateReactionRegulation")) {
// TemplateReactionRegulation thingie = addObjectTemplateReactionRegulation((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("Conversion")) {
// Conversion thingie = addObjectConversion((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("BiochemicalReaction")) {
// BiochemicalReaction thingie = addObjectBiochemicalReaction((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("TransportWithBiochemicalReaction")) {
// TransportWithBiochemicalReaction thingie = addObjectTransportWithBiochemicalReaction((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("ComplexAssembly")) {
// ComplexAssembly thingie = addObjectComplexAssembly((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("Degradation")) {
// Degradation thingie = addObjectDegradation((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("Transport")) {
// Transport thingie = addObjectTransport((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("GeneticInteraction")) {
// GeneticInteraction thingie = addObjectGeneticInteraction((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("MolecularInteraction")) {
// MolecularInteraction thingie = addObjectMolecularInteraction((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else if(((Element)child).getName().equals("TemplateReaction")) {
// TemplateReaction thingie = addObjectTemplateReaction((Element)child);
// control.setControlledInteraction(thingie);
// return true;
// } else {
// return false;
// }
}
}
}
return false;
} else if (childElement.getName().equals("controlType")) {
control.setControlType(childElement.getTextTrim());
return true;
} else {
return false;
}
}
use of org.vcell.pathway.GeneticInteraction in project vcell by virtualcell.
the class PathwayReaderBiopax3 method addObjectGeneticInteraction.
private GeneticInteraction addObjectGeneticInteraction(Element element) {
GeneticInteraction geneticInteraction = new GeneticInteraction();
addAttributes(geneticInteraction, element);
for (Object child : element.getChildren()) {
if (!addContentGeneticInteraction(geneticInteraction, element, (Element) child)) {
showUnexpected((Element) child);
}
}
pathwayModel.add(geneticInteraction);
return geneticInteraction;
}
Aggregations