Class DG11File

  • All Implemented Interfaces:
    Serializable, LDSElement, LDSFile

    public class DG11File
    extends DataGroup
    File structure for the EF_DG11 file. Datagroup 11 contains additional personal detail(s). All fields are optional. See Section 16 of LDS-TR.
    1. Name of Holder (Primary and Secondary Identifiers, in full)
    2. Other Name(s)
    3. Personal Number
    4. Place of Birth
    5. Date of Birth (in full)
    6. Address
    7. Telephone Number(s)
    8. Profession
    9. Title
    10. Personal Summary
    11. Proof of Citizenship [see 14.5.1]
    12. Number of Other Valid Travel Documents
    13. Other Travel Document Numbers
    14. Custody Information
    Version:
    $Revision: 1802 $
    Author:
    The JMRTD team ([email protected])
    See Also:
    Serialized Form
    • Constructor Detail

      • DG11File

        public DG11File​(InputStream inputStream)
                 throws IOException
        Constructs a file from binary representation.
        Parameters:
        inputStream - an input stream
        Throws:
        IOException - if reading fails
      • DG11File

        public DG11File​(String nameOfHolder,
                        List<String> otherNames,
                        String personalNumber,
                        Date fullDateOfBirth,
                        List<String> placeOfBirth,
                        List<String> permanentAddress,
                        String telephone,
                        String profession,
                        String title,
                        String personalSummary,
                        byte[] proofOfCitizenship,
                        List<String> otherValidTDNumbers,
                        String custodyInformation)
        Constructs a new file. Use null if data element is not present. Use '<' as separator.
        Parameters:
        nameOfHolder - data element
        otherNames - data element
        personalNumber - data element
        fullDateOfBirth - data element
        placeOfBirth - data element
        permanentAddress - data element
        telephone - data element
        profession - data element
        title - data element
        personalSummary - data element
        proofOfCitizenship - data element
        otherValidTDNumbers - data element
        custodyInformation - data element
      • DG11File

        public DG11File​(String nameOfHolder,
                        List<String> otherNames,
                        String personalNumber,
                        String fullDateOfBirth,
                        List<String> placeOfBirth,
                        List<String> permanentAddress,
                        String telephone,
                        String profession,
                        String title,
                        String personalSummary,
                        byte[] proofOfCitizenship,
                        List<String> otherValidTDNumbers,
                        String custodyInformation)
        Constructs a new file. Use null if data element is not present. Use '<' as separator.
        Parameters:
        nameOfHolder - data element
        otherNames - data element
        personalNumber - data element
        fullDateOfBirth - data element
        placeOfBirth - data element
        permanentAddress - data element
        telephone - data element
        profession - data element
        title - data element
        personalSummary - data element
        proofOfCitizenship - data element
        otherValidTDNumbers - data element
        custodyInformation - data element
    • Method Detail

      • getTagPresenceList

        public List<Integer> getTagPresenceList()
        Returns the list of tags of fields actually present.
        Returns:
        list of tags
      • getNameOfHolder

        public String getNameOfHolder()
        Returns the full name of the holder (primary and secondary identifiers).
        Returns:
        the name of holder
      • getOtherNames

        public List<String> getOtherNames()
        Returns the other names.
        Returns:
        the other names, or empty list when not present
      • getPersonalNumber

        public String getPersonalNumber()
        Returns the personal number.
        Returns:
        the personal number
      • getFullDateOfBirth

        public String getFullDateOfBirth()
        Returns the full date of birth.
        Returns:
        the full date of birth
      • getPlaceOfBirth

        public List<String> getPlaceOfBirth()
        Returns the place of birth.
        Returns:
        the place of birth
      • getPermanentAddress

        public List<String> getPermanentAddress()
        Returns the permanent address.
        Returns:
        the permanent address
      • getTelephone

        public String getTelephone()
        Returns the telephone number.
        Returns:
        the telephone
      • getProfession

        public String getProfession()
        Returns the holder's profession.
        Returns:
        the profession
      • getTitle

        public String getTitle()
        Returns the holder's title.
        Returns:
        the title
      • getPersonalSummary

        public String getPersonalSummary()
        Returns the personal summary.
        Returns:
        the personal summary
      • getProofOfCitizenship

        public byte[] getProofOfCitizenship()
        Returns the proof of citizenship.
        Returns:
        the proof of citizenship
      • getOtherValidTDNumbers

        public List<String> getOtherValidTDNumbers()
        Returns the other valid travel document numbers.
        Returns:
        the other valid travel document numbers
      • getCustodyInformation

        public String getCustodyInformation()
        Returns the custody information.
        Returns:
        the custody information
      • toString

        public String toString()
        Returns a textual representation of this file.
        Overrides:
        toString in class DataGroup
        Returns:
        a textual representation of this file
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • readContent

        protected void readContent​(InputStream inputStream)
                            throws IOException
        Description copied from class: AbstractTaggedLDSFile
        Reads the contents of the data group from an input stream. Client code implementing this method should only read the contents from the input stream, not the tag or length of the data group.
        Specified by:
        readContent in class AbstractTaggedLDSFile
        Parameters:
        inputStream - the input stream to read from
        Throws:
        IOException - on error reading from input stream
      • writeContent

        protected void writeContent​(OutputStream out)
                             throws IOException
        Description copied from class: AbstractTaggedLDSFile
        Writes the contents of the data group to an output stream. Client code implementing this method should only write the contents to the output stream, not the tag or length of the data group.
        Specified by:
        writeContent in class AbstractTaggedLDSFile
        Parameters:
        out - the output stream to write to
        Throws:
        IOException - on error writing to output stream
      • getEncoded

        public byte[] getEncoded()
        Returns the contents of this file as byte array, includes the ICAO tag and length.
        Specified by:
        getEncoded in interface LDSElement
        Returns:
        a byte array containing the file