Implementing RDF/XML serialisation using meta-data attributes.
[PyCIM.git] / schemata / CIM14 / Dynamics / MetaBlockConInput.py
blob6282a63d756e4c88c40180dafadc9b033e9c37e0
1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14.IEC61970.Core.IdentifiedObject import IdentifiedObject
19 class MetaBlockConInput(IdentifiedObject):
20 """If model the association to MeasurementType, the it means take the input from the associated PSR or Terminal in the static model.
21 """
23 def __init__(self, MetaBlockConSignal=None, MemberOf_MetaBlockConnection=None, Unit=None, *args, **kw_args):
24 """Initialises a new 'MetaBlockConInput' instance.
26 @param MetaBlockConSignal:
27 @param MemberOf_MetaBlockConnection:
28 @param Unit:
29 """
30 self._MetaBlockConSignal = None
31 self.MetaBlockConSignal = MetaBlockConSignal
33 self._MemberOf_MetaBlockConnection = None
34 self.MemberOf_MetaBlockConnection = MemberOf_MetaBlockConnection
36 self._Unit = None
37 self.Unit = Unit
39 super(MetaBlockConInput, self).__init__(*args, **kw_args)
41 _attrs = []
42 _attr_types = {}
43 _defaults = {}
44 _enums = {}
45 _refs = ["MetaBlockConSignal", "MemberOf_MetaBlockConnection", "Unit"]
46 _many_refs = []
48 def getMetaBlockConSignal(self):
50 return self._MetaBlockConSignal
52 def setMetaBlockConSignal(self, value):
53 if self._MetaBlockConSignal is not None:
54 self._MetaBlockConSignal._MetaBlockConInput = None
56 self._MetaBlockConSignal = value
57 if self._MetaBlockConSignal is not None:
58 self._MetaBlockConSignal._MetaBlockConInput = self
60 MetaBlockConSignal = property(getMetaBlockConSignal, setMetaBlockConSignal)
62 def getMemberOf_MetaBlockConnection(self):
64 return self._MemberOf_MetaBlockConnection
66 def setMemberOf_MetaBlockConnection(self, value):
67 if self._MemberOf_MetaBlockConnection is not None:
68 filtered = [x for x in self.MemberOf_MetaBlockConnection.MetaBlockConInput if x != self]
69 self._MemberOf_MetaBlockConnection._MetaBlockConInput = filtered
71 self._MemberOf_MetaBlockConnection = value
72 if self._MemberOf_MetaBlockConnection is not None:
73 self._MemberOf_MetaBlockConnection._MetaBlockConInput.append(self)
75 MemberOf_MetaBlockConnection = property(getMemberOf_MetaBlockConnection, setMemberOf_MetaBlockConnection)
77 def getUnit(self):
79 return self._Unit
81 def setUnit(self, value):
82 if self._Unit is not None:
83 filtered = [x for x in self.Unit.MetaBlockConInput if x != self]
84 self._Unit._MetaBlockConInput = filtered
86 self._Unit = value
87 if self._Unit is not None:
88 self._Unit._MetaBlockConInput.append(self)
90 Unit = property(getUnit, setUnit)