private boolean fileToPjt(int dId, FileType fileTyp) throws InvalidFormatException, OpenXML4JException, XmlException, IOException, SAXException, ParserConfigurationException
	{

		boolean result = false;
		String strText = "";

		// Auswahl Methode je nach Dateityp
		switch (fileTyp)
		{
			case DOC:
			{
				strText = parseDoc();
				result = true;
				break;
			}
			case DOCX:
			{
				strText = parseDocx();
				result = true;
				break;
			}
			case PDF:
			{
				strText = parsePDF();
				result = true;
				break;
			}
			case HTML:
			{
				strText = parseHTML(dId);
				result = true;
				break;
			}
			case TXT:
			{
				strText = parseTXT(dId);
				result = true;
				break;
			}
			default:
			{
				break;
			}

		}
		BufferedWriter bufferedWriter = null;
		try
		{

			File file = new File(Control.ROOT_FILES + dId + ".pjt");

			// if file doesnt exists, then create it
			if (!file.exists())
			{
				file.createNewFile();
			}

			FileWriter fileWriter = new FileWriter(file.getAbsoluteFile());
			bufferedWriter = new BufferedWriter(fileWriter);
			bufferedWriter.write(strText);
			bufferedWriter.close();
		}
		catch (IOException e)
		{
			_logger.debug(e.getMessage(), e);
		}
		finally
		{
			// writer soll auf jeden Fall geschlossen werden
			if (bufferedWriter != null)
			{
				bufferedWriter.close();
			}
		}

		return result;
	}