@Override
    public String getCode() {

        String str = "\\ncline[linewidth=" + getLinewidth() + 
                ", linecolor=" + getLineColourString() +
                ", linestyle=" + getLineStyle()+"]" +
                "{" + getArrowString() + "}{" +
                getStart().getNodeID() + "}{" + getEnd().getNodeID() + "}";
        
        String comments = getComments();
        String newLine = System.getProperty("line.separator");
        
        if(!comments.isEmpty()){
            if(getLabel().isEmpty()) return comments + newLine + str;
            String labelCode = getLabel().replaceAll("\\\\", "\\\\textbackslash ");
            return comments + newLine + str + newLine + 
                    getLabelPosition()+"{"+labelCode+"}";
        }
        
        if(getLabel().isEmpty()) return str;
        String labelCode = getLabel().replaceAll("\\\\", "\\\\textbackslash ");
        return str+newLine+getLabelPosition()+"{"+labelCode+"}";
    }