NAME

LS::Service::Namespace - Namespace for data or metadata retrieval

SYNOPSIS

 package TestNamespace;

 use LS::Service;

 use vars qw( @ISA );

 @ISA = ( 'LS::Service::Namespace' );

 sub getMetadata {

 	 my $self = shift;

	 # $metadata_type is undefined for getData calls
	 my ($lsid, $requestedFormats) = @_;

	 #
	 # You must return a LS::Service::Response object with the data to be
	 # attached. Expiration headers should be provided in the SOAP envelope.
	 #
 	 # If there is an error, you can return an LS::Service::Fault object
	 #
	 return new LS::Service::Response(format=> 'text/plain',
					  response=> 'Metadata');
 }

 package Service;

 # Add a namespace to a metadata service
 my $ns = TestNamespace->new(name=> 'myNamespace');

 my $metadata = new LS::Service::DataService;
 $metadata->addNamespace($ns);

DESCRIPTION

Creates namespaces to be added to data or metadata services. Each namespace is responsible for retrieving and formatting its data so that it can be included in the SOAP MIME attachment. The specified function can return a LS::Service::Response object which can hold expiration, data/metadata, format type returned to the client.

METHODS

new ( %options )

Use this constructor to create namespaces with the following %option keys:

    name: The name of the namespace as seen in the LSID (e.g myns is the namespace in urn:lsid:mylsid.org:myns:object)

METHODS

getData ( $lsid )

Wrapper function for the user supplied method that will be called to retrieve the data or metadata. The first and only parameter is the LSID that is associated with the data or metadata

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