|
|
@ -278,17 +278,41 @@ class Job: |
|
|
|
|
|
|
|
|
|
|
|
def hasElement(self, parameter, elem): |
|
|
|
""" |
|
|
|
the function searches in an optional job.parameter |
|
|
|
(a) true, if the parameter does not exist (DEFAULT) |
|
|
|
(b) true, if the element is member of the parameter |
|
|
|
(c) false, if parameter exists and elem is not member of the parameter |
|
|
|
:param parameter: |
|
|
|
:param elem: |
|
|
|
:return: |
|
|
|
""" |
|
|
|
if hasattr(self.par, parameter): |
|
|
|
print (parameter + " in Parameter") |
|
|
|
if getattr(self.par, parameter).find(elem) >= 0: |
|
|
|
return True |
|
|
|
return False |
|
|
|
return True |
|
|
|
def hascomponente(self, komp): |
|
|
|
return self.hasElement("componente", komp) |
|
|
|
def hascomponente(self, comp): |
|
|
|
""" |
|
|
|
it searches if comp is member of the optional job.parameter (default = each is member) |
|
|
|
:param comp: |
|
|
|
:return: |
|
|
|
""" |
|
|
|
return self.hasElement("componente", comp) |
|
|
|
def hasFunction(self, fct): |
|
|
|
""" |
|
|
|
it searches if fct is member of the optional job.parameter (default = each is member) |
|
|
|
:param fct: |
|
|
|
:return: |
|
|
|
""" |
|
|
|
return self.hasElement("function", fct) |
|
|
|
def hasTool(self, tool): |
|
|
|
""" |
|
|
|
it searches if tool is member of the optional job.parameter (default = each is member) |
|
|
|
:param tool: |
|
|
|
:return: |
|
|
|
""" |
|
|
|
return self.hasElement("tool", tool) |
|
|
|
def getMessageLevel(self, errtyp, elem): |
|
|
|
if (not hasattr(self, "m")) or (self.m is None): |
|
|
|