package com.github.lindenb.semontology;
import java.util.Arrays;
/**
* Terms from https://github.com/lindenb/semontology
* A java enum that can be used in your java projects.
*
* @author Pierre Lindenbaum PhD @yokofakun
*/
@javax.annotation.Generated(value="xslt",date="2017-04-06T09:53:14+02:00",comments="generated from https://github.com/lindenb/semontology")
public enum Term
{
/** comment **/
ID_0000000("comment"),
/** I_have_written_it **/
ID_0000001("I_have_written_it"),
/** please_do_not_look_at_the_code **/
ID_0000002("please_do_not_look_at_the_code"),
/** i_use_it_regularly **/
ID_0000003("i_use_it_regularly"),
/** i_do_not_remember_why_I_wrote_it **/
ID_0000004("i_do_not_remember_why_I_wrote_it"),
/** unmaintained **/
ID_0000005("unmaintained"),
/** pull_requests_welcomed **/
ID_0000006("pull_requests_welcomed"),
/** i_do_not_accept_pull_requests **/
ID_0000007("i_do_not_accept_pull_requests"),
/** it_was_a_one_shot **/
ID_0000008("it_was_a_one_shot"),
/** i_do_not_understand_how_it_could_work **/
ID_0000009("i_do_not_understand_how_it_could_work"),
/** i_should_write_some_tests **/
ID_0000010("i_should_write_some_tests"),
/** i_do_not_understand_my_code **/
ID_0000011("i_do_not_understand_my_code"),
/** it_is_deprecated **/
ID_0000012("it_is_deprecated"),
/** better_softwares_exist **/
ID_0000013("better_softwares_exist"),
/** i_would_not_write_it_like_that_now **/
ID_0000014("i_would_not_write_it_like_that_now"),
/** i_wrote_it_for_biostars **/
ID_0000015("i_wrote_it_for_biostars"),
/** i_have_to_used_it_for_years **/
ID_0000016("i_have_to_used_it_for_years"),
/** just_a_proof_of_concept **/
ID_0000017("just_a_proof_of_concept"),
/** still_in_beta **/
ID_0000018("still_in_beta"),
/** autogenerated **/
ID_0000019("autogenerated"),
/** published **/
ID_0000020("published"),
/** unpublished **/
ID_0000021("unpublished"),
/** i_should_write_a_paper **/
ID_0000022("i_should_write_a_paper"),
/** it_is_broken **/
ID_0000023("it_is_broken"),
/** documention_is_missing **/
ID_0000024("documention_is_missing"),
/** documention_exists **/
ID_0000025("documention_exists"),
/** the_code_is_the_documentation **/
ID_0000026("the_code_is_the_documentation"),
/** documentation_is_embbeded **/
ID_0000027("documentation_is_embbeded"),
/** it_compiles **/
ID_0000028("it_compiles"),
/** i_wrote_it_for_a_social_network **/
ID_0000029("i_wrote_it_for_a_social_network"),
/** my_colleagues_use_it_regularly **/
ID_0000030("my_colleagues_use_it_regularly"),
/** i_should_annotate_this_with_semontology **/
ID_0000031("i_should_annotate_this_with_semontology")
;
private final String label;
Term(final String label) { this.label=label;}
public String getAccession() { return this.name().replace('_',':');}
public String getLabel() { return this.label;}
public static Term findByLabel(final String lbl)
{
return Arrays.stream(values()).
filter(T->T.getLabel().equals(lbl) ).
findAny().orElse(null);
}
public static Term findByAccession(final String acn)
{
return Arrays.stream(values()).
filter(T->T.getAccession().equals(acn)|| T.name().equals(acn)).
findAny().orElse(null);
}
public static void main(final String args[])
{
for(final Term t: Term.values()) System.out.println(t.name()+"\t"+t.getAccession());
}
}