Class IDDocumentDescription

  • All Implemented Interfaces:
    net.minidev.json.JSONAware

    public class IDDocumentDescription
    extends Object
    implements net.minidev.json.JSONAware
    Identity document description.

    Related specifications:

    • OpenID Connect for Identity Assurance 1.0, section 4.1.1.1.
    • Constructor Detail

      • IDDocumentDescription

        public IDDocumentDescription​(IDDocumentType type,
                                     String number,
                                     String issuerName,
                                     CountryCode issuerCountry,
                                     SimpleDate dateOfIssuance,
                                     SimpleDate dateOfExpiry)
        Creates a new identity document description.
        Parameters:
        type - The type. Must not be null.
        number - The number, null if not specified.
        issuerName - The issuer name, null if not specified.
        issuerCountry - The issuer country, null if not specified.
        dateOfIssuance - The date of issuance, null if not specified.
        dateOfExpiry - The date of expiry, null if not specified.
    • Method Detail

      • getType

        public IDDocumentType getType()
        Returns the identity document type.
        Returns:
        The identity document type.
      • getNumber

        public String getNumber()
        Returns the identity document number.
        Returns:
        The identity document number, null if not specified.
      • getIssuerName

        public String getIssuerName()
        Returns the issuer name.
        Returns:
        The issuer name, null if not specified.
      • getIssuerCountry

        public CountryCode getIssuerCountry()
        Returns the issuer country.
        Returns:
        The issuer country code, null if not specified.
      • getDateOfIssuance

        public SimpleDate getDateOfIssuance()
        Returns the date of issuance.
        Returns:
        The date of issuance, null if not specified.
      • getDateOfExpiry

        public SimpleDate getDateOfExpiry()
        Returns the date of expiry.
        Returns:
        The date of expiry, null if not specified.
      • toJSONObject

        public net.minidev.json.JSONObject toJSONObject()
        Returns a JSON object representation of this identity document description.
        Returns:
        The JSON object.
      • toJSONString

        public String toJSONString()
        Specified by:
        toJSONString in interface net.minidev.json.JSONAware
      • parse

        public static IDDocumentDescription parse​(net.minidev.json.JSONObject jsonObject)
                                           throws ParseException
        Parses an identity document description from the specified JSON object.
        Parameters:
        jsonObject - The JSON object. Must not be null.
        Returns:
        The identity document description.
        Throws:
        ParseException - If parsing failed.