Back to project page DIYgenomics_Android.
The source code is released under:
/** * Copyright (C) 2010 DIYgenomics diygenomics.org * Copyright (C) 2010 Melanie Swan mxswan@gmail * Copyright (C) 2010 Michael Kolb * Copyright (C) 2010 Lawrence S. Wong * All rights reserved. * * M...
If you think the Android project DIYgenomics_Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.diygenomics.pg; /* w w w . j a v a 2s .co m*/ import java.io.Serializable; /** * a study referenced by a company */ public class Study implements Serializable, Comparable { static final String PUBMED_PREFIX = "http://www.ncbi.nlm.nih.gov/pubmed/"; public String citation; public String pubmedid; public Study() { } /** * create a new study object given its citation string and the pubmedid * * @param id * the pubmedid * @param citation */ public Study(String id, String cit) { citation = cit; pubmedid = id; } public int compareTo(Study other) { return citation.compareTo(other.citation); } public String getUrl() { return PUBMED_PREFIX + pubmedid; } public String toString() { return pubmedid + "/" + citation; } @Override public int compareTo(Object obj) { if (obj instanceof Study) { return compareTo((Study) obj); } else { return -1; } } }