CitySDK iOS Library
 All Classes Functions Variables Enumerations Enumerator Properties
Instance Methods | Properties | List of all members
Resources Class Reference

Represents the resources provided by a server. It contains all the available HypermediaLink given by server alongside their API versions. More...

Inheritance diagram for Resources:
<Deserializable>

Instance Methods

(void) - addResource:
 Adds a HypermediaLink. More...
 
(bool) - hasVersion:
 
(bool) - hasResource:inVersion:
 
(bool) - hasResourceParameter:inResource:inVersion:
 
(HypermediaLink *) - getHypermediaWithVersion:
 
(NSArray *) - getResources:
 
(NSArray *) - getVersions
 

Properties

NSMutableDictionary * resources
 

Detailed Description

Represents the resources provided by a server. It contains all the available HypermediaLink given by server alongside their API versions.

Author
Pedro Cruz

Method Documentation

- (void) addResource: (HypermediaLink *)  link

Adds a HypermediaLink.

Parameters
linkthe HypermediaLink to be added.
- (HypermediaLink *) getHypermediaWithVersion: (NSString *)  version

Gets the HypermediaLink with the given version.

Parameters
versionthe version of the HypermediaLink.
Returns
the HypermediaLink corresponding to the given version or nil if the version is not available
- (NSArray *) getResources: (NSString *)  version

Gets all the resources of a given version

Parameters
versionthe wanted version
Returns
a set of resources of the given version
- (NSArray *) getVersions

Gets all the versions stored

Returns
a set of versions
- (bool) hasResource: (NSString *)  resource
inVersion: (NSString *)  version 

Checks if this Resource has a given resource in a given version.

Parameters
versionthe version of the link
resourcethe resource to be found.
Returns
true if it has the given resource, false otherwise.
- (bool) hasResourceParameter: (NSString *)  parameter
inResource: (NSString *)  resource
inVersion: (NSString *)  version 

Checks whether a given resource in a given version allows the search using a given parameter

Parameters
versionthe wanted version
resourcethe name of the resource
parameterthe search parameter
Returns
true if it is allowed, false otherwise
- (bool) hasVersion: (NSString *)  version

Checks the existance of a given version

Parameters
versionversion to check
Returns
true if it is available, false otherwise.

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