# saga::isn::entity_data_set Class Reference

`#include <entity_data_set.hpp>`

Inheritance diagram for saga::isn::entity_data_set:

[legend]

List of all members.

## Public Member Functions
| entity_data_set (const std::string &model, const std::string &entityType, const std::string &filter, session const &sess, const std::string &url) SAGA_THROW_SPEC() throw (saga::bad_parameter, saga::does_not_exist, saga::no_success, saga::not_implemented)
| entity_data_set (const std::string &model, const std::string &entityType, const std::string &filter) SAGA_THROW_SPEC() throw (saga::bad_parameter, saga::does_not_exist, saga::no_success, saga::not_implemented)
| entity_data_set (saga::object const &o)
| ~entity_data_set ()
std::vector < saga::isn::entity_data > | get_data () const SAGA_THROW_SPEC() throw ()
saga::isn::entity_data_set | get_related_entities (const std::string &relatedName, const std::string &filter=std::string()) const SAGA_THROW_SPEC() throw (saga::bad_parameterm saga::no_success)
std::vector< std::string > | list_related_entity_names () const
std::string | get_information_system_url () const
std::size_t | get_entity_count () const
## Protected Member Functions
| entity_data_set (saga::impl::entity_data_set *impl)
saga::impl::entity_data_set * | get_impl (void) const

## Detailed Description

Provides the means to navigate around the information model for a selected entity and gives access to the entity_data objects.

Navigation consists of moving from entity to entity within an information model, as expressed in the GLUE entity relationship model. Navigation can also be from entity to related entity. A list of possible navigation steps from an `entity_data_set` object is returned by the `list_related_entity_names` method. Navigation to a set of related entities is achieved with the `get_related_entities` method, which returns a new `entity_data_set` object. N.B. navigation is from a set of `entity_data` objects to a new set, a many to many relationship. In order to restrict the number of `entity_data` objects returned in the `entity_data_set` object, a filter may be used with the `get_related_entities` method. The filter MUST only include attributes from the related entity and it will be applied to the related entities.

## Constructor & Destructor Documentation

saga::isn::entity_data_set::entity_data_set | ( | saga::impl::entity_data_set * | impl | ) | `[explicit, protected]`

saga::isn::entity_data_set::entity_data_set | ( | const std::string & | model,
|  | const std::string & | entityType,
|  | const std::string & | filter,
|  | session const & | sess,
|  | const std::string & | url |
| ) |  |  | throw (saga::bad_parameter, saga::does_not_exist, saga::no_success, saga::not_implemented)

Creates an `EntityDataSet` that contains the set of entities that pass the specified filter. The filter MUST only include attributes from the named entity. Details about the filter can be found in the package description. The url specified is to assist the implementation to locate the underlying information system such that it can be queried.

Parameters:

  | model | a string containing the name of the information model
  | entityType | a string containing the name of the entity to navigate
  | filter | a string containing the filter for filtering entities, may be `null`
  | sess | the session handle
  | url | the URL to guide the implementation

Returns:
  the entity_data_set instance

Exceptions:

  | bad_parameter | if the related name is not valid, or the filter is not valid
  | does_not_exist | if the url is syntactically valid, but no service can be contacted at that URL
  | no_success | if no result can be returned because of information system or other internal problems
  | not_implemented | if not implemented by that SAGA implementation at all

saga::isn::entity_data_set::entity_data_set | ( | const std::string & | model,
|  | const std::string & | entityType,
|  | const std::string & | filter |
| ) |  |  | throw (saga::bad_parameter, saga::does_not_exist, saga::no_success, saga::not_implemented)

Creates an `entity_data_set` that contains the set of entities that pass the specified filter. The filter MUST only include attributes from the named entity. Details about the filter can be found in the package description.

Parameters:

  | model | a string containing the name of the information model
  | entityType | a string containing the type of the entity to navigate to
  | filter | a string containing the filter for filtering entities

Returns:
  the entity_data_set instance

Exceptions:

  | BadParameter | if the related name is not valid, or the filter is not valid
  | DoesNotExist | if the url is syntactically valid, but no service can be contacted at that URL
  | NoSuccess | if no result can be returned because of information system or other internal problems
  | NotImplemented | if not implemented by that SAGA implementation at all

saga::isn::entity_data_set::entity_data_set | ( | saga::object const & | o | ) | `[explicit]`

References saga::BadParameter, saga::object::get_type(), and saga::object::ServiceDescription.

saga::isn::entity_data_set::~entity_data_set | ( |  | ) | `[inline]`

## Member Function Documentation

saga::impl::entity_data_set * saga::isn::entity_data_set::get_impl | ( | void |  | ) | const`[protected]`

Referenced by get_data(), get_entity_count(), get_information_system_url(), get_related_entities(), and list_related_entity_names().

std::vector< saga::isn::entity_data > saga::isn::entity_data_set::get_data | ( |  | ) | const throw ()

Returns a vector of `entity_data` objects.

Returns:
  a vector of `entity_data` objects associated with this entity

References get_impl().

saga::isn::entity_data_set saga::isn::entity_data_set::get_related_entities | ( | const std::string & | relatedName,
|  | const std::string & | filter = `std::string()` |
| ) |  |  | const throw (saga::bad_parameterm saga::no_success)

Returns an `entity_data_set` object for the given entity name and matching the filter string. The filter MUST only include attributes from the related entity. More details about the filter can be found in the package description. N.B. There is a special case where there is a self relationship between entities, i.e. "AdminDomain" in GLUE 2, in such cases the keywords `up` and `down` may be used in place of the name of the related entity to navigate to. For example where AdminDomain="rl.ac.uk" up may return AdminDomain="ac.uk".

Parameters:

  | relatedName | a string containing the name of the related entity to navigate to
  | filter | a string containing the filter for filtering related entities, may be empty

Returns:
  a related entity_data_set matching the specified filter string

Exceptions:

  | BadParameter | if the related name is not valid, or the filter is not valid
  | NoSuccess | if no result can be returned because of information system or other internal problems

See also:
  list_related_entity_names()

References get_impl().

std::vector< std::string > saga::isn::entity_data_set::list_related_entity_names | ( |  | ) | const

Returns a set of names of those entities that may be navigated to, from this entity_data_set. N.B There is a special case where there is a self relationship between entities, i.e. "AdminDomain" in GLUE 2, in such cases the keywords `up` and `down` will also be returned as appropriate.

Returns:
  a list of names of related entities

References get_impl().

std::string saga::isn::entity_data_set::get_information_system_url | ( |  | ) | const

References get_impl().

std::size_t saga::isn::entity_data_set::get_entity_count | ( |  | ) | const

References get_impl().

The documentation for this class was generated from the following files:

- entity_data_set.hpp
- entity_data_set.cpp