Skip to content

Commit

Permalink
Replace ids for annotations
Browse files Browse the repository at this point in the history
* deal with problematic tabs, by converting the GAF line to hex
@kltm

* related to issue geneontology/amigo#293
  • Loading branch information
Heiko Dietze committed Mar 23, 2016
1 parent de2b683 commit 9c72e14
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.util.Map;
import java.util.Set;

import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.apache.solr.client.solrj.SolrServer;
Expand Down Expand Up @@ -686,7 +687,8 @@ private void add(Bioentity e) {
// WARNING: We're relying on the current truth that the toString() method returns a nice concatenated version
// of the GAF line, which is fundamentally unique (or should be). If this changes, revert to what we were
// doing here pre-20150930, which was assembling out own unique line manually.
annotation_doc.addField("id", a.toString());
String id = Hex.encodeHexString(a.toString().getBytes());
annotation_doc.addField("id", id);

// Finally add doc.
add(annotation_doc);
Expand Down

0 comments on commit 9c72e14

Please sign in to comment.