org.jboss.dna.sequencer.ddl
Class DdlParsers

java.lang.Object
  extended by org.jboss.dna.sequencer.ddl.DdlParsers

public class DdlParsers
extends Object

A parser of DDL file content. This class can be used directly to create an AstNode tree representing nodes and properties for DDL statement components.

You can also provide an input or parent AstNode node as the starting point for your tree.

The parser is based on the SQL-92 and extended by specific dialects. These dialect-specific parsers provide db-specific parsing of db-specific statements of statement extensions, features or properties.


Constructor Summary
DdlParsers()
           
 
Method Summary
 AstNode parse(String ddl)
          Parses input ddl string and adds discovered child AstNodes and properties to a new root node.
 boolean parse(String ddl, AstNode rootNode)
          Parses input ddl string and adds discovered child AstNodes and properties.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DdlParsers

public DdlParsers()
Method Detail

parse

public AstNode parse(String ddl)
              throws ParsingException
Parses input ddl string and adds discovered child AstNodes and properties to a new root node.

Parameters:
ddl - content string; may not be null
Returns:
the root tree AstNode
Throws:
ParsingException

parse

public boolean parse(String ddl,
                     AstNode rootNode)
              throws ParsingException
Parses input ddl string and adds discovered child AstNodes and properties.

Parameters:
ddl - content string; may not be null
rootNode - the root AstNode; may not be null
Returns:
true if parsed successfully
Throws:
ParsingException


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.