Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.edu.cesmac.sic.controller.beans; |
| 2 | |||
| 3 | import java.io.Serializable; |
||
| 4 | import java.util.ArrayList; |
||
| 5 | import java.util.HashSet; |
||
| 6 | import java.util.List; |
||
| 7 | |||
| 8 | import javax.annotation.PostConstruct; |
||
| 9 | import javax.faces.bean.ManagedProperty; |
||
| 10 | import javax.inject.Inject; |
||
| 11 | import javax.inject.Named; |
||
| 12 | |||
| 13 | import org.jsoup.Jsoup; |
||
| 14 | import org.jsoup.nodes.Document; |
||
| 15 | import org.jsoup.nodes.Element; |
||
| 16 | import org.primefaces.event.FileUploadEvent; |
||
| 17 | import org.primefaces.event.SelectEvent; |
||
| 18 | import org.primefaces.model.StreamedContent; |
||
| 19 | import org.primefaces.model.UploadedFile; |
||
| 20 | import org.springframework.context.annotation.Scope; |
||
| 21 | |||
| 22 | import br.edu.cesmac.core.exception.NegocioException; |
||
| 23 | import br.edu.cesmac.core.generic.GenericService; |
||
| 24 | import br.edu.cesmac.core.util.VerificadorUtil; |
||
| 25 | import br.edu.cesmac.relatorio.util.RelatorioUtils; |
||
| 26 | import br.edu.cesmac.relatorio.util.TipoExtensao; |
||
| 27 | import br.edu.cesmac.sac.shared.views.AlunoView; |
||
| 28 | import br.edu.cesmac.sac.shared.views.CursoView; |
||
| 29 | import br.edu.cesmac.sac.shared.views.ProfessorView; |
||
| 30 | import br.edu.cesmac.sca.seguranca.authentication.context.ContextoSeguranca; |
||
| 31 | import br.edu.cesmac.sca.shared.views.UsuarioView; |
||
| 32 | import br.edu.cesmac.sic.controller.beans.consultademanda.RelatorioFinalConsultaPorDemanda; |
||
| 33 | import br.edu.cesmac.sic.core.domain.model.Arquivo; |
||
| 34 | import br.edu.cesmac.sic.core.domain.model.ArquivoRelatorio; |
||
| 35 | import br.edu.cesmac.sic.core.domain.model.ItemRelatorio; |
||
| 36 | import br.edu.cesmac.sic.core.domain.model.ProcessoSeletivo; |
||
| 37 | import br.edu.cesmac.sic.core.domain.model.ProjetoPesquisa; |
||
| 38 | import br.edu.cesmac.sic.core.domain.model.ProjetoPesquisaAluno; |
||
| 39 | import br.edu.cesmac.sic.core.domain.model.ProjetoPesquisaOrientador; |
||
| 40 | import br.edu.cesmac.sic.core.domain.model.ProjetoPesquisaRelatorio; |
||
| 41 | import br.edu.cesmac.sic.core.domain.model.dto.ParametrosConsultaProjetoPesquisaDTO; |
||
| 42 | import br.edu.cesmac.sic.core.domain.model.dto.RelatorioFinalDTO; |
||
| 43 | import br.edu.cesmac.sic.core.domain.model.tipo.TipoRelatorio; |
||
| 44 | import br.edu.cesmac.sic.core.domain.model.tipo.TipoSituacaoInscricao; |
||
| 45 | import br.edu.cesmac.sic.core.domain.service.ProfessorService; |
||
| 46 | import br.edu.cesmac.sic.core.domain.service.ProjetoPesquisaRelatorioService; |
||
| 47 | import br.edu.cesmac.sic.core.domain.service.ProjetoPesquisaService; |
||
| 48 | import br.edu.cesmac.sic.core.domain.util.ConstantesSIC; |
||
| 49 | import br.edu.cesmac.sic.core.domain.util.EmailUtil; |
||
| 50 | import br.edu.cesmac.web.exception.VerificadorLancamentoException; |
||
| 51 | import br.edu.cesmac.web.exception.VerificadorLancamentoException.CommandBean; |
||
| 52 | import br.edu.cesmac.web.exception.VerificadorLancamentoException.CommandRelatorioStreamedContent; |
||
| 53 | import br.edu.cesmac.web.generic.AbstractBean; |
||
| 54 | import br.edu.cesmac.web.message.LancadorMensagem; |
||
| 55 | import br.edu.cesmac.web.util.TipoOperacao; |
||
| 56 | |||
| 57 | @Named |
||
| 58 | @Scope("view") |
||
| 59 | public class RelatorioFinalBean extends AbstractBean<ProjetoPesquisa> implements Serializable { |
||
| 60 | |||
| 61 | private static final long serialVersionUID = 1L; |
||
| 62 | |||
| 63 | private static final int QUANTIDADE_MAXIMO_ITENS_11 = 11; |
||
| 64 | |||
| 65 | private RelatorioFinalConsultaPorDemanda lazy; |
||
| 66 | |||
| 67 | private List<ProjetoPesquisa> listaProjetosPesquisa; |
||
| 68 | |||
| 69 | private ProjetoPesquisaOrientador orientadorSelecionado; |
||
| 70 | private List<ProjetoPesquisaOrientador> listaOrientadores; |
||
| 71 | private Boolean indicadorInscricaoPeloOrientador; |
||
| 72 | |||
| 73 | private ProjetoPesquisaAluno discenteSelecionado; |
||
| 74 | private List<ProjetoPesquisaAluno> listaDiscentes; |
||
| 75 | |||
| 76 | private ProjetoPesquisaService projetoPesquisaService; |
||
| 77 | private ProfessorService professorService; |
||
| 78 | private ProjetoPesquisaRelatorioService projetoPesquisaRelatorioService; |
||
| 79 | |||
| 80 | private ContextoSeguranca contextoSeguranca; |
||
| 81 | |||
| 82 | private RelatorioFinalDTO relatorioFinal; |
||
| 83 | |||
| 84 | private UploadedFile arquivoParaUpload; |
||
| 85 | private ArquivoRelatorio arquivoRelatorio; |
||
| 86 | private List<ArquivoRelatorio> arquivosRelatorio; |
||
| 87 | |||
| 88 | private Long quantidadeLimiteOrientadores = ConstantesSIC.RelatorioFinal.QUANTIDADE_LIMITE_ORIENTADORES_3; |
||
| 89 | |||
| 90 | @ManagedProperty(value = "#{sessao}") |
||
| 91 | private SessaoBean sessao; |
||
| 92 | |||
| 93 | @Inject |
||
| 94 | public RelatorioFinalBean(RelatorioFinalConsultaPorDemanda lazy, ProjetoPesquisaService projetoPesquisaService, ProfessorService professorService, ProjetoPesquisaRelatorioService projetoPesquisaRelatorioService, |
||
| 95 | ContextoSeguranca contextoSeguranca, SessaoBean sessao) { |
||
| 96 | this.lazy = lazy; |
||
| 97 | this.projetoPesquisaService = projetoPesquisaService; |
||
| 98 | this.professorService = professorService; |
||
| 99 | this.projetoPesquisaRelatorioService = projetoPesquisaRelatorioService; |
||
| 100 | this.contextoSeguranca = contextoSeguranca; |
||
| 101 | this.sessao = sessao; |
||
| 102 | } |
||
| 103 | |||
| 104 | @Override |
||
| 105 | public ProjetoPesquisa getId() { |
||
| 106 | return getEntidade(); |
||
| 107 | } |
||
| 108 | |||
| 109 | @Override |
||
| 110 | public GenericService<ProjetoPesquisa> getService() { |
||
| 111 | return projetoPesquisaService; |
||
| 112 | } |
||
| 113 | |||
| 114 | public SessaoBean getSessao() { |
||
| 115 | return sessao; |
||
| 116 | } |
||
| 117 | |||
| 118 | public void setSessao(SessaoBean sessao) { |
||
| 119 | this.sessao = sessao; |
||
| 120 | } |
||
| 121 | |||
| 122 | @Override |
||
| 123 | public void limparEntidade() { |
||
| 124 | setEntidade(new ProjetoPesquisa()); |
||
| 125 | setListaDiscentes(new ArrayList<ProjetoPesquisaAluno>()); |
||
| 126 | setDiscenteSelecionado(null); |
||
| 127 | setListaOrientadores(new ArrayList<ProjetoPesquisaOrientador>()); |
||
| 128 | setOrientadorSelecionado(null); |
||
| 129 | setIndicadorInscricaoPeloOrientador(null); |
||
| 130 | setRelatorioFinal(null); |
||
| 131 | setArquivoParaUpload(null); |
||
| 132 | setArquivoRelatorio(null); |
||
| 133 | setArquivosRelatorio(null); |
||
| 134 | } |
||
| 135 | |||
| 136 | @PostConstruct |
||
| 137 | public void preCarregamento() { |
||
| 138 | setArquivosRelatorio(new ArrayList<ArquivoRelatorio>()); |
||
| 139 | parametrosConsulta = new ParametrosConsultaProjetoPesquisaDTO(); |
||
| 140 | ProjetoPesquisa projetoPesquisa = new ProjetoPesquisa(); |
||
| 141 | projetoPesquisa.setSequencialIesParaConsulta(getSessao().getSequencialIes()); |
||
| 142 | projetoPesquisa.setTipoProjetoParaConsulta(getSessao().getTipoProjeto()); |
||
| 143 | parametrosConsulta.setEntidade(projetoPesquisa); |
||
| 144 | ((ParametrosConsultaProjetoPesquisaDTO)parametrosConsulta).setConsultarComRelatorioFinal(true); |
||
| 145 | prepararConsultaDemanda(); |
||
| 146 | setListaProjetosPesquisa(projetoPesquisaService.consultarProjetosPesquisaDoOrientadorComProcessoSeletivoFinalizado(contextoSeguranca.obterUsuario(), sessao.getSequencialIes(), sessao.getTipoProjeto())); |
||
| 147 | } |
||
| 148 | |||
| 149 | public RelatorioFinalConsultaPorDemanda getLazy() { |
||
| 150 | return lazy; |
||
| 151 | } |
||
| 152 | |||
| 153 | public void prepararConsultaDemanda() { |
||
| 154 | lazy.setarParametrosConsulta(getParametrosConsulta()); |
||
| 155 | } |
||
| 156 | |||
| 157 | public List<ProjetoPesquisa> getListaProjetosPesquisa() { |
||
| 158 | return listaProjetosPesquisa; |
||
| 159 | } |
||
| 160 | public void setListaProjetosPesquisa(List<ProjetoPesquisa> listaProjetosPesquisa) { |
||
| 161 | this.listaProjetosPesquisa = listaProjetosPesquisa; |
||
| 162 | } |
||
| 163 | |||
| 164 | public ProjetoPesquisaOrientador getOrientadorSelecionado() { |
||
| 165 | return orientadorSelecionado; |
||
| 166 | } |
||
| 167 | public void setOrientadorSelecionado(ProjetoPesquisaOrientador orientadorSelecionado) { |
||
| 168 | this.orientadorSelecionado = orientadorSelecionado; |
||
| 169 | } |
||
| 170 | |||
| 171 | public List<ProjetoPesquisaOrientador> getListaOrientadores() { |
||
| 172 | return listaOrientadores; |
||
| 173 | } |
||
| 174 | public void setListaOrientadores(List<ProjetoPesquisaOrientador> listaOrientadores) { |
||
| 175 | this.listaOrientadores = listaOrientadores; |
||
| 176 | } |
||
| 177 | |||
| 178 | public void setIndicadorInscricaoPeloOrientador(Boolean indicadorInscricaoPeloOrientador) { |
||
| 179 | this.indicadorInscricaoPeloOrientador = indicadorInscricaoPeloOrientador; |
||
| 180 | } |
||
| 181 | public Boolean getIndicadorInscricaoPeloOrientador() { |
||
| 182 | return indicadorInscricaoPeloOrientador; |
||
| 183 | } |
||
| 184 | |||
| 185 | public ProjetoPesquisaAluno getDiscenteSelecionado() { |
||
| 186 | return discenteSelecionado; |
||
| 187 | } |
||
| 188 | public void setDiscenteSelecionado(ProjetoPesquisaAluno discenteSelecionado) { |
||
| 189 | this.discenteSelecionado = discenteSelecionado; |
||
| 190 | } |
||
| 191 | |||
| 192 | public List<ProjetoPesquisaAluno> getListaDiscentes() { |
||
| 193 | return listaDiscentes; |
||
| 194 | } |
||
| 195 | public void setListaDiscentes(List<ProjetoPesquisaAluno> listaDiscentes) { |
||
| 196 | this.listaDiscentes = listaDiscentes; |
||
| 197 | } |
||
| 198 | |||
| 199 | public RelatorioFinalDTO getRelatorioFinal() { |
||
| 200 | return relatorioFinal; |
||
| 201 | } |
||
| 202 | public void setRelatorioFinal(RelatorioFinalDTO relatorioFinal) { |
||
| 203 | this.relatorioFinal = relatorioFinal; |
||
| 204 | } |
||
| 205 | |||
| 206 | public UploadedFile getArquivoParaUpload() { |
||
| 207 | return arquivoParaUpload; |
||
| 208 | } |
||
| 209 | public void setArquivoParaUpload(UploadedFile arquivoParaUpload) { |
||
| 210 | this.arquivoParaUpload = arquivoParaUpload; |
||
| 211 | } |
||
| 212 | |||
| 213 | public ArquivoRelatorio getArquivoRelatorio() { |
||
| 214 | return arquivoRelatorio; |
||
| 215 | } |
||
| 216 | public void setArquivoRelatorio(ArquivoRelatorio arquivoRelatorio) { |
||
| 217 | this.arquivoRelatorio = arquivoRelatorio; |
||
| 218 | } |
||
| 219 | |||
| 220 | public List<ArquivoRelatorio> getArquivosRelatorio() { |
||
| 221 | return arquivosRelatorio; |
||
| 222 | } |
||
| 223 | public void setArquivosRelatorio(List<ArquivoRelatorio> arquivosRelatorio) { |
||
| 224 | this.arquivosRelatorio = arquivosRelatorio; |
||
| 225 | } |
||
| 226 | |||
| 227 | public Long getQuantidadeLimiteOrientadores() { |
||
| 228 | return quantidadeLimiteOrientadores; |
||
| 229 | } |
||
| 230 | |||
| 231 | public void setQuantidadeLimiteOrientadores(Long quantidadeLimiteOrientadores) { |
||
| 232 | this.quantidadeLimiteOrientadores = quantidadeLimiteOrientadores; |
||
| 233 | } |
||
| 234 | |||
| 235 | /***************************************************************/ |
||
| 236 | |||
| 237 | @Override |
||
| 238 | protected void modificarEntidadeAntesDaOperacao() { |
||
| 239 | getEntidade().setDiscentes(new HashSet<ProjetoPesquisaAluno>(getListaDiscentes())); |
||
| 240 | getEntidade().setOrientadores(new HashSet<ProjetoPesquisaOrientador>(getListaOrientadores())); |
||
| 241 | } |
||
| 242 | |||
| 243 | public void iniciarRelatorioFinal() { |
||
| 244 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 245 | public void execute() { |
||
| 246 | getEntidade().setTipoSituacaoInscricao(TipoSituacaoInscricao.ANALISE.getValue()); |
||
| 247 | modificarEntidadeAntesDaOperacao(); |
||
| 248 | projetoPesquisaService.iniciarRelatorioFinal(getEntidade()); |
||
| 249 | preRealizar(getEntidade()); |
||
| 250 | LancadorMensagem.lancarSucesso(ConstantesSIC.RelatorioFinal.INICIANDO_RELATORIO_FINAL); |
||
| 251 | } |
||
| 252 | }); |
||
| 253 | } |
||
| 254 | |||
| 255 | @Override |
||
| 256 | public void cadastrar() { |
||
| 257 | getEntidade().setTipoSituacaoInscricao(TipoSituacaoInscricao.ANALISE.getValue()); |
||
| 258 | super.cadastrar(); |
||
| 259 | } |
||
| 260 | |||
| 261 | public void preRealizar(ProjetoPesquisa projetoPesquisa) { |
||
| 262 | setTipoOperacao(TipoOperacao.REALIZAR); |
||
| 263 | setEntidade(projetoPesquisa); |
||
| 264 | setarRelatorio(projetoPesquisa); |
||
| 265 | } |
||
| 266 | |||
| 267 | private void setarRelatorio(ProjetoPesquisa projetoPesquisa) { |
||
| 268 | ProjetoPesquisaRelatorio projetoPesquisaRelatorio = projetoPesquisaRelatorioService.consultarProjetoPesquisaRelatorio(projetoPesquisa, TipoRelatorio.RELATORIO_FINAL.getValue()); |
||
| 269 | if (VerificadorUtil.estaNulo(projetoPesquisaRelatorio)) { |
||
| 270 | projetoPesquisaRelatorio = new ProjetoPesquisaRelatorio(); |
||
| 271 | projetoPesquisaRelatorio.setProjetoPesquisa(getEntidade()); |
||
| 272 | } |
||
| 273 | relatorioFinal = new RelatorioFinalDTO(); |
||
| 274 | relatorioFinal.setProjetoPesquisaRelatorio(projetoPesquisaRelatorio); |
||
| 275 | relatorioFinal.montarRelatorioFinal(new ArrayList<>(projetoPesquisaRelatorio.getItens())); |
||
| 276 | setArquivosRelatorio(new ArrayList<ArquivoRelatorio>(projetoPesquisaRelatorio.getArquivos())); |
||
| 277 | setArquivoParaUpload(null); |
||
| 278 | setArquivoRelatorio(null); |
||
| 279 | } |
||
| 280 | |||
| 281 | public void alterarPeloOrientador() { |
||
| 282 | getEntidade().setTipoSituacaoInscricao(TipoSituacaoInscricao.ANALISE.getValue()); |
||
| 283 | super.alterar(); |
||
| 284 | } |
||
| 285 | |||
| 286 | public void preCadastrarOrientador(final UsuarioView usuario) { |
||
| 287 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 288 | public void execute() { |
||
| 289 | limparEntidade(); |
||
| 290 | ProfessorView orientador = professorService.consultarProfessorPorPessoa(usuario.getPessoa()); |
||
| 291 | if (VerificadorUtil.estaNulo(orientador)) { |
||
| 292 | if (!verificarPermissao(ConstantesSIC.ProcessoSeletivo.PERMISSAO_PROCESSO_SELETIVO_INCLUIR)) { |
||
| 293 | throw new NegocioException(ConstantesSIC.ProjetoPesquisa.PERMITIDO_APENAS_PROFESSORES); |
||
| 294 | } |
||
| 295 | } else { |
||
| 296 | setIndicadorInscricaoPeloOrientador(true); |
||
| 297 | setOrientadorSelecionado(new ProjetoPesquisaOrientador(orientador.getPessoa(), getEntidade(), false, null)); |
||
| 298 | } |
||
| 299 | preCadastrar(); |
||
| 300 | } |
||
| 301 | }); |
||
| 302 | } |
||
| 303 | |||
| 304 | @Override |
||
| 305 | public void preDetalhar(ProjetoPesquisa projetoPesquisa) { |
||
| 306 | detalharProjetoPesquisa(projetoPesquisa); |
||
| 307 | super.preDetalhar(entidade); |
||
| 308 | } |
||
| 309 | |||
| 310 | @Override |
||
| 311 | public void preAlterar(ProjetoPesquisa projetoPesquisa) { |
||
| 312 | detalharProjetoPesquisa(projetoPesquisa); |
||
| 313 | super.preAlterar(entidade); |
||
| 314 | } |
||
| 315 | |||
| 316 | public void detalharProjetoPesquisa(ProjetoPesquisa projetoPesquisa) { |
||
| 317 | limparEntidade(); |
||
| 318 | setEntidade(projetoPesquisaService.detalharProjetoPesquisa(projetoPesquisa)); |
||
| 319 | setListaDiscentes(new ArrayList<ProjetoPesquisaAluno>(getEntidade().getDiscentes())); |
||
| 320 | setListaOrientadores(new ArrayList<ProjetoPesquisaOrientador>(getEntidade().getOrientadores())); |
||
| 321 | setDiscenteSelecionado(null); |
||
| 322 | setOrientadorSelecionado(null); |
||
| 323 | setarRelatorio(projetoPesquisa); |
||
| 324 | } |
||
| 325 | |||
| 326 | public void selecionarProcessoSeletivo(SelectEvent event) { |
||
| 327 | getEntidade().setProcessoSeletivo(((ProcessoSeletivo) event.getObject())); |
||
| 328 | } |
||
| 329 | |||
| 330 | public void retirarProcessoSeletivo() { |
||
| 331 | getEntidade().setProcessoSeletivo(null); |
||
| 332 | } |
||
| 333 | |||
| 334 | public void selecionarCurso(SelectEvent event) { |
||
| 335 | getEntidade().setCurso(((CursoView) event.getObject())); |
||
| 336 | } |
||
| 337 | |||
| 338 | public void retirarCurso() { |
||
| 339 | getEntidade().setCurso(null); |
||
| 340 | } |
||
| 341 | |||
| 342 | public void selecionarProfessorOrientador(SelectEvent event) { |
||
| 343 | setOrientadorSelecionado(new ProjetoPesquisaOrientador(((br.edu.cesmac.views.PessoaView) event.getObject()), getEntidade(), temOrientadorNoProjetoDePesquisa(), null)); |
||
| 344 | } |
||
| 345 | |||
| 346 | private boolean temOrientadorNoProjetoDePesquisa() { |
||
| 347 | for (ProjetoPesquisaOrientador projetoPesquisaOrientador : getListaOrientadores()) { |
||
| 348 | if (!projetoPesquisaOrientador.getIndicadorCoorientador()) { |
||
| 349 | return true; |
||
| 350 | } |
||
| 351 | } |
||
| 352 | return false; |
||
| 353 | } |
||
| 354 | |||
| 355 | public void retirarProfessorOrientadorOuCoorientador(Boolean indicadorCoorientador) { |
||
| 356 | if (VerificadorUtil.naoEstaNuloOuVazio(getListaOrientadores())) { |
||
| 357 | List<ProjetoPesquisaOrientador> orientadores = new ArrayList<ProjetoPesquisaOrientador>(getListaOrientadores()); |
||
| 358 | for (ProjetoPesquisaOrientador orientador : orientadores) { |
||
| 359 | if (orientador.getIndicadorCoorientador().equals(indicadorCoorientador)) { |
||
| 360 | getListaOrientadores().remove(orientador); |
||
| 361 | break; |
||
| 362 | } |
||
| 363 | } |
||
| 364 | } |
||
| 365 | } |
||
| 366 | |||
| 367 | public void adicionarOrientador() { |
||
| 368 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 369 | public void execute() { |
||
| 370 | verificarSeJaFoiVinculadoComOutraOrientacao(getOrientadorSelecionado()); |
||
| 371 | verificarCamposObrigatorios(getOrientadorSelecionado()); |
||
| 372 | getListaOrientadores().remove(getOrientadorSelecionado()); |
||
| 373 | getListaOrientadores().add(getOrientadorSelecionado()); |
||
| 374 | setOrientadorSelecionado(null); |
||
| 375 | adicionandoParametroArgsConfirmandoAcao(true); |
||
| 376 | } |
||
| 377 | }); |
||
| 378 | } |
||
| 379 | |||
| 380 | private void verificarCamposObrigatorios(ProjetoPesquisaOrientador orientador) { |
||
| 381 | if (VerificadorUtil.estaNuloOuVazio(orientador.getLinkLattes())) { |
||
| 382 | throw new NegocioException(ConstantesSIC.ProjetoPesquisa.OBRIGATORIO_LINK_LATTES); |
||
| 383 | } |
||
| 384 | } |
||
| 385 | |||
| 386 | private void verificarSeJaFoiVinculadoComOutraOrientacao(ProjetoPesquisaOrientador orientadorSelecionado) { |
||
| 387 | int indexOrientador = getListaOrientadores().indexOf(orientadorSelecionado); |
||
| 388 | if (indexOrientador >= 0) { |
||
| 389 | ProjetoPesquisaOrientador orientador = getListaOrientadores().get(indexOrientador); |
||
| 390 | if (!orientador.getIndicadorCoorientador().equals(orientadorSelecionado.getIndicadorCoorientador())) { |
||
| 391 | throw new NegocioException(ConstantesSIC.ProjetoPesquisa.DISCENTE_JA_INCLUIDO_PROJETO); |
||
| 392 | } |
||
| 393 | } |
||
| 394 | } |
||
| 395 | |||
| 396 | public void removerOrientador(final ProjetoPesquisaOrientador projetoPesquisaOrientador) { |
||
| 397 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 398 | public void execute() { |
||
| 399 | getListaOrientadores().remove(projetoPesquisaOrientador); |
||
| 400 | LancadorMensagem.lancarSucesso(ConstantesSIC.MensagensRetorno.DADOS_EXCLUIDOS_COM_SUCESSO); |
||
| 401 | } |
||
| 402 | }); |
||
| 403 | } |
||
| 404 | |||
| 405 | public void prepararParaAlterarOrientador(ProjetoPesquisaOrientador projetoPesquisaOrientador) { |
||
| 406 | setOrientadorSelecionado(projetoPesquisaOrientador); |
||
| 407 | } |
||
| 408 | |||
| 409 | public void adicionarDiscente() { |
||
| 410 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 411 | public void execute() { |
||
| 412 | verificarCamposObrigatorios(getDiscenteSelecionado()); |
||
| 413 | verificarLimiteDeDiscentes(); |
||
| 414 | getListaDiscentes().remove(getDiscenteSelecionado()); |
||
| 415 | getListaDiscentes().add(getDiscenteSelecionado()); |
||
| 416 | setDiscenteSelecionado(null); |
||
| 417 | adicionandoParametroArgsConfirmandoAcao(true); |
||
| 418 | } |
||
| 419 | }); |
||
| 420 | } |
||
| 421 | |||
| 422 | private void verificarCamposObrigatorios(ProjetoPesquisaAluno discente) { |
||
| 423 | if (VerificadorUtil.estaNuloOuVazio(discente.getLinkLattes())) { |
||
| 424 | throw new NegocioException(ConstantesSIC.ProjetoPesquisa.OBRIGATORIO_LINK_LATTES_DO_DISCENTE); |
||
| 425 | } |
||
| 426 | } |
||
| 427 | |||
| 428 | private void verificarLimiteDeDiscentes() { |
||
| 429 | if (getListaDiscentes().size() > ConstantesSIC.QUANTIDADE_LIMITE_DISCENTES_6) { |
||
| 430 | throw new NegocioException(ConstantesSIC.MensagensRetorno.LIMITE_DISCENTES_POR_PROJETO_EXCEDIDO); |
||
| 431 | } |
||
| 432 | } |
||
| 433 | |||
| 434 | public void prepararParaVincularOrientador() { |
||
| 435 | setOrientadorSelecionado(null); |
||
| 436 | preCarregamento(); |
||
| 437 | } |
||
| 438 | |||
| 439 | public void prepararParaVincularDiscente() { |
||
| 440 | setDiscenteSelecionado(null); |
||
| 441 | preCarregamento(); |
||
| 442 | } |
||
| 443 | |||
| 444 | public void selecionarDiscente(SelectEvent event) { |
||
| 445 | ProjetoPesquisaAluno projetoPesquisaAluno = new ProjetoPesquisaAluno(); |
||
| 446 | projetoPesquisaAluno.setProjetoPesquisa(getEntidade()); |
||
| 447 | projetoPesquisaAluno.setAluno(((AlunoView) event.getObject())); |
||
| 448 | projetoPesquisaAluno.setIndicadorBolsista(false); |
||
| 449 | projetoPesquisaAluno.setContaBancaria(null); |
||
| 450 | setDiscenteSelecionado(projetoPesquisaAluno); |
||
| 451 | } |
||
| 452 | |||
| 453 | public void selecionarAlunoBolsista(AlunoView alunoBolsista) { |
||
| 454 | retirarAlunoBolsista(); |
||
| 455 | ProjetoPesquisaAluno projetoPesquisaAluno = new ProjetoPesquisaAluno(); |
||
| 456 | projetoPesquisaAluno.setProjetoPesquisa(getEntidade()); |
||
| 457 | projetoPesquisaAluno.setAluno(alunoBolsista); |
||
| 458 | projetoPesquisaAluno.setIndicadorBolsista(true); |
||
| 459 | projetoPesquisaAluno.setContaBancaria(null); |
||
| 460 | getListaDiscentes().add(projetoPesquisaAluno); |
||
| 461 | } |
||
| 462 | |||
| 463 | public void retirarAlunoBolsista() { |
||
| 464 | if (VerificadorUtil.naoEstaNuloOuVazio(getListaDiscentes())) { |
||
| 465 | List<ProjetoPesquisaAluno> discentes = new ArrayList<ProjetoPesquisaAluno>(getListaDiscentes()); |
||
| 466 | for (ProjetoPesquisaAluno discente : discentes) { |
||
| 467 | if (discente.getIndicadorBolsista()) { |
||
| 468 | getListaDiscentes().remove(discente); |
||
| 469 | break; |
||
| 470 | } |
||
| 471 | } |
||
| 472 | } |
||
| 473 | } |
||
| 474 | |||
| 475 | public ProjetoPesquisaAluno getBolsistaSelecionado() { |
||
| 476 | if (VerificadorUtil.naoEstaNuloOuVazio(getListaDiscentes())) { |
||
| 477 | List<ProjetoPesquisaAluno> discentes = new ArrayList<ProjetoPesquisaAluno>(getListaDiscentes()); |
||
| 478 | for (ProjetoPesquisaAluno discente : discentes) { |
||
| 479 | if (discente.getIndicadorBolsista()) { |
||
| 480 | return discente; |
||
| 481 | } |
||
| 482 | } |
||
| 483 | } |
||
| 484 | return null; |
||
| 485 | } |
||
| 486 | |||
| 487 | public void cadastrarRelatorioFinal() { |
||
| 488 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 489 | public void execute() { |
||
| 490 | preencherRelatorioFinal(); |
||
| 491 | projetoPesquisaRelatorioService.cadastrar(getRelatorioFinal().getProjetoPesquisaRelatorio()); |
||
| 492 | setarRelatorio(getEntidade()); |
||
| 493 | LancadorMensagem.lancarSucesso(ConstantesSIC.RelatorioFinal.RELATORIO_FINAL_CADASTRADO_COM_SUCESSO); |
||
| 494 | } |
||
| 495 | }); |
||
| 496 | } |
||
| 497 | |||
| 498 | public void alterarRelatorioFinal() { |
||
| 499 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 500 | public void execute() { |
||
| 501 | preencherRelatorioFinal(); |
||
| 502 | projetoPesquisaRelatorioService.alterar(getRelatorioFinal().getProjetoPesquisaRelatorio()); |
||
| 503 | setarRelatorio(getEntidade()); |
||
| 504 | LancadorMensagem.lancarSucesso(ConstantesSIC.RelatorioFinal.RELATORIO_FINAL_ALTERADO_COM_SUCESSO); |
||
| 505 | } |
||
| 506 | }); |
||
| 507 | } |
||
| 508 | |||
| 509 | private void preencherRelatorioFinal() { |
||
| 510 | if (VerificadorUtil.naoEstaNulo(getRelatorioFinal().getProjetoPesquisaRelatorio().getItens())) { |
||
| 511 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().clear(); |
||
| 512 | } |
||
| 513 | |||
| 514 | if (descricaoItemFoiInformada(getRelatorioFinal().getIntroducaoResumo())) { |
||
| 515 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getIntroducaoResumo()); |
||
| 516 | } |
||
| 517 | if (descricaoItemFoiInformada(getRelatorioFinal().getObjetivoResumo())) { |
||
| 518 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getObjetivoResumo()); |
||
| 519 | } |
||
| 520 | if (descricaoItemFoiInformada(getRelatorioFinal().getMetodologiaResumo())) { |
||
| 521 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getMetodologiaResumo()); |
||
| 522 | } |
||
| 523 | if (descricaoItemFoiInformada(getRelatorioFinal().getResultadosDiscussaoResumo())) { |
||
| 524 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getResultadosDiscussaoResumo()); |
||
| 525 | } |
||
| 526 | if (descricaoItemFoiInformada(getRelatorioFinal().getConclusaoResumo())) { |
||
| 527 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getConclusaoResumo()); |
||
| 528 | } |
||
| 529 | if (descricaoItemFoiInformada(getRelatorioFinal().getPalavrasChavesResumo())) { |
||
| 530 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getPalavrasChavesResumo()); |
||
| 531 | } |
||
| 532 | |||
| 533 | if (descricaoItemFoiInformada(getRelatorioFinal().getIntroducao())) { |
||
| 534 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getIntroducao()); |
||
| 535 | } |
||
| 536 | if (descricaoItemFoiInformada(getRelatorioFinal().getObjetivosGerais())) { |
||
| 537 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getObjetivosGerais()); |
||
| 538 | } |
||
| 539 | if (descricaoItemFoiInformada(getRelatorioFinal().getObjetivosEspecificos())) { |
||
| 540 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getObjetivosEspecificos()); |
||
| 541 | } |
||
| 542 | if (descricaoItemFoiInformada(getRelatorioFinal().getMetodologia())) { |
||
| 543 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getMetodologia()); |
||
| 544 | } |
||
| 545 | if (descricaoItemFoiInformada(getRelatorioFinal().getResultadosDiscussao())) { |
||
| 546 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getResultadosDiscussao()); |
||
| 547 | } |
||
| 548 | if (descricaoItemFoiInformada(getRelatorioFinal().getConclusao())) { |
||
| 549 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getConclusao()); |
||
| 550 | } |
||
| 551 | if (descricaoItemFoiInformada(getRelatorioFinal().getReferenciasBibliograficas())) { |
||
| 552 | getRelatorioFinal().getProjetoPesquisaRelatorio().getItens().add(getRelatorioFinal().getReferenciasBibliograficas()); |
||
| 553 | } |
||
| 554 | getRelatorioFinal().getProjetoPesquisaRelatorio().setIndicadorSubmetido(false); |
||
| 555 | getRelatorioFinal().getProjetoPesquisaRelatorio().setTipoRelatorio(TipoRelatorio.RELATORIO_FINAL.getValue()); |
||
| 556 | |||
| 557 | // if (VerificadorUtil.naoEstaNulo(getArquivosRelatorio())) { |
||
| 558 | // getRelatorioFinal().getProjetoPesquisaRelatorio().setArquivos(new HashSet<ArquivoRelatorio>(getArquivosRelatorio())); |
||
| 559 | // } |
||
| 560 | } |
||
| 561 | |||
| 562 | private Boolean descricaoItemFoiInformada(ItemRelatorio itemRelatorio) { |
||
| 563 | return VerificadorUtil.naoEstaNulo(itemRelatorio)? VerificadorUtil.naoEstaNuloOuVazio(itemRelatorio.getDescricao()) : false; |
||
| 564 | } |
||
| 565 | |||
| 566 | public Boolean relatorioCompleto(ProjetoPesquisa projetoPesquisa) { |
||
| 567 | ProjetoPesquisaRelatorio relatorioConsultado = projetoPesquisaRelatorioService.consultarProjetoPesquisaRelatorio(projetoPesquisa, TipoRelatorio.RELATORIO_FINAL.getValue()); |
||
| 568 | if (VerificadorUtil.estaNulo(relatorioConsultado)) { |
||
| 569 | return false; |
||
| 570 | } |
||
| 571 | if (relatorioConsultado.getItens().size() < QUANTIDADE_MAXIMO_ITENS_11) { |
||
| 572 | return false; |
||
| 573 | } |
||
| 574 | return true; |
||
| 575 | } |
||
| 576 | |||
| 577 | public Boolean verificarSeTemRelatorioSubmetido(Long sequencialProjetoPesquisa) { |
||
| 578 | return projetoPesquisaRelatorioService.verificarSeTemRelatorioSubmetido(sequencialProjetoPesquisa, TipoRelatorio.RELATORIO_FINAL.getValue()); |
||
| 579 | } |
||
| 580 | |||
| 581 | public void uploadArquivo(final FileUploadEvent e){ |
||
| 582 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 583 | public void execute() { |
||
| 584 | setArquivoParaUpload(e.getFile()); |
||
| 585 | ArquivoRelatorio arquivoRelatorio = new ArquivoRelatorio(); |
||
| 586 | arquivoRelatorio.setArquivo(new Arquivo(getArquivoParaUpload())); |
||
| 587 | arquivoRelatorio.setProjetoPesquisaRelatorio(getRelatorioFinal().getProjetoPesquisaRelatorio()); |
||
| 588 | arquivoRelatorio.setLegenda(e.getFile().getFileName()); |
||
| 589 | verificarArquivo(getArquivoParaUpload()); |
||
| 590 | setArquivoRelatorio(arquivoRelatorio); |
||
| 591 | adicionandoParametroArgsConfirmandoAcao(true); |
||
| 592 | } |
||
| 593 | }); |
||
| 594 | } |
||
| 595 | |||
| 596 | private void verificarArquivo(UploadedFile arquivo) { |
||
| 597 | if (VerificadorUtil.estaNulo(arquivo)) { |
||
| 598 | throw new NegocioException(ConstantesSIC.MensagensRetorno.ARQUIVO_INVALIDO_OU_NAO_ENCONTRADO); |
||
| 599 | } |
||
| 600 | } |
||
| 601 | |||
| 602 | public void realizarUploadArquivo() { |
||
| 603 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 604 | public void execute() { |
||
| 605 | EmailUtil.enviarEmailRelatorioFinal(getRelatorioFinal().getProjetoPesquisaRelatorio().getProjetoPesquisa().getEmailContato(), |
||
| 606 | getRelatorioFinal().getProjetoPesquisaRelatorio(), getArquivoRelatorio().getLegenda(), getArquivoRelatorio().getArquivo()); |
||
| 607 | setArquivoParaUpload(null); |
||
| 608 | setArquivoRelatorio(null); |
||
| 609 | getRelatorioFinal().getProjetoPesquisaRelatorio().setIndicadorSubmetido(true); |
||
| 610 | projetoPesquisaRelatorioService.alterar(getRelatorioFinal().getProjetoPesquisaRelatorio()); |
||
| 611 | LancadorMensagem.lancarSucesso(ConstantesSIC.RelatorioFinal.RELATORIO_FINAL_ENVIADO_COM_SUCESSO); |
||
| 612 | } |
||
| 613 | }); |
||
| 614 | } |
||
| 615 | |||
| 616 | public void retirarArquivo(final ArquivoRelatorio arquivoRelatorio) { |
||
| 617 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 618 | public void execute() { |
||
| 619 | getArquivosRelatorio().remove(arquivoRelatorio); |
||
| 620 | setArquivoParaUpload(null); |
||
| 621 | setArquivoRelatorio(null); |
||
| 622 | getRelatorioFinal().getProjetoPesquisaRelatorio().setArquivos(new HashSet<ArquivoRelatorio>(getArquivosRelatorio())); |
||
| 623 | projetoPesquisaRelatorioService.alterar(getRelatorioFinal().getProjetoPesquisaRelatorio()); |
||
| 624 | setArquivosRelatorio(projetoPesquisaRelatorioService.consultarArquivosDoRelatorio(getRelatorioFinal().getProjetoPesquisaRelatorio())); |
||
| 625 | LancadorMensagem.lancarSucesso(ConstantesSIC.MensagensRetorno.ARQUIVO_REMOVIDO_COM_SUCESSO); |
||
| 626 | } |
||
| 627 | }); |
||
| 628 | } |
||
| 629 | |||
| 630 | public StreamedContent downloadArquivo(final ArquivoRelatorio arquivoRelatorio) { |
||
| 631 | return new VerificadorLancamentoException().verificarLancamentoException(new CommandRelatorioStreamedContent() { |
||
| 632 | @Override |
||
| 633 | public StreamedContent execute() { |
||
| 634 | Arquivo arquivo = arquivoRelatorio.getArquivo(); |
||
| 635 | return RelatorioUtils.gerarArquivo(arquivo.getArquivo(), "arquivo", TipoExtensao.parse(arquivo.getExtensao()).getValue()); |
||
| 636 | } |
||
| 637 | }); |
||
| 638 | } |
||
| 639 | |||
| 640 | public Boolean verificarPermissao(String role) { |
||
| 641 | for (String permissao : contextoSeguranca.obterUsuario().getPermissoes()) { |
||
| 642 | if (permissao.equals(role)) { |
||
| 643 | return true; |
||
| 644 | } |
||
| 645 | } |
||
| 646 | return false; |
||
| 647 | } |
||
| 648 | |||
| 649 | public void retirarSubmissaoRelatorioFinal(final ProjetoPesquisa projetoPesquisa) { |
||
| 650 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
||
| 651 | public void execute() { |
||
| 652 | ProjetoPesquisaRelatorio projetoPesquisaRelatorio = projetoPesquisaRelatorioService.consultarProjetoPesquisaRelatorio(projetoPesquisa, TipoRelatorio.RELATORIO_FINAL.getValue()); |
||
| 653 | projetoPesquisaRelatorio.setIndicadorSubmetido(false); |
||
| 654 | projetoPesquisaRelatorioService.alterar(projetoPesquisaRelatorio); |
||
| 655 | LancadorMensagem.lancarSucesso(ConstantesSIC.RelatorioFinal.SUBMISSAO_RELATORIO_FINAL_RETIRADA_COM_SUCESSO); |
||
| 656 | } |
||
| 657 | }); |
||
| 658 | } |
||
| 659 | |||
| 660 | /************************************************************************/ |
||
| 661 | |||
| 662 | public static class HtmlSanitizer { |
||
| 663 | |||
| 664 | private static String pattern; |
||
| 665 | |||
| 666 | private final static String [] tagsTab = {"w:WordDocument","xml","!doctype","a","abbr","acronym","address","applet","area","article","aside","audio","base","basefont","bdi","bdo","bgsound","big","blink","blockquote", |
||
| 667 | "body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em", |
||
| 668 | "embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins", |
||
| 669 | "isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup", |
||
| 670 | "option","output","p","param","plaintext","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","shadow","small","source","spacer","span","strike","strong","style", |
||
| 671 | "sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"}; |
||
| 672 | |||
| 673 | static { |
||
| 674 | StringBuffer tags = new StringBuffer(); |
||
| 675 | for (int i=0;i<tagsTab.length;i++) { |
||
| 676 | tags.append(tagsTab[i].toLowerCase()).append('|').append(tagsTab[i].toUpperCase()); |
||
| 677 | if (i<tagsTab.length-1) { |
||
| 678 | tags.append('|'); |
||
| 679 | } |
||
| 680 | } |
||
| 681 | pattern = "</?("+tags.toString()+"){1}.*?/?>"; |
||
| 682 | } |
||
| 683 | |||
| 684 | public static String sanitize(String input) { |
||
| 685 | while(input.indexOf("<!--[if") > 0) { |
||
| 686 | Integer indexInicio = input.indexOf("<!--[if"); |
||
| 687 | Integer indexFinal = input.indexOf("<![endif]-->"); |
||
| 688 | |||
| 689 | // String textoInicio = input.substring(0, indexInicio); |
||
| 690 | String textoConteudo = input.substring(indexInicio, indexFinal + 12); |
||
| 691 | // String textoFinal = input.substring(indexFinal); |
||
| 692 | input = input.replace(textoConteudo, ""); |
||
| 693 | } |
||
| 694 | return input.replaceAll(pattern, ""); |
||
| 695 | } |
||
| 696 | |||
| 697 | public final static void main(String[] args) { |
||
| 698 | String html = "<span>teste</span><font face='Arial, Verdana'><span style='font-size: 13.3333px;'><!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> " |
||
| 699 | + "<o:AllowPNG></o:AllowPNG> </o:OfficeDocumentSettings> </xml><![endif]--> " |
||
| 700 | + "<p style='margin: 0cm 0cm 0.0001pt; line-height: 150%; text-align: justify;'><font size='2'>" |
||
| 701 | + "<span style='font-family: Arial;'>O presente estudo trata da vivência dos pais diante do diagnóstico da Síndrome de Down. " |
||
| 702 | + "Neste sentido a motivação pela escolha desse objeto de pesquisa se deu pela experiência pessoal e cotidiana, através da convivência com pais de crianças com Síndrome, " |
||
| 703 | + "o que despertou a curiosidade em conhecer as atitudes de outros pais frente ao diagnóstico de Síndrome de Down de seu filho.</span></font></p><font size='2'>" |
||
| 704 | + "<span style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'>" |
||
| 705 | + "<span style='font-family: Arial;'><span style='color: black;'>A Síndrome de Down (SD) é uma das alterações cromossômicas mais comuns, onde ocorre um excesso do material " |
||
| 706 | + "genético, apresentando três cromossomos 21, sendo chamada também de trissomia do 21. Essa síndrome está presente na maioria dos grupos étnicos, classes socioeconômicas e " |
||
| 707 | + "nacionalidades. Afeta igualmente meninas e meninos, geralmente permitindo o desenvolvimento do embrião (KOZMA, 2007).</span></span></font></p><font size='2'>" |
||
| 708 | + "<span style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'>" |
||
| 709 | + "<font size='2'><span style='font-family: Arial;'><span style='color: black;'>Pessoas com SD apresentam mudanças físicas e orgânicas que se tornam características comuns, " |
||
| 710 | + "tais como: olhos puxados, face e região occipital achatadas, língua grande para os limites da boca, orelhas pequenas e com presença de dobras em algumas partes, nariz em " |
||
| 711 | + "sela pequeno, pescoço curto e achatado, baixa estatura, mãos e pés largos, problemas cardíacos, distúrbios visuais, como estrabismo e catarata, dentre outros sinais " |
||
| 712 | + "(MUSTACCHI; PERES, 2000). </span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; " |
||
| 713 | + "line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'><span style='color: black;'>Estima-se que o Brasil tenha 300 mil pessoas com Síndrome " |
||
| 714 | + "de Down, com uma incidência de aproximadamente 1 em 800 ou 1.000 nascidos vivos, sendo que a taxa parece estar diretamente associada à idade materna, aumentando as chances do " |
||
| 715 | + "surgimento da síndrome à medida que a idade da mãe avança (GALLAHUE; OZMUN, 2005).</span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font>" |
||
| 716 | + "<p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'><span style='color: black;'>" |
||
| 717 | + "Todavia, apesar dos sintomas, hoje o futuro de crianças com SD não é tão grave como nos casos iniciais descritos na literatura. Atualmente existem tratamentos médicos avançados " |
||
| 718 | + "para cada problema clínico que os bebês com SD podem apresentar (KOZMA, 2007). O diagnóstico de SD desencadeia nos pais vários sentimentos, inclusive o medo de que a criança não " |
||
| 719 | + "alcance um bom desenvolvimento, representando uma importante lacuna no conhecimento da doença (CAMARGO, 2009).</span></span></font></p><font size='2'><span style='font-family: Arial;'> " |
||
| 720 | + "</span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'><span style='color: black;'>" |
||
| 721 | + "Considerando que os pais nunca planejam o nascimento de um filho “diferente” do que é considerado comum pela sociedade contemporânea, pode-se supor que grande parte da reação inicial à " |
||
| 722 | + "notícia da síndrome será determinada pelo tipo de informação recebida, a maneira como ela é apresentada e a atitude da pessoa que faz a comunicação (BUSCAGLIA, 1993). Frequentemente, a " |
||
| 723 | + "notícia não é transmitida de maneira adequada, fazendo ampliar o sofrimento e, consequentemente, trazendo mais dificuldades para a aceitação desse filho (BRASIL,1994).</span></span>" |
||
| 724 | + "</font></p><font size='2'><span style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'>" |
||
| 725 | + "<span style='font-family: Arial;'><span style='color: black;'>A chegada de uma criança com deficiência em uma família pode gerar situações complexas e resultantes da falta de preparo e " |
||
| 726 | + "informação adequada para lidar com os sentimentos que possivelmente surgirão nesse momento. Atitudes de superproteção, piedade ou rejeição, presentes no núcleo familiar, podem interferir " |
||
| 727 | + "no desenvolvimento dos filhos, incluindo os aspectos sociais e emocionais (ARAÚJO, 1994).</span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font>" |
||
| 728 | + "<p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'><span style='color: black;'>O " |
||
| 729 | + "confronto do nascimento entre o bebê imaginado e o real, quando a imagem não corresponde à idealizada, como no caso de crianças com SD (PEREIRA, 2006), traz respostas de negação ou " |
||
| 730 | + "de aceitação que podem refletir no vinculo que é estabelecido e consequentemente nos cuidados dispensados ao filho, bem como no processo de desenvolvimento da criança (CORRICE, 2009)." |
||
| 731 | + "</span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'>" |
||
| 732 | + "<font size='2'><span style='font-family: Arial;'><span style='color: black;'>O enfermeiro que desenvolve suas atividades relacionadas à reabilitação e que vivencia o contexto da síndrome " |
||
| 733 | + "de Down tem a possibilidade de conhecer elementos humanos essenciais para tornar o cuidado mais próximo do cliente. Entretanto, estudo demonstra que o enfermeiro pouco tem se apropriado " |
||
| 734 | + "de referenciais para o planejamento e realização de seu cuidado (SANTOS, 2013). </span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font><p style='margin: " |
||
| 735 | + "0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'><span style='color: black;'>Assim, tornou-se mais difícil " |
||
| 736 | + "conciliar estratégias formais e embasadas para ajudar no sofrimento de crianças e famílias. Essa teoria, por se aproximar da percepção de cuidado humanizado trazida pelos enfermeiros, pode " |
||
| 737 | + "ser um caminho para que esses profissionais desenvolvam intervenções no atendimento das necessidades e ajustamentos da família à síndrome.</span></span></font></p><font size='2'><span " |
||
| 738 | + "style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'>" |
||
| 739 | + "<span style='color: black;'>A subjetividade das ações de cuidado envolve um olhar para as interações humanas, que estão em constante mudança, exigindo preparo e reflexão crítica dos " |
||
| 740 | + "profissionais que promovem os momentos de cuidado. Este estudo abre essa possibilidade a partir do conhecimento da percepção e da vivência dos pais que vivem a experiência da síndrome de " |
||
| 741 | + "Down.</span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font><div style='text-align: justify;'><font size='2'><span style='font-family: Arial;'>" |
||
| 742 | + "<span style='font-size: 11pt; line-height: 115%; color: black;'>Diante do exposto, tornou-se relevante investigar: como ocorreu a vivência de pais na descoberta do filho com síndrome de " |
||
| 743 | + "Down? Para responder a este questionamento, as pesquisadoras estabeleceram como objetivo do estudo analisar a vivência dos pais diante do diagnóstico da SD.</span></span></font></div>" |
||
| 744 | + "<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves></w:TrackMoves> <w:TrackFormatting></w:TrackFormatting> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning></w:PunctuationKerning> <w:ValidateAgainstSchemas></w:ValidateAgainstSchemas> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF></w:DoNotPromoteQF> <w:LidThemeOther>PT-BR</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables></w:BreakWrappedTables> <w:SnapToGridInCell></w:SnapToGridInCell> <w:WrapTextWithPunct></w:WrapTextWithPunct> <w:UseAsianBreakRules></w:UseAsianBreakRules> <w:DontGrowAutofit></w:DontGrowAutofit> <w:SplitPgBreakAndParaMark></w:SplitPgBreakAndParaMark> <w:EnableOpenTypeKerning></w:EnableOpenTypeKerning> <w:DontFlipMirrorIndents></w:DontFlipMirrorIndents> <w:OverrideTableStyleHps></w:OverrideTableStyleHps> </w:Compatibility> <m:mathPr> <m:mathFont m:val='Cambria Math'></m:mathFont> <m:brkBin m:val='before'></m:brkBin> <m:brkBinSub m:val='--'></m:brkBinSub> <m:smallFrac m:val='off'></m:smallFrac> <m:dispDef></m:dispDef> <m:lMargin m:val='0'></m:lMargin> <m:rMargin m:val='0'></m:rMargin> <m:defJc m:val='centerGroup'></m:defJc> <m:wrapIndent m:val='1440'></m:wrapIndent> <m:intLim m:val='subSup'></m:intLim> <m:naryLim m:val='undOvr'></m:naryLim> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState='false' DefUnhideWhenUsed='true' DefSemiHidden='true' DefQFormat='false' DefPriority='99' LatentStyleCount='267'> <w:LsdException Locked='false' Priority='0' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Normal'></w:LsdException> <w:LsdException Locked='false' Priority='9' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='heading 1'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 2'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 3'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 4'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 5'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 6'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 7'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 8'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 9'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 1'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 2'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 3'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 4'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 5'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 6'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 7'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 8'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 9'></w:LsdException> <w:LsdException Locked='false' Priority='35' QFormat='true' Name='caption'></w:LsdException> <w:LsdException Locked='false' Priority='10' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Title'></w:LsdException> <w:LsdException Locked='false' Priority='1' Name='Default Paragraph Font'></w:LsdException> <w:LsdException Locked='false' Priority='11' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Subtitle'></w:LsdException> <w:LsdException Locked='false' Priority='22' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Strong'></w:LsdException> <w:LsdException Locked='false' Priority='20' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Emphasis'></w:LsdException> <w:LsdException Locked='false' Priority='59' SemiHidden='false' UnhideWhenUsed='false' Name='Table Grid'></w:LsdException> <w:LsdException Locked='false' UnhideWhenUsed='false' Name='Placeholder Text'></w:LsdException> <w:LsdException Locked='false' Priority='1' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='No Spacing'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 1'></w:LsdException> <w:LsdException Locked='false' UnhideWhenUsed='false' Name='Revision'></w:LsdException> <w:LsdException Locked='false' Priority='34' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='List Paragraph'></w:LsdException> <w:LsdException Locked='false' Priority='29' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Quote'></w:LsdException> <w:LsdException Locked='false' Priority='30' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Intense Quote'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='19' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Subtle Emphasis'></w:LsdException> <w:LsdException Locked='false' Priority='21' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Intense Emphasis'></w:LsdException> <w:LsdException Locked='false' Priority='31' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Subtle Reference'></w:LsdException> <w:LsdException Locked='false' Priority='32' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Intense Reference'></w:LsdException> <w:LsdException Locked='false' Priority='33' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Book Title'></w:LsdException> <w:LsdException Locked='false' Priority='37' Name='Bibliography'></w:LsdException> <w:LsdException Locked='false' Priority='39' QFormat='true' Name='TOC Heading'></w:LsdException> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:'Tabela normal'; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:''; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:'Calibri','sans-serif'; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:'Times New Roman'; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} </style> <![endif]--></span></font>"; |
||
| 745 | |||
| 746 | // System.out.println(HtmlSanitizer.pattern); |
||
| 747 | // System.out.println(HtmlSanitizer.sanitize("<span>Teste</span><font size=\"5\"><p>some <b>text</b></p><br/> <p>another text</p></font>")); |
||
| 748 | System.out.println(HtmlSanitizer.sanitize(html)); |
||
| 749 | |||
| 750 | } |
||
| 751 | } |
||
| 752 | |||
| 753 | private static String retirarTagsHtml(String texto) { |
||
| 754 | StringBuilder sb = new StringBuilder(texto); |
||
| 755 | StringBuilder semBR = new StringBuilder(sb.toString() |
||
| 756 | .replace("<br>", System.getProperty("line.separator")) |
||
| 757 | .replace("<br />", System.getProperty("line.separator")) |
||
| 758 | .replace("<br/>", System.getProperty("line.separator")) |
||
| 759 | .replace(" ", " ")); |
||
| 760 | // retirarTag("<xml>", semBR); |
||
| 761 | |||
| 762 | String semTagsComentarios = semBR.toString(); |
||
| 763 | while(semTagsComentarios.indexOf("<!") > 0) { |
||
| 764 | semTagsComentarios = semTagsComentarios.substring(semTagsComentarios.indexOf("<!"), semTagsComentarios.indexOf("<!", semTagsComentarios.indexOf("<!"))); |
||
| 765 | } |
||
| 766 | // String semTagsComentarios = semBR.replace(oldChar, newChar) |
||
| 767 | //.replaceAll("\\<.*?>",""); |
||
| 768 | System.out.println(semTagsComentarios); |
||
| 769 | return semTagsComentarios; |
||
| 770 | } |
||
| 771 | |||
| 772 | private static void retirarTag(String tag, StringBuilder texto) { |
||
| 773 | while(texto.toString().indexOf(tag) > 0) { |
||
| 774 | // texto.toString().replace(tag.indexOf(ch), newChar) |
||
| 775 | } |
||
| 776 | } |
||
| 777 | |||
| 778 | public static void main2 (String[] args) throws Exception{ |
||
| 779 | // String html = "<font face='Arial, Verdana'><span style='font-size: 13.3333px;'>teste<br>teste2</span></font>"; |
||
| 780 | String html = "<span>teste</span><font face='Arial, Verdana'><span style='font-size: 13.3333px;'><!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> " |
||
| 781 | + "<o:AllowPNG></o:AllowPNG> </o:OfficeDocumentSettings> </xml><![endif]--> " |
||
| 782 | + "<p style='margin: 0cm 0cm 0.0001pt; line-height: 150%; text-align: justify;'><font size='2'>" |
||
| 783 | + "<span style='font-family: Arial;'>O presente estudo trata da vivência dos pais diante do diagnóstico da Síndrome de Down. " |
||
| 784 | + "Neste sentido a motivação pela escolha desse objeto de pesquisa se deu pela experiência pessoal e cotidiana, através da convivência com pais de crianças com Síndrome, " |
||
| 785 | + "o que despertou a curiosidade em conhecer as atitudes de outros pais frente ao diagnóstico de Síndrome de Down de seu filho.</span></font></p><font size='2'>" |
||
| 786 | + "<span style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'>" |
||
| 787 | + "<span style='font-family: Arial;'><span style='color: black;'>A Síndrome de Down (SD) é uma das alterações cromossômicas mais comuns, onde ocorre um excesso do material " |
||
| 788 | + "genético, apresentando três cromossomos 21, sendo chamada também de trissomia do 21. Essa síndrome está presente na maioria dos grupos étnicos, classes socioeconômicas e " |
||
| 789 | + "nacionalidades. Afeta igualmente meninas e meninos, geralmente permitindo o desenvolvimento do embrião (KOZMA, 2007).</span></span></font></p><font size='2'>" |
||
| 790 | + "<span style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'>" |
||
| 791 | + "<font size='2'><span style='font-family: Arial;'><span style='color: black;'>Pessoas com SD apresentam mudanças físicas e orgânicas que se tornam características comuns, " |
||
| 792 | + "tais como: olhos puxados, face e região occipital achatadas, língua grande para os limites da boca, orelhas pequenas e com presença de dobras em algumas partes, nariz em " |
||
| 793 | + "sela pequeno, pescoço curto e achatado, baixa estatura, mãos e pés largos, problemas cardíacos, distúrbios visuais, como estrabismo e catarata, dentre outros sinais " |
||
| 794 | + "(MUSTACCHI; PERES, 2000). </span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; " |
||
| 795 | + "line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'><span style='color: black;'>Estima-se que o Brasil tenha 300 mil pessoas com Síndrome " |
||
| 796 | + "de Down, com uma incidência de aproximadamente 1 em 800 ou 1.000 nascidos vivos, sendo que a taxa parece estar diretamente associada à idade materna, aumentando as chances do " |
||
| 797 | + "surgimento da síndrome à medida que a idade da mãe avança (GALLAHUE; OZMUN, 2005).</span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font>" |
||
| 798 | + "<p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'><span style='color: black;'>" |
||
| 799 | + "Todavia, apesar dos sintomas, hoje o futuro de crianças com SD não é tão grave como nos casos iniciais descritos na literatura. Atualmente existem tratamentos médicos avançados " |
||
| 800 | + "para cada problema clínico que os bebês com SD podem apresentar (KOZMA, 2007). O diagnóstico de SD desencadeia nos pais vários sentimentos, inclusive o medo de que a criança não " |
||
| 801 | + "alcance um bom desenvolvimento, representando uma importante lacuna no conhecimento da doença (CAMARGO, 2009).</span></span></font></p><font size='2'><span style='font-family: Arial;'> " |
||
| 802 | + "</span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'><span style='color: black;'>" |
||
| 803 | + "Considerando que os pais nunca planejam o nascimento de um filho “diferente” do que é considerado comum pela sociedade contemporânea, pode-se supor que grande parte da reação inicial à " |
||
| 804 | + "notícia da síndrome será determinada pelo tipo de informação recebida, a maneira como ela é apresentada e a atitude da pessoa que faz a comunicação (BUSCAGLIA, 1993). Frequentemente, a " |
||
| 805 | + "notícia não é transmitida de maneira adequada, fazendo ampliar o sofrimento e, consequentemente, trazendo mais dificuldades para a aceitação desse filho (BRASIL,1994).</span></span>" |
||
| 806 | + "</font></p><font size='2'><span style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'>" |
||
| 807 | + "<span style='font-family: Arial;'><span style='color: black;'>A chegada de uma criança com deficiência em uma família pode gerar situações complexas e resultantes da falta de preparo e " |
||
| 808 | + "informação adequada para lidar com os sentimentos que possivelmente surgirão nesse momento. Atitudes de superproteção, piedade ou rejeição, presentes no núcleo familiar, podem interferir " |
||
| 809 | + "no desenvolvimento dos filhos, incluindo os aspectos sociais e emocionais (ARAÚJO, 1994).</span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font>" |
||
| 810 | + "<p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'><span style='color: black;'>O " |
||
| 811 | + "confronto do nascimento entre o bebê imaginado e o real, quando a imagem não corresponde à idealizada, como no caso de crianças com SD (PEREIRA, 2006), traz respostas de negação ou " |
||
| 812 | + "de aceitação que podem refletir no vinculo que é estabelecido e consequentemente nos cuidados dispensados ao filho, bem como no processo de desenvolvimento da criança (CORRICE, 2009)." |
||
| 813 | + "</span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'>" |
||
| 814 | + "<font size='2'><span style='font-family: Arial;'><span style='color: black;'>O enfermeiro que desenvolve suas atividades relacionadas à reabilitação e que vivencia o contexto da síndrome " |
||
| 815 | + "de Down tem a possibilidade de conhecer elementos humanos essenciais para tornar o cuidado mais próximo do cliente. Entretanto, estudo demonstra que o enfermeiro pouco tem se apropriado " |
||
| 816 | + "de referenciais para o planejamento e realização de seu cuidado (SANTOS, 2013). </span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font><p style='margin: " |
||
| 817 | + "0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'><span style='color: black;'>Assim, tornou-se mais difícil " |
||
| 818 | + "conciliar estratégias formais e embasadas para ajudar no sofrimento de crianças e famílias. Essa teoria, por se aproximar da percepção de cuidado humanizado trazida pelos enfermeiros, pode " |
||
| 819 | + "ser um caminho para que esses profissionais desenvolvam intervenções no atendimento das necessidades e ajustamentos da família à síndrome.</span></span></font></p><font size='2'><span " |
||
| 820 | + "style='font-family: Arial;'> </span></font><p style='margin: 0cm 0cm 0.0001pt; text-indent: 35.4pt; line-height: 150%; text-align: justify;'><font size='2'><span style='font-family: Arial;'>" |
||
| 821 | + "<span style='color: black;'>A subjetividade das ações de cuidado envolve um olhar para as interações humanas, que estão em constante mudança, exigindo preparo e reflexão crítica dos " |
||
| 822 | + "profissionais que promovem os momentos de cuidado. Este estudo abre essa possibilidade a partir do conhecimento da percepção e da vivência dos pais que vivem a experiência da síndrome de " |
||
| 823 | + "Down.</span></span></font></p><font size='2'><span style='font-family: Arial;'> </span></font><div style='text-align: justify;'><font size='2'><span style='font-family: Arial;'>" |
||
| 824 | + "<span style='font-size: 11pt; line-height: 115%; color: black;'>Diante do exposto, tornou-se relevante investigar: como ocorreu a vivência de pais na descoberta do filho com síndrome de " |
||
| 825 | + "Down? Para responder a este questionamento, as pesquisadoras estabeleceram como objetivo do estudo analisar a vivência dos pais diante do diagnóstico da SD.</span></span></font></div>" |
||
| 826 | + "<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves></w:TrackMoves> <w:TrackFormatting></w:TrackFormatting> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning></w:PunctuationKerning> <w:ValidateAgainstSchemas></w:ValidateAgainstSchemas> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF></w:DoNotPromoteQF> <w:LidThemeOther>PT-BR</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables></w:BreakWrappedTables> <w:SnapToGridInCell></w:SnapToGridInCell> <w:WrapTextWithPunct></w:WrapTextWithPunct> <w:UseAsianBreakRules></w:UseAsianBreakRules> <w:DontGrowAutofit></w:DontGrowAutofit> <w:SplitPgBreakAndParaMark></w:SplitPgBreakAndParaMark> <w:EnableOpenTypeKerning></w:EnableOpenTypeKerning> <w:DontFlipMirrorIndents></w:DontFlipMirrorIndents> <w:OverrideTableStyleHps></w:OverrideTableStyleHps> </w:Compatibility> <m:mathPr> <m:mathFont m:val='Cambria Math'></m:mathFont> <m:brkBin m:val='before'></m:brkBin> <m:brkBinSub m:val='--'></m:brkBinSub> <m:smallFrac m:val='off'></m:smallFrac> <m:dispDef></m:dispDef> <m:lMargin m:val='0'></m:lMargin> <m:rMargin m:val='0'></m:rMargin> <m:defJc m:val='centerGroup'></m:defJc> <m:wrapIndent m:val='1440'></m:wrapIndent> <m:intLim m:val='subSup'></m:intLim> <m:naryLim m:val='undOvr'></m:naryLim> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState='false' DefUnhideWhenUsed='true' DefSemiHidden='true' DefQFormat='false' DefPriority='99' LatentStyleCount='267'> <w:LsdException Locked='false' Priority='0' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Normal'></w:LsdException> <w:LsdException Locked='false' Priority='9' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='heading 1'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 2'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 3'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 4'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 5'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 6'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 7'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 8'></w:LsdException> <w:LsdException Locked='false' Priority='9' QFormat='true' Name='heading 9'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 1'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 2'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 3'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 4'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 5'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 6'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 7'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 8'></w:LsdException> <w:LsdException Locked='false' Priority='39' Name='toc 9'></w:LsdException> <w:LsdException Locked='false' Priority='35' QFormat='true' Name='caption'></w:LsdException> <w:LsdException Locked='false' Priority='10' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Title'></w:LsdException> <w:LsdException Locked='false' Priority='1' Name='Default Paragraph Font'></w:LsdException> <w:LsdException Locked='false' Priority='11' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Subtitle'></w:LsdException> <w:LsdException Locked='false' Priority='22' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Strong'></w:LsdException> <w:LsdException Locked='false' Priority='20' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Emphasis'></w:LsdException> <w:LsdException Locked='false' Priority='59' SemiHidden='false' UnhideWhenUsed='false' Name='Table Grid'></w:LsdException> <w:LsdException Locked='false' UnhideWhenUsed='false' Name='Placeholder Text'></w:LsdException> <w:LsdException Locked='false' Priority='1' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='No Spacing'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 1'></w:LsdException> <w:LsdException Locked='false' UnhideWhenUsed='false' Name='Revision'></w:LsdException> <w:LsdException Locked='false' Priority='34' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='List Paragraph'></w:LsdException> <w:LsdException Locked='false' Priority='29' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Quote'></w:LsdException> <w:LsdException Locked='false' Priority='30' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Intense Quote'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 1'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 2'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 3'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 4'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 5'></w:LsdException> <w:LsdException Locked='false' Priority='60' SemiHidden='false' UnhideWhenUsed='false' Name='Light Shading Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='61' SemiHidden='false' UnhideWhenUsed='false' Name='Light List Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='62' SemiHidden='false' UnhideWhenUsed='false' Name='Light Grid Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='63' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 1 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='64' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Shading 2 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='65' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 1 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='66' SemiHidden='false' UnhideWhenUsed='false' Name='Medium List 2 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='67' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 1 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='68' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 2 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='69' SemiHidden='false' UnhideWhenUsed='false' Name='Medium Grid 3 Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='70' SemiHidden='false' UnhideWhenUsed='false' Name='Dark List Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='71' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Shading Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='72' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful List Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='73' SemiHidden='false' UnhideWhenUsed='false' Name='Colorful Grid Accent 6'></w:LsdException> <w:LsdException Locked='false' Priority='19' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Subtle Emphasis'></w:LsdException> <w:LsdException Locked='false' Priority='21' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Intense Emphasis'></w:LsdException> <w:LsdException Locked='false' Priority='31' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Subtle Reference'></w:LsdException> <w:LsdException Locked='false' Priority='32' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Intense Reference'></w:LsdException> <w:LsdException Locked='false' Priority='33' SemiHidden='false' UnhideWhenUsed='false' QFormat='true' Name='Book Title'></w:LsdException> <w:LsdException Locked='false' Priority='37' Name='Bibliography'></w:LsdException> <w:LsdException Locked='false' Priority='39' QFormat='true' Name='TOC Heading'></w:LsdException> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:'Tabela normal'; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:''; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:'Calibri','sans-serif'; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:'Times New Roman'; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} </style> <![endif]--></span></font>"; |
||
| 827 | // System.out.println(retirarTagsHtml(html)); |
||
| 828 | /* |
||
| 829 | StringBuilder sb = new StringBuilder(html); |
||
| 830 | String semHtml = sb.toString() |
||
| 831 | .replace("<br>", System.getProperty("line.separator")) |
||
| 832 | .replace("<br />", System.getProperty("line.separator")) |
||
| 833 | .replace("<br/>", System.getProperty("line.separator")) |
||
| 834 | .replace(" ", " ") |
||
| 835 | .replaceAll("\\<.*?>",""); |
||
| 836 | System.out.println(semHtml.trim()); |
||
| 837 | */ |
||
| 838 | |||
| 839 | Document doc = Jsoup.parse(html); |
||
| 840 | Element link = doc.body(); |
||
| 841 | // String text = doc.body().text(); // "An example link" |
||
| 842 | // String linkHref = link.attr("href"); // "http://example.com/" |
||
| 843 | // String linkText = link.wrap("<span>").text(); // "example"" |
||
| 844 | // String linkOuterH = link.outerHtml(); // "<a href="http://example.com"><b>example</b></a>" |
||
| 845 | // String linkInnerH = link.html(); // "<b>example</b>" |
||
| 846 | // System.out.println(linkText.toString()); |
||
| 847 | // System.out.println(text.trim()); |
||
| 848 | |||
| 849 | } |
||
| 850 | } |