use of iso.std.iso_iec._24727.tech.schema.IFDCapabilitiesType in project open-ecard by ecsec.
the class AndroidMarshaller method marshalIFDCapabilities.
private Element marshalIFDCapabilities(IFDCapabilitiesType cap, Document document) {
Element emIFDCaps = createElementIso(document, cap.getClass().getSimpleName());
for (BioSensorCapabilityType bioCap : cap.getBioSensorCapability()) {
Element emBioCap = createElementIso(document, "BioSensorCapability");
Element emIndex = createElementIso(document, "Index");
emIndex.appendChild(document.createTextNode(bioCap.getIndex().toString()));
emBioCap.appendChild(emIndex);
Element emBiometricType = createElementIso(document, "BiometricType");
emBiometricType.appendChild(document.createTextNode(bioCap.getBiometricType().toString()));
emBioCap.appendChild(emBiometricType);
emIFDCaps.appendChild(emBioCap);
}
for (DisplayCapabilityType dispType : cap.getDisplayCapability()) {
Element emDisp = createElementIso(document, "DisplayCapability");
Element emIndex = createElementIso(document, "Index");
emIndex.appendChild(document.createTextNode(dispType.getIndex().toString()));
emDisp.appendChild(emIndex);
Element emLines = createElementIso(document, "Lines");
emLines.appendChild(document.createTextNode(dispType.getLines().toString()));
emDisp.appendChild(emLines);
Element emColumns = createElementIso(document, "Columns");
emColumns.appendChild(document.createTextNode(dispType.getColumns().toString()));
emDisp.appendChild(emColumns);
Element emVirLines = createElementIso(document, "VirtualLines");
emVirLines.appendChild(document.createTextNode(dispType.getVirtualLines().toString()));
emDisp.appendChild(emVirLines);
Element emVirColumns = createElementIso(document, "VirtualColumns");
emVirColumns.appendChild(document.createTextNode(dispType.getVirtualColumns().toString()));
emDisp.appendChild(emVirColumns);
emIFDCaps.appendChild(emDisp);
}
for (KeyPadCapabilityType keyPadType : cap.getKeyPadCapability()) {
Element emKP = createElementIso(document, "KeyPadCapability");
Element emIndex = createElementIso(document, "Index");
emIndex.appendChild(document.createTextNode(keyPadType.getIndex().toString()));
emKP.appendChild(emIndex);
Element emKeys = createElementIso(document, "Keys");
emKeys.appendChild(document.createTextNode(keyPadType.getKeys().toString()));
emKP.appendChild(emKeys);
emIFDCaps.appendChild(emKP);
}
for (SlotCapabilityType slotType : cap.getSlotCapability()) {
Element emSlot = createElementIso(document, "SlotCapability");
Element emIndex = createElementIso(document, "Index");
emIndex.appendChild(document.createTextNode(slotType.getIndex().toString()));
emSlot.appendChild(emIndex);
for (String protocol : slotType.getProtocol()) {
Element emProtocol = createElementIso(document, "Protocol");
emProtocol.appendChild(document.createTextNode(protocol));
emSlot.appendChild(emProtocol);
}
emIFDCaps.appendChild(emSlot);
}
Element emOpticalSignalUnit = createElementIso(document, "OpticalSignalUnit");
emOpticalSignalUnit.appendChild(document.createTextNode(Boolean.toString(cap.isOpticalSignalUnit())));
emIFDCaps.appendChild(emOpticalSignalUnit);
Element emAcousticSignalUnit = createElementIso(document, "AcousticSignalUnit");
emAcousticSignalUnit.appendChild(document.createTextNode(Boolean.toString(cap.isAcousticSignalUnit())));
emIFDCaps.appendChild(emAcousticSignalUnit);
return emIFDCaps;
}
use of iso.std.iso_iec._24727.tech.schema.IFDCapabilitiesType in project open-ecard by ecsec.
the class IfdEventManager method getCapabilities.
@Nullable
private IFDCapabilitiesType getCapabilities(byte[] ctxHandle, String ifdName) {
GetIFDCapabilities req = new GetIFDCapabilities();
req.setContextHandle(ctxHandle);
req.setIFDName(ifdName);
GetIFDCapabilitiesResponse res = (GetIFDCapabilitiesResponse) env.getDispatcher().safeDeliver(req);
return res.getIFDCapabilities();
}
Aggregations