org.apache.directory.shared.converter.schema
Class SchemaParser

java.lang.Object
  extended by org.apache.directory.shared.converter.schema.SchemaParser

public class SchemaParser
extends java.lang.Object

A reusable wrapper for antlr generated schema parsers.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
SchemaParser()
          Creates a reusable instance of an SchemaParser.
 
Method Summary
 void clear()
          Clear the parser.
 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.
 java.util.List<SchemaElement> parse(java.io.InputStream schemaIn, java.io.Writer out)
          Thread safe method parses a stream of OpenLDAP schemaObject elements/objects.
 java.util.List<SchemaElement> parse(java.lang.String schemaObject)
          Thread safe method parses an OpenLDAP schemaObject element/object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaParser

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

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()
Clear the parser.


parse

public java.util.List<SchemaElement> 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 java.util.List<SchemaElement> parse(java.io.InputStream schemaIn,
                                           java.io.Writer out)
                                    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


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.