Package org.jmrtd.lds.icao
Class DG11File
- java.lang.Object
-
- org.jmrtd.lds.AbstractTaggedLDSFile
-
- org.jmrtd.lds.DataGroup
-
- org.jmrtd.lds.icao.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.- Name of Holder (Primary and Secondary Identifiers, in full)
- Other Name(s)
- Personal Number
- Place of Birth
- Date of Birth (in full)
- Address
- Telephone Number(s)
- Profession
- Title
- Personal Summary
- Proof of Citizenship [see 14.5.1]
- Number of Other Valid Travel Documents
- Other Travel Document Numbers
- Custody Information
- Version:
- $Revision: 1802 $
- Author:
- The JMRTD team ([email protected])
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONTENT_SPECIFIC_CONSTRUCTED_TAG
static int
COUNT_TAG
static int
CUSTODY_INFORMATION_TAG
static int
FULL_DATE_OF_BIRTH_TAG
static int
FULL_NAME_TAG
static int
OTHER_NAME_TAG
static int
OTHER_VALID_TD_NUMBERS_TAG
static int
PERMANENT_ADDRESS_TAG
static int
PERSONAL_NUMBER_TAG
static int
PERSONAL_SUMMARY_TAG
static int
PLACE_OF_BIRTH_TAG
static int
PROFESSION_TAG
static int
PROOF_OF_CITIZENSHIP_TAG
static int
TAG_LIST_TAG
static int
TELEPHONE_TAG
static int
TITLE_TAG
-
Fields inherited from interface org.jmrtd.lds.LDSFile
EF_COM_TAG, EF_DG1_TAG, EF_DG10_TAG, EF_DG11_TAG, EF_DG12_TAG, EF_DG13_TAG, EF_DG14_TAG, EF_DG15_TAG, EF_DG16_TAG, EF_DG2_TAG, EF_DG3_TAG, EF_DG4_TAG, EF_DG5_TAG, EF_DG6_TAG, EF_DG7_TAG, EF_DG8_TAG, EF_DG9_TAG, EF_SOD_TAG
-
-
Constructor Summary
Constructors Constructor Description DG11File(InputStream inputStream)
Constructs a file from binary representation.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.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getCustodyInformation()
Returns the custody information.byte[]
getEncoded()
Returns the contents of this file as byte array, includes the ICAO tag and length.String
getFullDateOfBirth()
Returns the full date of birth.String
getNameOfHolder()
Returns the full name of the holder (primary and secondary identifiers).List<String>
getOtherNames()
Returns the other names.List<String>
getOtherValidTDNumbers()
Returns the other valid travel document numbers.List<String>
getPermanentAddress()
Returns the permanent address.String
getPersonalNumber()
Returns the personal number.String
getPersonalSummary()
Returns the personal summary.List<String>
getPlaceOfBirth()
Returns the place of birth.String
getProfession()
Returns the holder's profession.byte[]
getProofOfCitizenship()
Returns the proof of citizenship.int
getTag()
Returns the tag that identifies this LDS file.List<Integer>
getTagPresenceList()
Returns the list of tags of fields actually present.String
getTelephone()
Returns the telephone number.String
getTitle()
Returns the holder's title.int
hashCode()
protected void
readContent(InputStream inputStream)
Reads the contents of the data group from an input stream.String
toString()
Returns a textual representation of this file.protected void
writeContent(OutputStream out)
Writes the contents of the data group to an output stream.-
Methods inherited from class org.jmrtd.lds.AbstractTaggedLDSFile
getLength, readObject, writeObject
-
-
-
-
Field Detail
-
TAG_LIST_TAG
public static final int TAG_LIST_TAG
- See Also:
- Constant Field Values
-
FULL_NAME_TAG
public static final int FULL_NAME_TAG
- See Also:
- Constant Field Values
-
OTHER_NAME_TAG
public static final int OTHER_NAME_TAG
- See Also:
- Constant Field Values
-
PERSONAL_NUMBER_TAG
public static final int PERSONAL_NUMBER_TAG
- See Also:
- Constant Field Values
-
FULL_DATE_OF_BIRTH_TAG
public static final int FULL_DATE_OF_BIRTH_TAG
- See Also:
- Constant Field Values
-
PLACE_OF_BIRTH_TAG
public static final int PLACE_OF_BIRTH_TAG
- See Also:
- Constant Field Values
-
PERMANENT_ADDRESS_TAG
public static final int PERMANENT_ADDRESS_TAG
- See Also:
- Constant Field Values
-
TELEPHONE_TAG
public static final int TELEPHONE_TAG
- See Also:
- Constant Field Values
-
PROFESSION_TAG
public static final int PROFESSION_TAG
- See Also:
- Constant Field Values
-
TITLE_TAG
public static final int TITLE_TAG
- See Also:
- Constant Field Values
-
PERSONAL_SUMMARY_TAG
public static final int PERSONAL_SUMMARY_TAG
- See Also:
- Constant Field Values
-
PROOF_OF_CITIZENSHIP_TAG
public static final int PROOF_OF_CITIZENSHIP_TAG
- See Also:
- Constant Field Values
-
OTHER_VALID_TD_NUMBERS_TAG
public static final int OTHER_VALID_TD_NUMBERS_TAG
- See Also:
- Constant Field Values
-
CUSTODY_INFORMATION_TAG
public static final int CUSTODY_INFORMATION_TAG
- See Also:
- Constant Field Values
-
CONTENT_SPECIFIC_CONSTRUCTED_TAG
public static final int CONTENT_SPECIFIC_CONSTRUCTED_TAG
- See Also:
- Constant Field Values
-
COUNT_TAG
public static final int COUNT_TAG
- See Also:
- Constant Field Values
-
-
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. Usenull
if data element is not present. Use'<'
as separator.- Parameters:
nameOfHolder
- data elementotherNames
- data elementpersonalNumber
- data elementfullDateOfBirth
- data elementplaceOfBirth
- data elementpermanentAddress
- data elementtelephone
- data elementprofession
- data elementtitle
- data elementpersonalSummary
- data elementproofOfCitizenship
- data elementotherValidTDNumbers
- data elementcustodyInformation
- 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. Usenull
if data element is not present. Use'<'
as separator.- Parameters:
nameOfHolder
- data elementotherNames
- data elementpersonalNumber
- data elementfullDateOfBirth
- data elementplaceOfBirth
- data elementpermanentAddress
- data elementtelephone
- data elementprofession
- data elementtitle
- data elementpersonalSummary
- data elementproofOfCitizenship
- data elementotherValidTDNumbers
- data elementcustodyInformation
- data element
-
-
Method Detail
-
getTag
public int getTag()
Description copied from class:AbstractTaggedLDSFile
Returns the tag that identifies this LDS file.- Overrides:
getTag
in classAbstractTaggedLDSFile
- Returns:
- the tag of this LDS file
-
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.
-
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 classAbstractTaggedLDSFile
- 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 classAbstractTaggedLDSFile
- 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 interfaceLDSElement
- Returns:
- a byte array containing the file
-
-