« Voyage | Main | Yardwork »
January 09, 2005
LDAP schema repository. part V
This morning's hack on the schema repository was to pull an attribute type's doc entry off the server and slot it into a Java object that I can dump (currently to LDIF, soon to a man page). Amazingly what I wrote seemed to work right away.
[mcraig@lethe schema]$ cat Test.java class Test { public static void main(String [] args) { SchemaAttributeType sat = new SchemaAttributeType(); try { sat.read( "ldap://lethe/schema-oid=2.5.4.38" + "ou=attribute%20types,ou=schema%20repository"); System.out.println(sat.toLDIF()); } catch (Exception e) { e.printStackTrace(); } } } [mcraig@lethe schema]$ java Test dn: schema-oid=2.5.4.38,ou=attribute types,ou=schema repository objectClass: top objectClass: schemaAttributeType schema-oid: 2.5.4.38 schema-raw: ( 2.5.4.38 NAME 'authorityRevocationList' DESC 'Standard LDAP attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.5 X-ORIGIN 'RFC 2256' ) schema-name: authorityRevocationList schema-desc: Standard LDAP attribute type schema-obsolete: false schema-syntax: 1.3.6.1.4.1.1466.115.121.1.5 schema-single-value: false schema-collective: false schema-no-user-modification: false schema-x-origin: RFC 2256 schema-fulldesc: <para>Contains a list of CA certificates that have been revoked. This attribute is to be stored and requested in the binary form, as <literal>authorityRevocationList;binary</literal>.</para> schema-example: <programlisting>authorityRevocationList;binary:: AAAAAA==</programlisting>[mcraig@lethe schema]$
That must not be my fault. The group of folks writing the Java language and the folks writing the LDAP SDK for Java have just managed to do something so simple even dummies can use it.
Posted by Mark at January 9, 2005 09:14 AM