org.apache.directory.server.core.tools.schema
Class OpenLdapSchemaParser

java.lang.Object
  extended by org.apache.directory.server.core.tools.schema.OpenLdapSchemaParser

public class OpenLdapSchemaParser
extends java.lang.Object

A reusable wrapper for antlr generated OpenLDAP schema parsers.

Version:
$Rev: 434570 $
Author:
Apache Directory Project

Constructor Summary
OpenLdapSchemaParser()
          Creates a reusable instance of an OpenLdapSchemaParser.
 
Method Summary
 void clear()
           
 java.util.List getAttributeTypes()
           
 java.util.List getObjectClassTypes()
           
 void init()
          Initializes a parser and its plumbing.
 void parse(java.io.File schemaFile)
          Thread safe method parses a file of OpenLDAP schemaObject elements/objects.
 void parse(java.io.InputStream schemaIn)
          Thread safe method parses a stream of OpenLDAP schemaObject elements/objects.
 void parse(java.lang.String schemaObject)
          Thread safe method parses an OpenLDAP schemaObject element/object.
 void setParserMonitor(ParserMonitor monitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenLdapSchemaParser

public OpenLdapSchemaParser()
                     throws java.io.IOException
Creates a reusable instance of an OpenLdapSchemaParser.

Throws:
java.io.IOException - if the pipe cannot be formed
Method Detail

init

public void init()
          throws java.io.IOException
Initializes a parser and its plumbing.

Throws:
java.io.IOException - if a pipe cannot be formed.

clear

public void clear()

getAttributeTypes

public java.util.List getAttributeTypes()

getObjectClassTypes

public java.util.List getObjectClassTypes()

parse

public void parse(java.lang.String schemaObject)
           throws java.io.IOException,
                  java.text.ParseException
Thread safe method parses an OpenLDAP schemaObject element/object.

Parameters:
schemaObject - the String image of a complete schema object
Throws:
java.io.IOException
java.text.ParseException

parse

public void parse(java.io.InputStream schemaIn)
           throws java.io.IOException,
                  java.text.ParseException
Thread safe method parses a stream of OpenLDAP schemaObject elements/objects.

Parameters:
schemaIn - a stream of schema objects
Throws:
java.io.IOException
java.text.ParseException

parse

public void parse(java.io.File schemaFile)
           throws java.io.IOException,
                  java.text.ParseException
Thread safe method parses a file of OpenLDAP schemaObject elements/objects.

Parameters:
schemaFile - a file of schema objects
Throws:
java.io.IOException
java.text.ParseException

setParserMonitor

public void setParserMonitor(ParserMonitor monitor)