if (ontology.getTermBindingList() != null) { final List<OntologyBinding> termBindings = ontology.getTermBindingList();
if (ontology.getTermBindingList() != null) { indent(1, out); out.write("term_binding = <"); newline(out); for (int i = 0; i < ontology.getTermBindingList().size(); i++) { OntologyBinding bind = ontology.getTermBindingList().get(i); indent(2, out); out.write("["); newline(out); for (int j = 0; j < ontology.getTermBindingList().get(i) .getBindingList().size(); j++) { TermBindingItem item = (TermBindingItem) ontology .getTermBindingList().get(i).getBindingList() .get(j); indent(4, out);
if (ontology.getTermBindingList() != null) { indent(1, out); out.write("term_binding = <"); newline(out); for (int i = 0; i < ontology.getTermBindingList().size(); i++) { OntologyBinding bind = ontology.getTermBindingList().get(i); indent(2, out); out.write("["); newline(out); for (int j = 0; j < ontology.getTermBindingList().get(i) .getBindingList().size(); j++) { TermBindingItem item = (TermBindingItem) ontology .getTermBindingList().get(i).getBindingList() .get(j); indent(4, out);
public void checkArchetypeTermBindingsValidity(Archetype archetype, List<ValidationError> errors) { List<OntologyBinding> termBindings = archetype.getOntology().getTermBindingList(); ValidationError error = null; if (termBindings != null) { for (OntologyBinding binding : termBindings) { for (OntologyBindingItem obi : binding.getBindingList()) { if (obi.getCode().startsWith("at")) { // bound to an atcode if (archetype.getOntology().termDefinition(archetype.getOriginalLanguage().getCodeString(), obi.getCode()) == null) { error = new ValidationError(ErrorType.WITB, "ATCODE", obi.getCode()); errors.add(error); } } else { // bound to a complete path if (!archetype.physicalPaths().contains(obi.getCode())) { error = new ValidationError(ErrorType.WITB, "PATH", obi.getCode()); errors.add(error); } } } } } }