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

Method parse_relationship_xml

src/ifc4d/ifc4d/p62ifc.py:188–199  ·  view source on GitHub ↗
(self, project)

Source from the content-addressed store, hash-verified

186 }
187
188 def parse_relationship_xml(self, project):
189 for relationship in project.findall("pr:Relationship", self.ns):
190 predecessor = relationship.find("pr:PredecessorActivityObjectId", self.ns).text
191 successor = relationship.find("pr:SuccessorActivityObjectId", self.ns).text
192 if predecessor not in self.activities or successor not in self.activities:
193 continue
194 self.relationships[relationship.find("pr:ObjectId", self.ns).text] = {
195 "PredecessorActivity": predecessor,
196 "SuccessorActivity": successor,
197 "Type": self.sequence_type_map[relationship.find("pr:Type", self.ns).text],
198 "Lag": relationship.find("pr:Lag", self.ns).text,
199 }
200
201 def get_wbs(self, wbs):
202 return {"Name": wbs.find("pr:Name", self.ns).text, "subtasks": []}

Callers 1

parse_xmlMethod · 0.95

Calls 1

findMethod · 0.45

Tested by

no test coverage detected