Package g4ds :: Module servicerepository :: Class Service
[show private | hide private]
[frames | no frames]

Class Service


Keeps data for one service.
Method Summary
  __init__(self, id, name, ksdl, ksdlversion, ksdldate)
Initialises the member instance.
  __str__(self)
Some basic information about the object
  addAuthority(self, memberid, init)
Mirrors the subscription of a communtiy to a service
  addCommunity(self, communityid, init)
Mirrors the subscription of a communtiy to a service
  addMember(self, memberid, init)
Mirrors the subscription of a member to a service
  getAuthorities(self)
GETTER
  getCommunities(self)
GETTER
String getId(self)
GETTER
String getKsdl(self)
GETTER
String getKsdlDate(self)
GETTER
String getKsdlVersion(self)
GETTER
  getMembers(self)
GETTER
String getName(self)
GETTER
Boolean hasAuthority(self, memberid)
Checks, whether the service has a authority with the given member id.
Boolean hasCommunity(self, communityid)
Checks, whether the service has a community with the given id subscribed to it.
Boolean hasMember(self, memberid)
Checks, whether the service has a member with the given id subscribed to it.

Instance Variable Summary
List of String _authorities: List of ids of members which are authorities to this service
List of String _communities: List of ids of subscribed communities
String _id: Inique ID for the Service
String _ksdl: knowledge service description in XML
String _ksdldate: Date for the version of the XML knowledge service description
String _ksdlversion: Version for the XML knowledge service description
List of String _members: List of ids of subscribed members
String _name: Name for the Service

Method Details

__init__(self, id=None, name='', ksdl='', ksdlversion='', ksdldate=None)
(Constructor)

Initialises the member instance.

Parameters are assigned to local variables. If no ID is provided (or None is given) one will ge generated.
Parameters:
id - Inique ID for the Member
           (type=String)
name - Name for the Member
           (type=String)
ksdl - knowledge service description in XML
           (type=String)
ksdlversion - Version for the XML knowledge service description
           (type=String)
ksdldate - Date for the version of the XML knowledge service description
           (type=String)

__str__(self)
(Informal representation operator)

Some basic information about the object

addAuthority(self, memberid, init=0)

Mirrors the subscription of a communtiy to a service

addCommunity(self, communityid, init=0)

Mirrors the subscription of a communtiy to a service

addMember(self, memberid, init=0)

Mirrors the subscription of a member to a service

getAuthorities(self)

GETTER

getCommunities(self)

GETTER

getId(self)

GETTER
Returns:
Value of the instance variable
           (type=String)

getKsdl(self)

GETTER
Returns:
Value of the instance variable
           (type=String)

getKsdlDate(self)

GETTER
Returns:
Value of the instance variable
           (type=String)

getKsdlVersion(self)

GETTER
Returns:
Value of the instance variable
           (type=String)

getMembers(self)

GETTER

getName(self)

GETTER
Returns:
Value of the instance variable
           (type=String)

hasAuthority(self, memberid)

Checks, whether the service has a authority with the given member id.
Parameters:
memberid - member ID of the potential authority of the service
           (type=String)
Returns:
Indicates, whether the member is authority of the service
           (type=Boolean)

hasCommunity(self, communityid)

Checks, whether the service has a community with the given id subscribed to it.
Parameters:
communityid - ID of the potential community of the service
           (type=String)
Returns:
Indicates, whether the community is allowed for the service
           (type=Boolean)

hasMember(self, memberid)

Checks, whether the service has a member with the given id subscribed to it.
Parameters:
memberid - ID of the potential member of the service
           (type=String)
Returns:
Indicates, whether the member is member of the service
           (type=Boolean)

Instance Variable Details

_authorities

List of ids of members which are authorities to this service
Type:
List of String

_communities

List of ids of subscribed communities
Type:
List of String

_id

Inique ID for the Service
Type:
String

_ksdl

knowledge service description in XML
Type:
String

_ksdldate

Date for the version of the XML knowledge service description
Type:
String

_ksdlversion

Version for the XML knowledge service description
Type:
String

_members

List of ids of subscribed members
Type:
List of String

_name

Name for the Service
Type:
String

Generated by Epydoc 2.0 on Sat Oct 22 22:52:46 2005 http://epydoc.sf.net