br.ufsc.bridge.mpiclient.responsehandler.pdq.TelecomHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mpi-client Show documentation
Show all versions of mpi-client Show documentation
Implementação de client para um servidor MPI (Master Patient Index) utilizando mensagens SOAP (PIX/PDQ) baseadas na especificação técnica para integração do
DATASUS.
The newest version!
package br.ufsc.bridge.mpiclient.responsehandler.pdq;
import lombok.NonNull;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.XMLReader;
import br.ufsc.bridge.mpiclient.model.Cidadao;
import br.ufsc.bridge.mpiclient.model.Contato;
import br.ufsc.bridge.mpiclient.model.dominio.TipoContato;
import br.ufsc.bridge.mpiclient.responsehandler.DefaultAttributeHandler;
public class TelecomHandler extends DefaultAttributeHandler {
public TelecomHandler() {
super("telecom");
}
@Override
public void handle(@NonNull XMLReader reader, @NonNull ContentHandler parent, @NonNull Cidadao current, @NonNull Attributes attr) {
super.handle(reader, parent, current, attr);
current.getContatos().add(new Contato(attr.getValue("value"), TipoContato.getByValue(attr.getValue("use"))));
}
}