Two classes in the org.springframework.ldap.core package provide the means to represent an LDIF in code:
LdapAttribute - Extends javax.naming.directory.BasicAttribute adding support for LDIF options as defined in RFC2849.
LdapAttributes - Extends javax.naming.directory.BasicAttributes adding specialized support for DNs.
LdapAttribute objects represent options as a Set<String>. The DN support added to the LdapAttributes object employs the org.springframework.ldap.core.DistinguishedName class.