@Override
	protected void process(WorkUnit work) {
		switch (mState) {
		case RECEIVING_DATA:
			if (!work.getData().isEmpty()) {
				mData.add(work.getData());
			} else {
				mState = State.RECEIVING_WORDS_TO_IGNORE;
			}
			
			break;
			
		case RECEIVING_WORDS_TO_IGNORE:
			if (!work.getData().isEmpty()) {
				mWordsToIgnore.add(work.getData());
			} else {
				mState = State.RECEIVING_DATA;
			}
			
			break;
		}
		
		if (work.isLast()) {
			List<WorkUnit> workUnits = new ArrayList<WorkUnit>();
			
			// Perform removal of data here.
			for (int i = 0; i < mData.size(); ++i) {
				String[] titleTokens = mData.get(i).split(" ");
				if (!isIgnoreWord(titleTokens[0], mWordsToIgnore)) {
					mLogger.finest("Added WorkUnit: " + work.getData());
					workUnits.add(new WorkUnit(mData.get(i)));
				}
			}
			
			WorkUnit lastWorkUnit = new WorkUnit();
			lastWorkUnit.setLast(true);
			workUnits.add(lastWorkUnit);
			
			// Write the work units.
			for (WorkUnit workUnit : workUnits) {
				try {
					getOutputPort().write(workUnit);
				} catch (InterruptedException e) {
					return;
				}
			}
			
			// Clear the state variables.
			mData.clear();
			mWordsToIgnore.clear();
		}
	}