org.ogf.saga.isn
Interface EntityDataSet

All Superinterfaces:
Cloneable, SagaObject

public interface EntityDataSet
extends SagaObject

Provides the means to navigate around the information model for a selected entity and gives access to the EntityData 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 EntityDataSet object is returned by the listRelatedEntityNames method. Navigation to a set of related entities is achieved with the getRelatedEntities method, which returns a new EntityDataSet object. N.B. navigation is from a set of EntityData objects to a new set, a many to many relationship.

In order to restrict the number of EntityData objects returned in the EntityDataSet object, a filter may be used with the getRelatedEntities method. The filter MUST only include attributes from the related entity and it will be applied to the related entities.


Field Summary
 
Fields inherited from interface org.ogf.saga.SagaObject
NO_WAIT, WAIT_FOREVER
 
Method Summary
 Set<EntityData> getData()
          Returns a set of EntityData objects.
 EntityDataSet getRelatedEntities(String relatedName)
          Returns an EntityDataSet object for the given entity name.
 EntityDataSet getRelatedEntities(String relatedName, String filter)
          Returns an EntityDataSet object for the given entity name and matching the filter string.
 List<String> listRelatedEntityNames()
          Returns a set of names of those entities that may be navigated to, from this EntityDataSet.
 
Methods inherited from interface org.ogf.saga.SagaObject
clone, getId, getSession
 

Method Detail

getData

Set<EntityData> getData()
Returns a set of EntityData objects.

Returns:
a set of EntityData objects associated with this entity

getRelatedEntities

EntityDataSet getRelatedEntities(String relatedName,
                                 String filter)
                                 throws BadParameterException,
                                        NoSuccessException
Returns an EntityDataSet 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 null
Returns:
a related entity data set matching the specified filter string
Throws:
BadParameterException - if the related name is not valid, or the filter is not valid
NoSuccessException - if no result can be returned because of information system or other internal problems
See Also:
listRelatedEntityNames()

getRelatedEntities

EntityDataSet getRelatedEntities(String relatedName)
                                 throws BadParameterException,
                                        NoSuccessException
Returns an EntityDataSet object for the given entity name. 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
Returns:
a related entity data set
Throws:
BadParameterException - if the related name is not valid
NoSuccessException - if no result can be returned because of information system or other internal problems
See Also:
listRelatedEntityNames()

listRelatedEntityNames

List<String> listRelatedEntityNames()
Returns a set of names of those entities that may be navigated to, from this EntityDataSet. 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


Copyright © 2014 Open Grid Forum. All rights reserved.