com.ibm.di.parser
Class LDIFParser

java.lang.Object
  extended by com.ibm.di.parser.ParserImpl
      extended by com.ibm.di.parser.LDIFParser
All Implemented Interfaces:
ParserInterface, VersionInfoInterface

public class LDIFParser
extends ParserImpl

The LDIF Parser reads and writes LDIF style data. The LDIF Parser is usually to do file exchange with an LDAP directory.


Field Summary
 
Fields inherited from class com.ibm.di.parser.ParserImpl
_debug, myConfiguration
 
Constructor Summary
LDIFParser()
          Creates LDIF Parser.
 
Method Summary
 String getVersion()
          Version information.
 void initParser()
          This function is called after the connector has initialized the parser with input/output streams.
 boolean isDeltaSupported()
          Returns true if this connector is able to perform delta updates
static void main(String[] argv)
          Provided to test/debug function usage: passed argument of classpath to LDIF file will dump entries.
 Entry readEntry()
          Reads LDIF files into entries.
 void writeEntry(Entry entry)
          Writes entry in LDIF format to the current output writer.
 
Methods inherited from class com.ibm.di.parser.ParserImpl
closeParser, debug, debugMode, flush, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, logmsg, querySchema, registerScriptBeans, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDIFParser

public LDIFParser()
Creates LDIF Parser.

Method Detail

initParser

public void initParser()
This function is called after the connector has initialized the parser with input/output streams.

Specified by:
initParser in interface ParserInterface
Overrides:
initParser in class ParserImpl

readEntry

public Entry readEntry()
                throws IOException
Reads LDIF files into entries. This method parses LDIF attributes to entry attributes and maps "dn" key to internal name specified by the ldifDNAttributeName parameter. This is the main entry point for reading entries.

Returns:
entry
Throws:
IOException - If an I/O error occurs

writeEntry

public void writeEntry(Entry entry)
                throws IOException
Writes entry in LDIF format to the current output writer. Depending on whether ldifVersion parameter is checked the ldif version number is also written .

Parameters:
entry - the entry to be written.
Throws:
IOException - If an I/O error occurs

getVersion

public String getVersion()
Version information.

Returns:
version information

main

public static void main(String[] argv)
Provided to test/debug function usage: passed argument of classpath to LDIF file will dump entries.

Parameters:
argv - String array

isDeltaSupported

public boolean isDeltaSupported()
Returns true if this connector is able to perform delta updates

Specified by:
isDeltaSupported in interface ParserInterface
Overrides:
isDeltaSupported in class ParserImpl
Returns:
false