Changeset 20743
- Timestamp:
- 26/02/10 20:56:12 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bio/sources/chado-db/main/src/org/intermine/bio/dataconversion/ModEncodeMetaDataProcessor.java
r20738 r20743 521 521 private void setAppliedProtocolSteps(Connection connection) 522 522 throws ObjectStoreException { 523 Iterator<Integer> ap = appliedProtocolMap.keySet().iterator(); 524 while (ap.hasNext()) { 525 Integer thisAPId = ap.next(); 526 Attribute attr = new Attribute(); 527 attr.setName("step"); 528 attr.setValue(appliedProtocolMap.get(thisAPId).step.toString()); 529 530 getChadoDBConverter().store(attr, 531 appliedProtocolIdMap.get(thisAPId)); 523 for (Integer appliedProtocolId : appliedProtocolMap.keySet()) { 524 Integer step = appliedProtocolMap.get(appliedProtocolId).step; 525 if (step != null) { 526 Attribute attr = new Attribute("step", step.toString()); 527 getChadoDBConverter().store(attr, appliedProtocolIdMap.get(appliedProtocolId)); 528 } else { 529 AppliedProtocol ap = appliedProtocolMap.get(appliedProtocolId); 530 LOG.warn("AppliedProtocol.step not set for chado id: " + appliedProtocolId 531 + " sub " + ap.submissionId + " inputs " + ap.inputs + " outputs " 532 + ap.outputs); 533 } 532 534 } 533 535 } … … 1646 1648 + comma + attValue + comma + attDbxref + System.getProperty("line.separator")); 1647 1649 1650 if (submissionId == null) { 1651 LOG.warn("Failed to find a submission id for data id " + dataId + " - this probably" 1652 + " means there is a problem with the applied_protocol DAG strucuture."); 1653 continue; 1654 } 1655 1648 1656 // Currently using attValue for referenced submission DCC id, should be dbUrl but seems 1649 1657 // to be filled in incorrectly … … 1657 1665 new SubmissionReference(referencedSubId, wikiPageUrl); 1658 1666 submissionRefs.put(submissionId, subRef); 1667 LOG.info("Submission " + dccId + " (" + submissionId + ") has reference to " 1668 + attValue + " (" + referencedSubId + ")"); 1669 } else { 1670 LOG.warn("Could not find submission " + attValue + " referenced by " + dccId); 1659 1671 } 1660 1672 } … … 1918 1930 Integer submissionId, SubmissionProperty prop) { 1919 1931 // submissionId -> [type -> SubmissionProperty] 1932 if (submissionId == null) { 1933 throw new RuntimeException("Called addToSubToTypes with a null sub id!"); 1934 } 1935 1920 1936 Map<String, List<SubmissionProperty>> typeToSubProp = subToTypes.get(submissionId); 1921 1937 if (typeToSubProp == null) {
Note: See TracChangeset
for help on using the changeset viewer.
