[Biojava-l] add isTaxonHidden to NCBITaxon
David Scott
david at autohandle.com
Wed Jun 21 00:22:04 UTC 2006
in the genbank ORGANISM line where the taxonomy hierarchy is shown, not
all levels are show by genbank. whether a level is shown or not is
controlled by the isTaxonHidden flag in the genbank taxonomy file:
"nodes.dmp". biosql does not currently provide for a isTaxonHidden field
in the sg_taxon table. the table can be modified and the field added
locally. it would make to easier to make this modification to add
NCBITaxon.isTaxonHidden to NCBITaxon and SimpleNCBITaxon - modeling the
methods after a similar field: ComparableTerm.getObsolete:
NCBITaxon:
public boolean isTaxonHidden();
public void setTaxonHidden(final boolean isHidden) throws
ChangeVetoException;
SimpleNCBITaxon:
private boolean isTaxonHidden=false;
// for user
private boolean isTaxonHidden() {
... }
public void setTaxonHidden(final boolean isHidden) throws
ChangeVetoException {
... }
// for hibernate
private String getTaxonHiddenChar() {
... }
private void setTaxonHiddenChar(final String isHiddenChar) throws
ChangeVetoException {
... }
SimpleNCBITaxonomyLoader:
public NCBITaxon readNode(...
...
final String isTaxonHidden = parts[10].trim()// either "0" or "1"
....
try {
...
t.setTaxonHidden(Integer.parseInt(isTaxonHidden)==1);
...
the code would continue to operate as it has - until the database has
the additional field added locally and the hibernate mapping file
modified to map the new field into the Taxon object.
More information about the Biojava-l
mailing list