public static TapFilter createFilter(String filterString) {
        TapFilter filter = new TapFilter();
        String lines[] = filterString.split("\n");

        int index = 0;
        for (String line : lines) {
            index++;
            line = line.trim();
            
            String parts[] = line.split("\t| ", 2);
            String name = parts[0];
            
            if(name.equals("filter")) {
                parts = line.split("\t| ");
                parts[0] = "id";
                parts[1] = parts[2];
                name = parts[0];
            }
            
            String nameParts[] = name.split("_");
            name="";
            for(int i = 0 ; i< nameParts.length;i++) {
                name += nameParts[i].substring(0,1).toUpperCase() + nameParts[i].substring(1);
            }
            
            

            try {
                Method setter = TapFilter.class.getMethod("set"+name, String.class);
                setter.invoke(filter, parts[1].trim());
                
                
            } catch (NoSuchMethodException ex) {
                Logger.getLogger(FilterUtils.class.getName()).log(Level.SEVERE, null, ex);
                
            } catch (SecurityException ex) {
                Logger.getLogger(FilterUtils.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IllegalAccessException ex) {
                Logger.getLogger(FilterUtils.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IllegalArgumentException ex) {
                Logger.getLogger(FilterUtils.class.getName()).log(Level.SEVERE, null, ex);
            } catch (InvocationTargetException ex) {
                Logger.getLogger(FilterUtils.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

        return filter;
    }