org.springframework.ldap.odm.tools

## Class SchemaToJava

- java.lang.Object
- - org.springframework.ldap.odm.tools.SchemaToJava

-     public final class SchemaToJava
      extends Object

  This tool creates a Java class representation of a set of LDAP object classes for use with `OdmManager`.

  The schema of a named list of object classes is read from an LDAP directory and used to generate a representative Java class. The Java class is automatically annotated with `org.springframework.ldap.odm.annotations` for use with `OdmManager`.

  The mapping of LDAP attributes to their Java representations may be configured by supplying the `-s` flag or the equivalent `--syntaxmap` flag whose argument is the name of a file with the following structure:

       # List of attribute syntax to java class mappings

       # Syntax                       Java class
       # ------                       ----------

       1.3.6.1.4.1.1466.115.121.1.50, java.lang.Integer
       1.3.6.1.4.1.1466.115.121.1.40, some.other.Class

  Syntaxes not included in this map will be represented as `String` if they are returned as Strings by the JNDI LDAP provider and will be represented as `byte[]` if they are returned by the provider as `byte[]`.

  Command line flags are as follows:

  - `-c,--class <class name>` Name of the Java class to create. Mandatory.
  - `-s,--syntaxmap <map file>` Configuration file of LDAP syntaxes to Java classes mappings. Optional.
  - `-h,--help` Print this help message then exit.
  - `-k,--package <package name>` Package to create the Java class in. Mandatory.
  - `-l,--url <ldap url>` Ldap url of the directory service to bind to. Defaults to `ldap://127.0.0.1:389`. Optional.
  - `-o,--objectclasses <LDAP object class lists>` Comma separated list of LDAP object classes. Mandatory.
  - `-u,--username <dn>` DN to bind with. Defaults to "". Optional.
  - `-p,--password <password>` Password to bind with. Defaults to "". Optional.
  - `-t,--outputdir <output directory>` Base output directory, defaults to ".". Optional.
  Author:
    Paul Harvey <paul.at.pauls-place.me.uk>

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(String[] argv)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### main

          public static void main(String[] argv)