| lsid-perl documentation | view source | Contained in the lsid-perl distribution. |
LS::Client::BasicResolver - Simple Resolution Client for LSIDs
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);
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.
The following method is used to construct a new
LS::Client::BasicResolver object:
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!";
}
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:
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.
Sets or retrieves an LS::Resource object for the given 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.
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.
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.
Invokes getDataByRange, not currently implemented.
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.
Invokes getMetadataSubset, not currently implemented.
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
| lsid-perl documentation | view source | Contained in the lsid-perl distribution. |