SAGA C++ API 1.6
saga::isn::entity_data_set Class Reference

#include <entity_data_set.hpp>

Inheritance diagram for saga::isn::entity_data_set:

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.

Definition at line 51 of file entity_data_set.hpp.


Constructor & Destructor Documentation

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

Definition at line 46 of file entity_data_set.cpp.

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:
modela string containing the name of the information model
entityTypea string containing the name of the entity to navigate
filtera string containing the filter for filtering entities, may be null
sessthe session handle
urlthe URL to guide the implementation
Returns:
the entity_data_set instance
Exceptions:
bad_parameterif the related name is not valid, or the filter is not valid
does_not_existif the url is syntactically valid, but no service can be contacted at that URL
no_successif no result can be returned because of information system or other internal problems
not_implementedif not implemented by that SAGA implementation at all

Definition at line 21 of file entity_data_set.cpp.

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:
modela string containing the name of the information model
entityTypea string containing the type of the entity to navigate to
filtera string containing the filter for filtering entities
Returns:
the entity_data_set instance
Exceptions:
BadParameterif the related name is not valid, or the filter is not valid
DoesNotExistif the url is syntactically valid, but no service can be contacted at that URL
NoSuccessif no result can be returned because of information system or other internal problems
NotImplementedif not implemented by that SAGA implementation at all

Definition at line 34 of file entity_data_set.cpp.

saga::isn::entity_data_set::entity_data_set ( saga::object const &  o) [explicit]
saga::isn::entity_data_set::~entity_data_set ( ) [inline]

Definition at line 137 of file entity_data_set.hpp.


Member Function Documentation

saga::impl::entity_data_set * saga::isn::entity_data_set::get_impl ( void  ) const [protected]
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

Definition at line 61 of file entity_data_set.cpp.

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:
relatedNamea string containing the name of the related entity to navigate to
filtera string containing the filter for filtering related entities, may be empty
Returns:
a related entity_data_set matching the specified filter string
Exceptions:
BadParameterif the related name is not valid, or the filter is not valid
NoSuccessif no result can be returned because of information system or other internal problems
See also:
list_related_entity_names()

Definition at line 74 of file entity_data_set.cpp.

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

Definition at line 82 of file entity_data_set.cpp.

References get_impl().

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

Definition at line 87 of file entity_data_set.cpp.

References get_impl().

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

Definition at line 92 of file entity_data_set.cpp.

References get_impl().


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