|
@ -278,17 +278,41 @@ class Job: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def hasElement(self, parameter, elem): |
|
|
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): |
|
|
if hasattr(self.par, parameter): |
|
|
print (parameter + " in Parameter") |
|
|
print (parameter + " in Parameter") |
|
|
if getattr(self.par, parameter).find(elem) >= 0: |
|
|
if getattr(self.par, parameter).find(elem) >= 0: |
|
|
return True |
|
|
return True |
|
|
return False |
|
|
return False |
|
|
return True |
|
|
return True |
|
|
def hascomponente(self, komp): |
|
|
def hascomponente(self, comp): |
|
|
return self.hasElement("componente", komp) |
|
|
""" |
|
|
|
|
|
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): |
|
|
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) |
|
|
return self.hasElement("function", fct) |
|
|
def hasTool(self, tool): |
|
|
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) |
|
|
return self.hasElement("tool", tool) |
|
|
def getMessageLevel(self, errtyp, elem): |
|
|
def getMessageLevel(self, errtyp, elem): |
|
|
if (not hasattr(self, "m")) or (self.m is None): |
|
|
if (not hasattr(self, "m")) or (self.m is None): |
|
|