1
# -*- coding: UTF-8 -*-
2
##############################################################################
3
# Copyright (c) 2011 Timothy W. Cook and Contributors.
4
# All Rights Reserved. See CONTRIBUTORS.txt
6
# This software is subject to the provisions of the GNU LESSER GENERAL
7
# PUBLIC LICENSE Version 3, Dated: 29 June 2007 See docs/LICENSE.txt or
8
# http://www.gnu.org/licenses/lgpl.html
9
##############################################################################
11
from zope.interface import Interface, Attribute
12
from zope.schema import Bool, TextLine, Object
13
from zope.i18nmessageid.message import MessageFactory
15
_ = MessageFactory('mlhim.rm')
18
class IAddress(Interface):
24
schema=IItemStructure,
26
description=_(u"The details of the address."),
31
Return the type of address from 'name'.
36
Address in the form of a string.
41
class IPartyIdentity(Interface):
43
An identity owned by a party.
47
schema=IItemStructure,
49
description=_(u"The value of the identitiy"),
54
Identity in the form of a string.
60
Taken from value of inherited name attribute.
64
class IContact(Interface):
66
Description of a means of contacting a party.
71
title=_(u"Time Validity"),
72
description=_(u"Valid time interval for this contact descriptor."),
77
value_type = Object(schema = IAddress),
78
title=_(u"Addresses"),
79
description=_(u"A set of addresses for this purpose and time frame."),
84
Purpose for which this contact is used.
85
Taken from the inherited 'name' attribute.
90
class IPartyRelationship(Interface):
92
Generic description of a relationship between parties.
98
description=_(u"Identifier of this party."),
103
schema=IItemStructure,
105
description=(u"Description of the relationship."),
111
title=_(u"Time Validity"),
112
description=_(u"Valid time interval for this relationship."),
119
description=_(u"Source of relationship."),
126
description=_(u"Target of relationship."),
132
Type of relationship such as employment, authority, etc.
136
class IParty(Interface):
138
Ancestor of all party types.
144
description=_(u"Identifier of this party."),
148
title=_(u"Indentities"),
149
description=_(u"Identities used by the party to identify itself."),
150
value_type = Object(schema = IPartyIdentity))
153
title=_(u"Contacts"),
154
description=_(u"Contacts for this party."),
155
value_type = Object(schema = IContact))
158
title=_(u"Relationships"),
159
description=_(u"Relationships in which this role takes part as"
162
value_type = Object(schema = IPartyRelationship))
164
reverseRelationships=Set(
165
title=_(u"Reverse Relationships"),
166
description=_(u"Relationships in which this role takes part as source."),
168
value_type = Object(schema = ILocatableRef))
171
schema=IItemStructure,
173
description=_(u"All other party details."),
178
Return the type of party from the inherited 'name' attribute.
183
class IActor(Interface):
185
Ancestor of all real world types.
190
description=_(u"Identifiers of the Version container for "
191
"each Role played by this party."),
193
value_type = Object(schema = IPartyRef))
196
title=_(u"Languages"),
197
description=_(u"A list of languages to be used to communice"
198
" with this actor."),
200
value_type = Object(schema = IDvText))
202
def hasLegalIdentity():
204
Return True if there is an identity with purpose 'legal identity'
209
class IAgent(IActor):
211
Generic concept of of any kind of agent including devices.
215
class ICapability(Interface):
217
Capability of a role such as ehr modifier, healthcare provider, etc.
221
schema=IItemStructure,
222
title=_(u"Credentials"),
223
description=_(u"Qualifications of the performer of the role."),
229
title=_(u"Time Validity"),
230
description=_(u"Valid time interval for the credentials of this capability."),
233
class ICapability(Interface):
235
Capability of a role such as ehr modifier, healthcare provider, etc.
239
schema=IItemStructure,
240
title=_(u"Credentials"),
241
description=_(u"Qualifications of the performer of the role."),
247
title=_(u"Time Validity"),
248
description=_(u"Valid time interval for the credentials of this capability."),
251
class ICapability(Interface):
253
Capability of a role such as ehr modifier, healthcare provider, etc.
257
schema=IItemStructure,
258
title=_(u"Credentials"),
259
description=_(u"Qualifications of the performer of the role."),
265
title=_(u"Time Validity"),
266
description=_(u"Valid time interval for the credentials of this capability."),
269
class ICapability(Interface):
271
Capability of a role such as ehr modifier, healthcare provider, etc.
275
schema=IItemStructure,
276
title=_(u"Credentials"),
277
description=_(u"Qualifications of the performer of the role."),
283
title=_(u"Time Validity"),
284
description=_(u"Valid time interval for the credentials of this capability."),
290
class IGroup(IActor):
292
A real world group of parties.
298
class IOrganisation(IActor):
300
Generic descriptions of organizations.
306
class IPerson(IActor):
308
Generic description of of persons. Provides a dedicated type to whicih Person archetypes can be targeted."),
314
class IRole(Interface):
316
Generic role played by a party.
320
title=_(u"Capabilities"),
321
description=_(u"Capabilities of this role."),
323
value_type = Object(schema = ICapability)
328
title=_(u"Time Validity"),
329
description=_(u"Valid time interval for this role."),
335
title=_(u"Performer"),
336
description=_(u"Reference to Version container of Actor playing this role."),
341
class ISearchableActor(Interface):
343
relationships = Attribute("")
345
reverse_relationships = Attribute("")
346
legal_identity = Attribute("")