Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Dynamics / BlockConnection.py
blob00ba3dbeb8ecc2dad63f9df69968eb6be7755a43
1 # Copyright (C) 2010-2011 Richard Lincoln
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to
5 # deal in the Software without restriction, including without limitation the
6 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 # sell copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 # IN THE SOFTWARE.
21 from CIM14.IEC61970.Core.IdentifiedObject import IdentifiedObject
23 class BlockConnection(IdentifiedObject):
24 """A meta-dyanamics model connectivity specification.
25 """
27 def __init__(self, MetaBlockConnection=None, MemberOf_BlockConnectivity=None, Block=None, *args, **kw_args):
28 """Initialises a new 'BlockConnection' instance.
30 @param MetaBlockConnection:
31 @param MemberOf_BlockConnectivity:
32 @param Block:
33 """
34 self._MetaBlockConnection = None
35 self.MetaBlockConnection = MetaBlockConnection
37 self._MemberOf_BlockConnectivity = None
38 self.MemberOf_BlockConnectivity = MemberOf_BlockConnectivity
40 self._Block = None
41 self.Block = Block
43 super(BlockConnection, self).__init__(*args, **kw_args)
45 _attrs = []
46 _attr_types = {}
47 _defaults = {}
48 _enums = {}
49 _refs = ["MetaBlockConnection", "MemberOf_BlockConnectivity", "Block"]
50 _many_refs = []
52 def getMetaBlockConnection(self):
54 return self._MetaBlockConnection
56 def setMetaBlockConnection(self, value):
57 if self._MetaBlockConnection is not None:
58 filtered = [x for x in self.MetaBlockConnection.BlockConnection if x != self]
59 self._MetaBlockConnection._BlockConnection = filtered
61 self._MetaBlockConnection = value
62 if self._MetaBlockConnection is not None:
63 if self not in self._MetaBlockConnection._BlockConnection:
64 self._MetaBlockConnection._BlockConnection.append(self)
66 MetaBlockConnection = property(getMetaBlockConnection, setMetaBlockConnection)
68 def getMemberOf_BlockConnectivity(self):
70 return self._MemberOf_BlockConnectivity
72 def setMemberOf_BlockConnectivity(self, value):
73 if self._MemberOf_BlockConnectivity is not None:
74 filtered = [x for x in self.MemberOf_BlockConnectivity.BlockConnection if x != self]
75 self._MemberOf_BlockConnectivity._BlockConnection = filtered
77 self._MemberOf_BlockConnectivity = value
78 if self._MemberOf_BlockConnectivity is not None:
79 if self not in self._MemberOf_BlockConnectivity._BlockConnection:
80 self._MemberOf_BlockConnectivity._BlockConnection.append(self)
82 MemberOf_BlockConnectivity = property(getMemberOf_BlockConnectivity, setMemberOf_BlockConnectivity)
84 def getBlock(self):
86 return self._Block
88 def setBlock(self, value):
89 if self._Block is not None:
90 filtered = [x for x in self.Block.BlockConnection if x != self]
91 self._Block._BlockConnection = filtered
93 self._Block = value
94 if self._Block is not None:
95 if self not in self._Block._BlockConnection:
96 self._Block._BlockConnection.append(self)
98 Block = property(getBlock, setBlock)