The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

LS::Client::BasicResolver - Simple Resolution Client for LSIDs

SYNOPSIS

 use LS::ID;
 use LS::Client::BasicResolver;

 $lsid = LS::ID->new('URN:LSID:pdb.org:PDB:112L:');

 $resolver = LS::Client::BasicResolver->new();

 $metadata = $resolver->getMetadata(lsid=> $lsid);

DESCRIPTION

LS::Client::BasicResolver provides a simple interface to resolve LSIDs. This implementation is based on the standard found here http://www.omg.org/cgi-bin/doc?dtc/04-05-01.

CONSTRUCTORS

The following method is used to construct a new LS::Client::BasicResolver object:

new

This class method creates a new LS::Client::BasicResolver object.

Examples:

 $resolver = LS::Client::BasicResolver->new();

 if (!$resolver) {
        print STDERR "Unable to create resolver object!";
 }

METHODS

With the exception of cacheAuthority and cacheResource, all method calls accept a hash of their parameters in the form: param_name= value>

LS::Client::BasicResolver supports the following methods:

cacheAuthority ( $lsid, [ $authority ] )

Sets or retrieves an LS::Authority object for the given LSID.

If the $authority parameter is left unspecified, the LS::Authority object for $lsid is returned.

cacheResource ( $lsid, [ $resource ] )

Sets or retrieves an LS::Resource object for the given LSID.

resolve ( lsid=> $lsid )

Retrieves the authority WSDL for the specified LSID in the form of an LS::Authority object.

This method performs the necessary steps to resolve an LSID if it is not present in LS::Client::BasicResolver's cache. If the LSID has already been resolved, then the cached copy of the LS::Authority object is returned without querying any external resources.

getResource ( lsid=> $lsid, protocol=> $protocol, credentials=> $credentials )

The parameter lsid must be specified while protocol and credentials are optional. protocol can be one of the following: $LS::Authority::WSDL::SOAP, $LS::Authority::WSDL::HTTP, or $LS::Authority::WSDL::FTP. The use of $LS::Authority::WSDL::FTP is discouraged.

Retrieves an LS::Resource for the specified LSID.

This method returns an LS::Resource object which can later be used to invoke LSID service routines such as getData and getMetadata.

getData ( lsid=> $lsid )

Invokes the getData service method (if available) and returns an LS::Service::Response object if successful. Otherwise, in the case of an error or the service method not being implemented undef is returned.

This is essentially:

 $resource = $resolver->getResource(lsid=> $lsid, %other_options);
 return $resource->getData();
 

See getResource for additional parameters that can be passed to getData.

getDataByRange ( lsid=> $lsid )

Invokes getDataByRange, not currently implemented.

getMetadata ( lsid=> $lsid )

Invokes the getMetadata service method if available. The method returns an LS::Service::Response object if successful. In the case of an error or the service method is not implemented, undef is returned.

This is essentially:

 $resource = $resolver->getResource(lsid=> $lsid, %other_options);
 return $resource->getMetadata();
 

See getResource for additional parameters that can be passed to getMetadata.

getMetadataSubset ( lsid=> $lsid )

Invokes getMetadataSubset, not currently implemented.

COPYRIGHT

Copyright (c) 2002,2003 IBM Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Common Public License v1.0 which accompanies this distribution, and is available at http://www.opensource.org/licenses/cpl.php