|
[HepData-svn] r1666 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/formatsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Nov 11 14:58:33 GMT 2013
Author: whalley Date: Mon Nov 11 14:58:32 2013 New Revision: 1666 Log: fix for unknown error source ? Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java Mon Nov 11 14:54:10 2013 (r1665) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java Mon Nov 11 14:58:32 2013 (r1666) @@ -87,7 +87,8 @@ s.append(" <error"); if(err.getPlus() != null){ s.append(" plus='" + err.getPlus() + "'"); } if(err.getMinus() != null){ s.append(" minus='" + err.getMinus() + "'"); } - if(err.getSourceType() != null){ s.append(" source='" + err.getSourceType().toShortString() + "'"); } + if(err.getSourceType().toShortString().equals("?")){ s.append(" source='unknown'"); } + else if(err.getSourceType() != null){ s.append(" source='" + err.getSourceType().toShortString() + "'"); } if(err.getNormType() != null){ s.append(" norm='" + err.getNormType().toShortName() + "'"); } s.append(" >\n"); if(err.getComment() != null){ @@ -158,7 +159,8 @@ s.append(" <error"); if(err.getPlus() != null){ s.append(" plus='" + err.getPlus() + "'"); } if(err.getMinus() != null){ s.append(" minus='" + err.getMinus() + "'"); } - if(err.getSourceType() != null){ s.append(" source='" + err.getSourceType().toShortString() + "'"); } + if(err.getSourceType().toShortString().equals("?")){ s.append(" source='unknown'"); } + else if(err.getSourceType() != null){ s.append(" source='" + err.getSourceType().toShortString() + "'"); } if(err.getNormType() != null){ s.append(" norm='" + err.getNormType().toShortName() + "'"); } s.append(" >\n"); if(err.getComment() != null){ @@ -178,7 +180,8 @@ s.append(" <error errorId='" + err.getId() + "'"); if(err.getPlus() != null){ s.append(" plus='" + err.getPlus() + "'"); } if(err.getMinus() != null){ s.append(" minus='" + err.getMinus() + "'"); } - if(err.getSourceType() != null){ s.append(" source='" + err.getSourceType().toShortString() + "'"); } + if(err.getSourceType().toShortString().equals("?")){ s.append(" source='unknown'"); } + else if(err.getSourceType() != null){ s.append(" source='" + err.getSourceType().toShortString() + "'"); } if(err.getNormType() != null){ s.append(" norm='" + err.getNormType().toShortName() + "'"); } s.append(" >\n"); if(err.getComment() != null && !err.getComment().equals("")){
More information about the HepData-svn mailing list |