Identifying parts of WKT line strings that intersect WKT polygons

Hi everyone, Rory here and first time posting so a pleasure to be here. Complete beginner who has made some progress building a geospatial application using the spatial library plugin but now really need some help please. I am developing a method to use geographical data to identify zones that are favourable for low carbon energy developments. I have models for combinations of geographical features that if intersecting can define these favourable zones. I have created a WKT layer using the 'spatial.addWKT' procedure. I inputed all my data (nodes with WKT points, multilinestring and multipolygon properties) and added every node to the WKT layer using spatial.addNodes. I have then used the spatial.intersects procedure to create HAS_INTERSECT relationships between every node that intersects. I have successfully plotted the intersecting polygons in QGIS but the problem I have is that when I plot the WKT line geometries all of the line lengths are captured (most of which extend beyond the boundaries of the polygons). What I need to achieve is to capture just the portions of the lines that are within the intersecting polygons. I have seen that I can use the JTS with the spatial library but cannot find examples how I can return just the overlapping parts of line geometries that lie within polygons. I am using dbms 4.4.2 and spatial-0.28.1. Any help would be greatly appreciated. Thank you Ror