Search in sources :

Example 1 with DIDAbstractMarkerType

use of iso.std.iso_iec._24727.tech.schema.DIDAbstractMarkerType in project open-ecard by ecsec.

the class AndroidMarshaller method parseMarker.

private DIDAbstractMarkerType parseMarker(XmlPullParser parser, Class<? extends DIDAbstractMarkerType> cls) throws XmlPullParserException, IOException {
    try {
        DIDAbstractMarkerType paceMarker = cls.newInstance();
        paceMarker.setProtocol(parser.getAttributeValue(null, "Protocol"));
        Document d = documentBuilder.newDocument();
        String name = cls.getSimpleName().replace("Type", "");
        paceMarker.getAny().addAll(parseAnyTypes(parser, name, parser.getNamespace(), d, false, new String[0], new String[0]));
        return paceMarker;
    } catch (InstantiationException e) {
        throw new RuntimeCryptoException();
    } catch (IllegalAccessException e) {
        throw new RuntimeCryptoException();
    }
}
Also used : RuntimeCryptoException(org.openecard.bouncycastle.crypto.RuntimeCryptoException) LocalizedString(org.openecard.addon.manifest.LocalizedString) Document(org.w3c.dom.Document) DIDAbstractMarkerType(iso.std.iso_iec._24727.tech.schema.DIDAbstractMarkerType)

Aggregations

DIDAbstractMarkerType (iso.std.iso_iec._24727.tech.schema.DIDAbstractMarkerType)1 LocalizedString (org.openecard.addon.manifest.LocalizedString)1 RuntimeCryptoException (org.openecard.bouncycastle.crypto.RuntimeCryptoException)1 Document (org.w3c.dom.Document)1