Returns a list of all definitions found in this OvalDocment where each item in the list is of type OvalDefinition Returns None if no definitions could be found @rtype: List @return: All definitions in the OVAL document or None if none were found
(self)
| 309 | return gen |
| 310 | |
| 311 | def getDefinitions(self): |
| 312 | """ |
| 313 | Returns a list of all definitions found in this OvalDocment where each item in the list is of type OvalDefinition |
| 314 | Returns None if no definitions could be found |
| 315 | |
| 316 | @rtype: List |
| 317 | @return: All definitions in the OVAL document or None if none were found |
| 318 | """ |
| 319 | root = self.getDocumentRoot() |
| 320 | if not root: |
| 321 | return None |
| 322 | |
| 323 | defroot = root.find("def:definitions", OvalDocument.NS_DEFAULT) |
| 324 | |
| 325 | if defroot is None: |
| 326 | return None |
| 327 | |
| 328 | element_list = list(defroot) |
| 329 | if not element_list: |
| 330 | return None |
| 331 | |
| 332 | return [OvalDefinition(element) for element in element_list] |
| 333 | |
| 334 | def getTests(self): |
| 335 | """ |
no test coverage detected