MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / parse_clause

Method parse_clause

src/ifctester/ifctester/ids.py:256–267  ·  view source on GitHub ↗
(self, clause)

Source from the content-addressed store, hash-verified

254 return self
255
256 def parse_clause(self, clause):
257 results = []
258 for name, facets in clause.items():
259 if name not in ["entity", "attribute", "classification", "partOf", "property", "material"]:
260 continue
261 if not isinstance(facets, list):
262 facets = [facets]
263 for facet_xml in facets:
264 name_capitalised = name[0].upper() + name[1:]
265 facet = globals()[name_capitalised]().parse(facet_xml or {})
266 results.append(facet)
267 return results
268
269 def reset_status(self):
270 self.applicable_entities.clear()

Callers 1

parseMethod · 0.95

Calls 4

upperMethod · 0.80
itemsMethod · 0.45
parseMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected