SAGA C++ API 1.6
saga::sd::service_description Class Reference

#include <service_description.hpp>

Inheritance diagram for saga::sd::service_description:

List of all members.

Public Member Functions

 ~service_description (void) SAGA_THROW_SPEC() throw ()
service_descriptionoperator= (saga::object const &o) SAGA_THROW_SPEC() throw ()
std::string get_url () SAGA_THROW_SPEC() throw ()
std::vector
< saga::sd::service_description
get_related_services () SAGA_THROW_SPEC() throw (saga::authorization_failed, saga::authentication_failed, saga::timeout, saga::no_success)
saga::sd::service_dataget_data () SAGA_THROW_SPEC() throw ()

Protected Member Functions

 service_description (saga::impl::service_description *impl, saga::url loc)
void set_session (TR1::shared_ptr< saga::session > sess)
void set_data (std::string data_key, std::string data_value)
 service_description (saga::url loc)
 service_description (saga::object const &o)

Detailed Description

Read access to the top level data of the service and a means to navigate to related services. This class implements the attributes interface and offers getter methods to obtain details of that service. The attributes are based on those found in GLUE. They are:

Url
url to contact the service. The get_url method obtains the same information.
Type
type of service. This field is not an empty string.
Uid
unique identifier of service. This field is not an empty string.
Site
name of site. This field is not an empty string.
Name
name of service - not necessarily unique. This field is not an empty string.
implementor
name of the organisation providing the implementation of the service. This field is not an empty string.
Related_Services
uids of related services. This returns the uids of the related services. This is unlike the method get_related_services which returns a vector of service_description objects.

Definition at line 95 of file service_description.hpp.


Constructor & Destructor Documentation

saga::sd::service_description::service_description ( saga::impl::service_description *  impl,
saga::url  loc 
) [explicit, protected]
saga::sd::service_description::service_description ( saga::object const &  o) [explicit, protected]
saga::sd::service_description::~service_description ( void  ) throw ()

Destructor

Definition at line 93 of file service_description.cpp.


Member Function Documentation

void saga::sd::service_description::set_session ( TR1::shared_ptr< saga::session sess) [protected]

Definition at line 197 of file service_description.cpp.

void saga::sd::service_description::set_data ( std::string  data_key,
std::string  data_value 
) [protected]

Definition at line 105 of file buffer.cpp.

service_description & saga::sd::service_description::operator= ( saga::object const &  o) throw ()

Definition at line 107 of file service_description.cpp.

std::string saga::sd::service_description::get_url ( ) throw ()

Returns the URL to contact the service. The URL may also be obtained using the saga::attributes interface.

Returns:
a string containing the URL to contact this service

Definition at line 128 of file service_description.cpp.

References saga::detail::attribute< service_description >::attribute_exists(), saga::BadParameter, saga::detail::attribute< service_description >::get_attribute(), and saga::sd::attributes::service_description_url.

std::vector< saga::sd::service_description > saga::sd::service_description::get_related_services ( ) throw (saga::authorization_failed, saga::authentication_failed, saga::timeout, saga::no_success)

Returns a vector of related services. Alternatively, the saga::attributes interface may be used to get the uids of the related services.

Returns:
a set of related services. This may be an empty set.
Exceptions:
authorization_failedif none of the available contexts of the used session could be used for successful authorization. That error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
authentication_failedif none of the available session contexts could successfully be used for authentication
timeoutif a remote operation did not complete successfully because the network communication or the remote service timed out
no_successif no result can be returned because of information system or other internal problems

Definition at line 143 of file service_description.cpp.

References saga::detail::attribute< service_description >::attribute_exists(), saga::detail::attribute< service_description >::get_attribute(), saga::object::get_session(), saga::detail::attribute< service_description >::get_vector_attribute(), saga::sd::discoverer::list_services(), saga::sd::attributes::service_description_information_provider_url, and saga::sd::attributes::service_description_relatedservices.

saga::sd::service_data & saga::sd::service_description::get_data ( ) throw ()

Returns a service_data object with the service data key/value pairs.

Returns:
the service data for this service. This may be empty, i.e.has no attributes at all.

Definition at line 137 of file service_description.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines