private void extractAttributes(String todoLine) {
        resetFields();
        List<BaseFragment> fragments = parseFragments(todoLine);
        for (BaseFragment fragment : fragments) {
            switch (fragment.getType()) {
                case COMPLETION_DATE:
                    completionDate = (DateFragment) fragment;
                    break;
                case PRIORITY:
                    priority = fragment;
                    break;
                case DUE_DATE:
                    dueDate = (DateFragment) fragment;
                    break;
                case REPETITION:
                    repetition = (DateFragment) fragment;
                    break;
                case PROJECT:
                    projects.add(fragment);
                    break;
                case CONTEXT:
                    contexts.add(fragment);
                    break;
                case COMMENT:
                    comment = fragment;
                case TEXT:
                default:
                    text = fragment;
                    break;
            }
            countFragmentType(fragment.getType());
        }
    }