public String componentToString(AbstractComponent component)
			throws BookException {
		switch (component.getType()) {
		case TEXT:
			return textToString(component);
		case PARAGRAPH:
			return paragraphToString(component);
		case LISTING:
			return listingToString(component);
		case SENTENCE:
			return sentenceToString(component);
		case LEXEM:
			return lexemToString(component);
		case WORD:
			return wordToString(component);
		case CODE_LINE:
			return codeLineToString(component);
		case CHARACTER:
			return characterToString(component);
		default:
			throw new BookException("Component type is wrong");
		}
	}