#include <entity_data_set.hpp>
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 |
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.
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.
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 |
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 |
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.
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 |
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 |
Definition at line 34 of file entity_data_set.cpp.
saga::isn::entity_data_set::entity_data_set | ( | saga::object const & | o | ) | [explicit] |
Definition at line 51 of file entity_data_set.cpp.
References saga::BadParameter, saga::object::get_type(), and saga::object::ServiceDescription.
saga::isn::entity_data_set::~entity_data_set | ( | ) | [inline] |
Definition at line 137 of file entity_data_set.hpp.
saga::impl::entity_data_set * saga::isn::entity_data_set::get_impl | ( | void | ) | const [protected] |
Definition at line 66 of file entity_data_set.cpp.
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.
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".
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 |
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 |
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.
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().