111 lines
2.5 KiB
Java
111 lines
2.5 KiB
Java
/*
|
|
* Creado el 12-feb-07
|
|
*/
|
|
package com.tarisan.chipcard.tpvvs.webservicetrayicon.messages;
|
|
|
|
import es.chipcard.util.*;
|
|
import org.w3c.dom.*;
|
|
|
|
public class AutRes extends CCRes{
|
|
private Aut arrAut[]=null;
|
|
|
|
public AutRes(Document doc) throws Exception{
|
|
super(doc);
|
|
if(getAutRes()==null){
|
|
throw new Exception("El XML dado como argumento no es un AutRes");
|
|
}
|
|
|
|
NodeList nl=getAutRes().getElementsByTagName("Aut");
|
|
if(nl.getLength()>0){
|
|
arrAut=new Aut[nl.getLength()];
|
|
for(int i=0;i<nl.getLength();i++){
|
|
arrAut[i]=new Aut((Element)nl.item(i));
|
|
}
|
|
}
|
|
/**
|
|
Element xmlAut=SerClsXMLUtils.dameElemento(getAutRes(),"Aut");
|
|
Vector vAuts=new Vector();
|
|
int nContador=0;
|
|
if(xmlAut!=null){
|
|
nContador++;
|
|
while(xmlAut!=null){
|
|
|
|
}
|
|
Node n=xmlAut.getNextSibling();
|
|
}**/
|
|
}
|
|
|
|
|
|
protected Element getAutRes(){
|
|
return SerClsXMLUtils.dameElemento(getCCRes(),"AutRes");
|
|
}
|
|
|
|
protected Element getTarjeta(){
|
|
return SerClsXMLUtils.dameElemento(getAutRes(),"Tarjeta");
|
|
}
|
|
|
|
public boolean hayTarjeta(){
|
|
return (getTarjeta()!=null);
|
|
}
|
|
|
|
public String getNumeroTarjeta(){
|
|
return SerClsXMLUtils.dameValorEl(getTarjeta(),"num");
|
|
}
|
|
|
|
public String getVersionTarjeta(){
|
|
return SerClsXMLUtils.dameValorEl(getTarjeta(),"ver");
|
|
}
|
|
|
|
public String getCoberturaTarjeta(){
|
|
return SerClsXMLUtils.dameValorEl(getTarjeta(),"cob");
|
|
}
|
|
|
|
public String getFechaAltaTarjeta(){
|
|
return SerClsXMLUtils.dameValorEl(getTarjeta(),"falta");
|
|
}
|
|
|
|
public String getFechaBajaTarjeta(){
|
|
return SerClsXMLUtils.dameValorEl(getTarjeta(),"fbaja");
|
|
}
|
|
public String getTipAut(){
|
|
return SerClsXMLUtils.dameValorEl(getAutRes(),"TipAut");
|
|
}
|
|
|
|
public String getCodigoTerminal(){
|
|
return SerClsXMLUtils.dameValorEl(getAutRes(),"term");
|
|
}
|
|
|
|
|
|
public int getCodigoCompania(){
|
|
return Integer.parseInt(SerClsXMLUtils.dameValorEl(getAutRes(),"Comp"));
|
|
}
|
|
|
|
public int getCodigoEspecialidad(){
|
|
String sEspe=SerClsXMLUtils.dameValorEl(getAutRes(),"Espec");
|
|
if(sEspe==null)
|
|
return -1;
|
|
return Integer.parseInt(sEspe);
|
|
}
|
|
|
|
public String getCodigoProfesional(){
|
|
return SerClsXMLUtils.dameValorEl(getAutRes(),"Prof");
|
|
}
|
|
|
|
public int getCodigoListaActos(){
|
|
String sValue=SerClsXMLUtils.dameValorEl(getAutRes(),"lactos");
|
|
if(sValue==null)
|
|
return -1;
|
|
return Integer.parseInt(sValue);
|
|
}
|
|
|
|
public int getNumAut(){
|
|
if(arrAut==null)
|
|
return 0;
|
|
return arrAut.length;
|
|
}
|
|
|
|
public Aut[] getAut(){
|
|
return arrAut;
|
|
}
|
|
}
|