use of org.vcell.pathway.EntityFeature in project vcell by virtualcell.
the class PathwayReader method addObjectEntityFeature.
private EntityFeature addObjectEntityFeature(Element element) {
EntityFeature entityFeature = new EntityFeatureImpl();
addAttributes(entityFeature, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentEntityFeature(entityFeature, element, childElement)) {
showUnexpected(childElement, entityFeature);
}
}
}
pathwayModel.add(entityFeature);
return entityFeature;
}
use of org.vcell.pathway.EntityFeature in project vcell by virtualcell.
the class PathwayReaderBiopax3 method addObjectEntityFeature.
private EntityFeature addObjectEntityFeature(Element element) {
if (element.getChildren().size() == 0) {
EntityFeatureProxy proxy = new EntityFeatureProxy();
addAttributes(proxy, element);
pathwayModel.add(proxy);
return proxy;
}
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (childElement.getName().equals("BindingFeature")) {
BindingFeature thingie = addObjectBindingFeature(childElement);
pathwayModel.add(thingie);
return thingie;
} else if (childElement.getName().equals("FragmentFeature")) {
FragmentFeature thingie = addObjectFragmentFeature(childElement);
pathwayModel.add(thingie);
return thingie;
} else if (childElement.getName().equals("ModificationFeature")) {
ModificationFeature thingie = addObjectModificationFeature(childElement);
pathwayModel.add(thingie);
return thingie;
}
}
}
EntityFeature entityFeature = new EntityFeatureImpl();
addAttributes(entityFeature, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentEntityFeature(entityFeature, element, childElement)) {
showUnexpected(childElement);
}
}
}
pathwayModel.add(entityFeature);
return entityFeature;
}
use of org.vcell.pathway.EntityFeature in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentEntityFeature.
// featureLocation SequenceLocation multiple
// featureLocationType SequenceRegionVocabulary multiple
// memberFeature EntityFeature multiple
// evidence Evidence multiple
private Element addContentEntityFeature(BioPaxObject bpObject, Element element) {
element = addContentUtilityClass(bpObject, element);
EntityFeature ob = (EntityFeature) bpObject;
Element tmpElement = null;
if (ob.getFeatureLocation() != null && ob.getFeatureLocation().size() > 0) {
List<SequenceLocation> list = ob.getFeatureLocation();
for (SequenceLocation item : list) {
tmpElement = new Element("featureLocation", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getFeatureLocationType() != null && ob.getFeatureLocationType().size() > 0) {
List<SequenceRegionVocabulary> list = ob.getFeatureLocationType();
for (SequenceRegionVocabulary item : list) {
tmpElement = new Element("featureLocationType", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getMemberFeature() != null && ob.getMemberFeature().size() > 0) {
List<EntityFeature> list = ob.getMemberFeature();
for (EntityFeature item : list) {
tmpElement = new Element("memberFeature", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getEvidence() != null && ob.getEvidence().size() > 0) {
List<Evidence> list = ob.getEvidence();
for (Evidence item : list) {
tmpElement = new Element("evidence", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
return element;
}
use of org.vcell.pathway.EntityFeature in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentEntityReference.
// memberEntityReference EntityReference multiple
// entityReferenceType EntityReferenceTypeVocabulary single
// entityFeature EntityFeature multiple
// name String multiple
// xref Xref multiple
// evidence Evidence multiple
private Element addContentEntityReference(BioPaxObject bpObject, Element element) {
element = addContentUtilityClass(bpObject, element);
EntityReference ob = (EntityReference) bpObject;
Element tmpElement = null;
if (ob.getMemberEntityReference() != null && ob.getMemberEntityReference().size() > 0) {
List<EntityReference> list = ob.getMemberEntityReference();
for (EntityReference item : list) {
tmpElement = new Element("memberEntityReference", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getEntityReferenceType() != null) {
tmpElement = new Element("entityReferenceType", bp);
addIDToProperty(tmpElement, ob.getEntityReferenceType());
mustPrintObject(ob.getEntityReferenceType());
element.addContent(tmpElement);
}
if (ob.getEntityFeature() != null && ob.getEntityFeature().size() > 0) {
List<EntityFeature> list = ob.getEntityFeature();
for (EntityFeature item : list) {
tmpElement = new Element("entityFeature", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getName() != null && ob.getName().size() > 0) {
List<String> list = ob.getName();
for (String item : list) {
tmpElement = new Element("name", bp);
tmpElement.setAttribute("datatype", schemaString, rdf);
tmpElement.setText(item);
element.addContent(tmpElement);
}
}
if (ob.getxRef() != null && ob.getxRef().size() > 0) {
List<Xref> list = ob.getxRef();
for (Xref item : list) {
tmpElement = new Element("xref", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getEvidence() != null && ob.getEvidence().size() > 0) {
List<Evidence> list = ob.getEvidence();
for (Evidence item : list) {
tmpElement = new Element("evidence", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
return element;
}
use of org.vcell.pathway.EntityFeature 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;
}
Aggregations