Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Dynamics / Slot.py
blob48f17a99a0919d5f2a7676437ab552a9f0aee198
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 Slot(IdentifiedObject):
25 def __init__(self, blockType0=None, slotReference0=None, slotOutput0=None, connectionFrame0=None, slotInput0=None, *args, **kw_args):
26 """Initialises a new 'Slot' instance.
28 @param blockType0:
29 @param slotReference0:
30 @param slotOutput0:
31 @param connectionFrame0:
32 @param slotInput0:
33 """
34 self._blockType0 = None
35 self.blockType0 = blockType0
37 self._slotReference0 = []
38 self.slotReference0 = [] if slotReference0 is None else slotReference0
40 self._slotOutput0 = []
41 self.slotOutput0 = [] if slotOutput0 is None else slotOutput0
43 self._connectionFrame0 = None
44 self.connectionFrame0 = connectionFrame0
46 self._slotInput0 = []
47 self.slotInput0 = [] if slotInput0 is None else slotInput0
49 super(Slot, self).__init__(*args, **kw_args)
51 _attrs = []
52 _attr_types = {}
53 _defaults = {}
54 _enums = {}
55 _refs = ["blockType0", "slotReference0", "slotOutput0", "connectionFrame0", "slotInput0"]
56 _many_refs = ["slotReference0", "slotOutput0", "slotInput0"]
58 def getblockType0(self):
60 return self._blockType0
62 def setblockType0(self, value):
63 if self._blockType0 is not None:
64 filtered = [x for x in self.blockType0.slot0 if x != self]
65 self._blockType0._slot0 = filtered
67 self._blockType0 = value
68 if self._blockType0 is not None:
69 if self not in self._blockType0._slot0:
70 self._blockType0._slot0.append(self)
72 blockType0 = property(getblockType0, setblockType0)
74 def getslotReference0(self):
76 return self._slotReference0
78 def setslotReference0(self, value):
79 for x in self._slotReference0:
80 x.slot0 = None
81 for y in value:
82 y._slot0 = self
83 self._slotReference0 = value
85 slotReference0 = property(getslotReference0, setslotReference0)
87 def addslotReference0(self, *slotReference0):
88 for obj in slotReference0:
89 obj.slot0 = self
91 def removeslotReference0(self, *slotReference0):
92 for obj in slotReference0:
93 obj.slot0 = None
95 def getslotOutput0(self):
97 return self._slotOutput0
99 def setslotOutput0(self, value):
100 for x in self._slotOutput0:
101 x.slot0 = None
102 for y in value:
103 y._slot0 = self
104 self._slotOutput0 = value
106 slotOutput0 = property(getslotOutput0, setslotOutput0)
108 def addslotOutput0(self, *slotOutput0):
109 for obj in slotOutput0:
110 obj.slot0 = self
112 def removeslotOutput0(self, *slotOutput0):
113 for obj in slotOutput0:
114 obj.slot0 = None
116 def getconnectionFrame0(self):
118 return self._connectionFrame0
120 def setconnectionFrame0(self, value):
121 if self._connectionFrame0 is not None:
122 filtered = [x for x in self.connectionFrame0.slot0 if x != self]
123 self._connectionFrame0._slot0 = filtered
125 self._connectionFrame0 = value
126 if self._connectionFrame0 is not None:
127 if self not in self._connectionFrame0._slot0:
128 self._connectionFrame0._slot0.append(self)
130 connectionFrame0 = property(getconnectionFrame0, setconnectionFrame0)
132 def getslotInput0(self):
134 return self._slotInput0
136 def setslotInput0(self, value):
137 for x in self._slotInput0:
138 x.slot0 = None
139 for y in value:
140 y._slot0 = self
141 self._slotInput0 = value
143 slotInput0 = property(getslotInput0, setslotInput0)
145 def addslotInput0(self, *slotInput0):
146 for obj in slotInput0:
147 obj.slot0 = self
149 def removeslotInput0(self, *slotInput0):
150 for obj in slotInput0:
151 obj.slot0 = None