use of org.vcell.pathway.ControlledVocabulary in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentControlledVocabulary.
// term String multiple
// xref Xref multiple
private Element addContentControlledVocabulary(BioPaxObject bpObject, Element element) {
element = addContentUtilityClass(bpObject, element);
ControlledVocabulary ob = (ControlledVocabulary) bpObject;
Element tmpElement = null;
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.getTerm() != null && ob.getTerm().size() > 0) {
List<String> list = ob.getTerm();
for (String item : list) {
tmpElement = new Element("term", bp);
tmpElement.setAttribute("datatype", schemaString, rdf);
tmpElement.setText(item);
element.addContent(tmpElement);
}
}
return element;
}
use of org.vcell.pathway.ControlledVocabulary in project vcell by virtualcell.
the class PathwayReaderBiopax3 method addObjectControlledVocabulary.
private ControlledVocabulary addObjectControlledVocabulary(Element element) {
ControlledVocabulary controlledVocabulary = new ControlledVocabulary();
addAttributes(controlledVocabulary, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentControlledVocabulary(controlledVocabulary, element, childElement)) {
showUnexpected(childElement);
}
}
}
pathwayModel.add(controlledVocabulary);
return controlledVocabulary;
}
use of org.vcell.pathway.ControlledVocabulary in project vcell by virtualcell.
the class PathwayReader method addObjectControlledVocabulary.
private ControlledVocabulary addObjectControlledVocabulary(Element element) {
ControlledVocabulary controlledVocabulary = new ControlledVocabulary();
addAttributes(controlledVocabulary, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentControlledVocabulary(controlledVocabulary, element, childElement)) {
showUnexpected(childElement, controlledVocabulary);
}
}
}
pathwayModel.add(controlledVocabulary);
return controlledVocabulary;
}
Aggregations