Commit 8048b47b authored by Magali Ruffier's avatar Magali Ruffier
Browse files

ENSCORESW-308: added support for is_obsolete

parent 8d9096bc
...@@ -99,9 +99,9 @@ sub new { ...@@ -99,9 +99,9 @@ sub new {
my $this = $proto->SUPER::new(@_); my $this = $proto->SUPER::new(@_);
my ( $accession, $ontology, $namespace, $name, $definition, $is_root, $subsets ) my ( $accession, $ontology, $namespace, $name, $definition, $is_root, $is_obsolete, $subsets )
= rearrange( [ 'ACCESSION', 'ONTOLOGY', 'NAMESPACE', 'NAME', = rearrange( [ 'ACCESSION', 'ONTOLOGY', 'NAMESPACE', 'NAME',
'DEFINITION', 'IS_ROOT', 'SUBSETS' ], 'DEFINITION', 'IS_ROOT', 'IS_OBSOLETE', 'SUBSETS' ],
@_ ); @_ );
$this->{'accession'} = $accession; $this->{'accession'} = $accession;
...@@ -110,6 +110,7 @@ sub new { ...@@ -110,6 +110,7 @@ sub new {
$this->{'name'} = $name; $this->{'name'} = $name;
$this->{'definition'} = $definition; $this->{'definition'} = $definition;
$this->{'is_root'} = $is_root; $this->{'is_root'} = $is_root;
$this->{'is_obsolete'}= $is_obsolete;
$this->{'subsets'} = [ @{$subsets} ]; $this->{'subsets'} = [ @{$subsets} ];
$this->{'child_terms_fetched'} = 0; $this->{'child_terms_fetched'} = 0;
...@@ -220,6 +221,24 @@ sub is_root { ...@@ -220,6 +221,24 @@ sub is_root {
return $this->{'is_root'}; return $this->{'is_root'};
} }
=head2 is_obsolete
Arg : None
Description : Returns true if the term is obsolete
Example : my $is_obsolete = $term->is_obsolete();
Return type : Boolean (TRUE if it is obsolete, else FALSE)
=cut
sub is_obsolete {
my ($this) = @_;
return $this->{'is_obsolete'};
}
=head2 synonyms =head2 synonyms
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment