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

Method parse

src/ifctester/ifctester/ids.py:241–254  ·  view source on GitHub ↗
(self, ids_dict)

Source from the content-addressed store, hash-verified

239 return results
240
241 def parse(self, ids_dict):
242 self.name = ids_dict.get("@name", "")
243 self.description = ids_dict.get("@description", "")
244 self.instructions = ids_dict.get("@instructions", "")
245 self.minOccurs = ids_dict.get("applicability", {}).get("@minOccurs", 0)
246 self.maxOccurs = ids_dict.get("applicability", {}).get("@maxOccurs", "unbounded")
247 self.ifcVersion = ids_dict["@ifcVersion"]
248 self.applicability = (
249 self.parse_clause(ids_dict["applicability"]) if ids_dict.get("applicability", None) is not None else []
250 )
251 self.requirements = (
252 self.parse_clause(ids_dict["requirements"]) if ids_dict.get("requirements", None) is not None else []
253 )
254 return self
255
256 def parse_clause(self, clause):
257 results = []

Callers 1

parseMethod · 0.95

Calls 2

parse_clauseMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected