use of org.vcell.pathway.PhysicalEntity in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentControl.
// controller Pathway multiple
// controller PhysicalEntity multiple
// controlType String single
// controlled Interaction single
// controlled Pathway single
private Element addContentControl(BioPaxObject bpObject, Element element) {
element = addContentInteraction(bpObject, element);
Control ob = (Control) bpObject;
Element tmpElement = null;
if (ob.getPathwayControllers() != null && ob.getPathwayControllers().size() > 0) {
List<Pathway> list = ob.getPathwayControllers();
for (Pathway item : list) {
tmpElement = new Element("controller", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getPhysicalControllers() != null && ob.getPhysicalControllers().size() > 0) {
List<PhysicalEntity> list = ob.getPhysicalControllers();
for (PhysicalEntity item : list) {
tmpElement = new Element("controller", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getControlType() != null && ob.getControlType().length() > 0) {
tmpElement = new Element("controlType", bp);
tmpElement.setAttribute("datatype", schemaString, rdf);
tmpElement.setText(ob.getControlType());
element.addContent(tmpElement);
}
if (ob.getControlledInteraction() != null) {
tmpElement = new Element("controlled", bp);
addIDToProperty(tmpElement, ob.getControlledInteraction());
mustPrintObject(ob.getControlledInteraction());
element.addContent(tmpElement);
}
if (ob.getControlledPathway() != null) {
tmpElement = new Element("controlled", bp);
addIDToProperty(tmpElement, ob.getControlledPathway());
mustPrintObject(ob.getControlledPathway());
element.addContent(tmpElement);
}
return element;
}
use of org.vcell.pathway.PhysicalEntity in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentPhysicalEntity.
// feature EntityFeature multiple
// notFeature EntityFeature multiple
// memberPhysicalEntity PhysicalEntity multiple
// cellularLocation CellularLocationVocabulary single
private Element addContentPhysicalEntity(BioPaxObject bpObject, Element element) {
element = addContentEntity(bpObject, element);
PhysicalEntity ob = (PhysicalEntity) bpObject;
Element tmpElement = null;
if (ob.getFeature() != null && ob.getFeature().size() > 0) {
List<EntityFeature> list = ob.getFeature();
for (EntityFeature item : list) {
tmpElement = new Element("feature", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getNotFeature() != null && ob.getNotFeature().size() > 0) {
List<EntityFeature> list = ob.getNotFeature();
for (EntityFeature item : list) {
tmpElement = new Element("notFeature", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getMemberPhysicalEntity() != null && ob.getMemberPhysicalEntity().size() > 0) {
List<PhysicalEntity> list = ob.getMemberPhysicalEntity();
for (PhysicalEntity item : list) {
tmpElement = new Element("memberPhysicalEntity", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getCellularLocation() != null) {
tmpElement = new Element("cellularLocation", bp);
addIDToProperty(tmpElement, ob.getCellularLocation());
mustPrintObject(ob.getCellularLocation());
element.addContent(tmpElement);
}
return element;
}
use of org.vcell.pathway.PhysicalEntity in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentComplex.
// componentStoichiometry Stoichiometry multiple
// component PhysicalEntity multiple
private Element addContentComplex(BioPaxObject bpObject, Element element) {
element = addContentPhysicalEntity(bpObject, element);
Complex ob = (Complex) bpObject;
Element tmpElement = null;
if (ob.getComponentStoichiometry() != null && ob.getComponentStoichiometry().size() > 0) {
List<Stoichiometry> list = ob.getComponentStoichiometry();
for (Stoichiometry item : list) {
tmpElement = new Element("componentStoichiometry", bp);
// if(item instanceof RdfObjectProxy) {
// tmpElement.setAttribute("resource", ((RdfObjectProxy)item).getResource(), rdf);
// } else {
// tmpElement.setAttribute("resource", item.resourceFromID(), rdf);
// }
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getComponents() != null && ob.getComponents().size() > 0) {
List<PhysicalEntity> list = ob.getComponents();
for (PhysicalEntity item : list) {
tmpElement = new Element("component", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
return element;
}
use of org.vcell.pathway.PhysicalEntity in project vcell by virtualcell.
the class PathwayReader method addObjectPhysicalEntity.
private PhysicalEntity addObjectPhysicalEntity(Element element) {
PhysicalEntity physicalEntity = new PhysicalEntity();
Namespace rdf = Namespace.getNamespace("rdf", DefaultNameSpaces.RDF.uri);
if (element.getAttributes().size() > 0) {
physicalEntity = new PhysicalEntity();
addAttributes(physicalEntity, element);
}
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentPhysicalEntity(physicalEntity, element, childElement)) {
showUnexpected(childElement, physicalEntity);
}
}
}
pathwayModel.add(physicalEntity);
return physicalEntity;
}
use of org.vcell.pathway.PhysicalEntity in project vcell by virtualcell.
the class AnnotationMapping method createPhysicalEntity.
private PhysicalEntity createPhysicalEntity(ArrayList<Xref> xRef, ArrayList<String> refName, String name) {
PhysicalEntity physicalEntity = null;
if (isSmallMolecule(xRef)) {
physicalEntity = new SmallMolecule();
} else {
physicalEntity = new PhysicalEntity();
}
physicalEntity.setName(refName);
physicalEntity.setID("BIOMODEL_" + name);
// physicalEntity.setxRef(xRef);
for (Xref ref : xRef) {
physicalEntity.getxRef().add(ref);
}
return physicalEntity;
}
Aggregations