Write Link Lines to File Method

def _writeLinks(self, links, fileObject, replaceParamFile):
        """
        Write Link Lines to File Method
        """
        for link in links:
            linkType = link.type
            fileObject.write('LINK           %s\n' % link.linkNumber)

            # Cases
            if 'TRAP' in linkType or 'TRAPEZOID' in linkType or 'BREAKPOINT' in linkType:
                self._writeCrossSectionLink(link, fileObject, replaceParamFile)

            elif linkType == 'STRUCTURE':
                self._writeStructureLink(link, fileObject, replaceParamFile)

            elif linkType in ('RESERVOIR', 'LAKE'):
                self._writeReservoirLink(link, fileObject, replaceParamFile)

            else:
                log.error('OOPS: CIF LINE 417')  # THIS SHOULDN'T HAPPEN

            fileObject.write('\n')