(self, data)
| 142 | return ids_dict |
| 143 | |
| 144 | def parse(self, data): |
| 145 | for attribute in ["title", "copyright", "version", "description", "author", "date", "purpose", "milestone"]: |
| 146 | value = data["info"].get(attribute) |
| 147 | if value: |
| 148 | self.info[attribute] = value |
| 149 | xml_specs = data["specifications"]["specification"] |
| 150 | if not isinstance(xml_specs, list): |
| 151 | xml_specs = [xml_specs] |
| 152 | for xml_spec in xml_specs: |
| 153 | spec = Specification() |
| 154 | spec.parse(xml_spec) |
| 155 | self.specifications.append(spec) |
| 156 | return self |
| 157 | |
| 158 | def to_string(self): |
| 159 | ns = {"": "http://standards.buildingsmart.org/IDS"} |
no test coverage detected