WebService-UMLSKS-Similarity

 view release on metacpan or  search on metacpan

lib/WebService/UMLSKS/GetNeighbors.pm  view on Meta::CPAN


=head1 NAME

WebService::UMLSKS::GetNeighbors - Fetches all the neighbor concepts for the input concept.

=head1 SYNOPSIS

=head2 Basic Usage

    use WebService::UMLSKS::GetNeighbors;
    
    my $Neighbors_ref = call_getconceptproperties($cui);# Neighbors_ref is a hash reference
    my $read_Neighbors = new GetNeighbors;
    # $ref is a reference of an array of all Neighbors' CUI for the input cui.
    my $ref  = $read_Neighbors->read_object( $Neighbors_ref );   
	   


=head1 DESCRIPTION

This module has package GetParents which has subroutines 'new', 'read_object','extract_object_class', 
'format_object', 'format_homogeneous_hash', 'format_scalar', format_homogeneous_array.


=head1 SUBROUTINES

The subroutines are as follows:


=cut

###############################################################################
##########  CODE STARTS HERE  #################################################



use SOAP::Lite;
use strict;
use warnings;

no warnings qw/redefine/;


package WebService::UMLSKS::GetNeighbors;
our $ConceptInfo_ref;
use Log::Message::Simple qw[msg error debug];
my %ConceptInfo;
my %directions;
my @parents;
my @children;
my @siblings;
my $indentation;
my $verbose = 0;
my @attribute = ();
my @relationattr = ();


#print "\n in format hash";
	#my %directions =  %$WebService::UMLSKS::FormGraph::Directions_ref;
	
	#$directions{"PAR"} = "U";
	#$directions{"CHD"} = "D";
	#$directions{"RB"} = "H";
	#$directions{"RN"} = "H";

=head2 new

This sub creates a new object of GetNeighbors.

=cut

sub new {
	my $class = shift;
	my $self  = {};

	#print "in new in display_info";
	bless( $self, $class );
	return $self;
}

=head2 read_object

This sub reads hash reference object passed to this
sub and fetches the required Neighbors' information.

=cut

sub read_object {

	my $self        = shift;
	my $object_refr = shift;
	my $qterm = shift;
	my $ver = shift;
	my $directions_ref = shift;
	my $attribute_ref = shift;
	
	$verbose = $ver;
	 %directions = %$directions_ref;
	# printHash(\%directions);


	# If the attributes are specified, then set the relations and relation attributes.

	if(@$attribute_ref){
		
		foreach my $attr (@$attribute_ref){

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.412 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )