code: private static int getMainNumber(final int mainNumber, final String dptId)
  	{
  		return mainNumber != 0 ? mainNumber : Integer.parseInt(dptId.substring(0, dptId.indexOf('.')));
  	}
docs: throws NumberFormatException