(self)
| 34 | self.filtered_elements = {} |
| 35 | |
| 36 | def extract(self): |
| 37 | for element in self.root.findall("xs:element", self.ns): |
| 38 | print("Processing {}".format(element.attrib["name"])) |
| 39 | if not "substitutionGroup" in element.attrib or self.is_descendant_from_class(element, "uos"): |
| 40 | continue |
| 41 | data = { |
| 42 | "is_abstract": self.is_abstract(element), |
| 43 | "parent": element.attrib["substitutionGroup"].replace("ifc:", ""), |
| 44 | "attributes": self.get_attributes(element), |
| 45 | "complex_attributes": self.get_complex_attributes(element), |
| 46 | } |
| 47 | self.elements[element.attrib["name"]] = data |
| 48 | for filter in self.filters: |
| 49 | if self.is_descendant_from_class(element, filter) and not data["is_abstract"]: |
| 50 | self.filtered_elements.setdefault(filter, {})[element.attrib["name"]] = data |
| 51 | |
| 52 | def export(self, filename): |
| 53 | final = {} |
no test coverage detected