Top Inners Fields Constructors Methods
com.mchange.v1.db.sql

public Class XmlSchema

extends Object
implements Schema
Class Inheritance
All Implemented Interfaces
com.mchange.v1.db.sql.Schema
Imports
java.io.*, java.net.*, java.sql.*, java.util.*, org.xml.sax.*, javax.xml.parsers.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
XmlSchema.MySaxHandler

Deprecated as a consequence of HandlerBase being deprecated.
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv Map<K, V>
private static final int
pack-priv List<E>
private static final int
pack-priv List<E>

Constructor Summary

AccessConstructor and Description
public
XmlSchema(URL xmlSchema)

public
public

Method Summary

Modifier and TypeMethod and Description
public void
private void
doStatementList(List<E> stmtList, Connection con)

public void
public String
public static void
main(String[] argv)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

appMapback to summary
pack-priv Map<K, V> appMap
CREATEback to summary
private static final int CREATE
createStmtsback to summary
pack-priv List<E> createStmts
DROPback to summary
private static final int DROP
dropStmtsback to summary
pack-priv List<E> dropStmts

Constructor Detail

XmlSchemaback to summary
public XmlSchema(URL xmlSchema) throws SAXException, IOException, ParserConfigurationException
XmlSchemaback to summary
public XmlSchema(InputStream xmlStream) throws SAXException, IOException, ParserConfigurationException
XmlSchemaback to summary
public XmlSchema()

Method Detail

createSchemaback to summary
public void createSchema(Connection con) throws SQLException

Implements com.mchange.v1.db.sql.Schema.createSchema.

doStatementListback to summary
private void doStatementList(List<E> stmtList, Connection con) throws SQLException
dropSchemaback to summary
public void dropSchema(Connection con) throws SQLException

Implements com.mchange.v1.db.sql.Schema.dropSchema.

getStatementTextback to summary
public String getStatementText(String appName, String stmtName)

Implements com.mchange.v1.db.sql.Schema.getStatementText.

mainback to summary
public static void main(String[] argv)
parseback to summary
public void parse(InputStream is) throws SAXException, IOException, ParserConfigurationException
com.mchange.v1.db.sql back to summary

pack-priv Class XmlSchema.MySaxHandler

extends HandlerBase
Class Inheritance

Deprecated

as a consequence of HandlerBase being deprecated. See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
pack-priv StringBuffer
pack-priv XmlSchema.SqlApp
pack-priv String
pack-priv boolean
pack-priv boolean
pack-priv int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
characters(char[]
The characters.
ch
,
int
The start position in the character array.
start
,
int
The number of characters to use from the character array.
length
)

Overrides org.xml.sax.HandlerBase.characters.

Implements org.xml.sax.DocumentHandler.characters.

Receive notification of character data inside an element.

public void
endElement(String
the element name
name
)

Overrides org.xml.sax.HandlerBase.endElement.

Implements org.xml.sax.DocumentHandler.endElement.

Receive notification of the end of an element.

public void
error(SAXParseException
The warning information encoded as an exception.
ex
)

Overrides org.xml.sax.HandlerBase.error.

Implements org.xml.sax.ErrorHandler.error.

Error.

public void
fatalError(SAXParseException
The error information encoded as an exception.
ex
)

Overrides org.xml.sax.HandlerBase.fatalError.

Implements org.xml.sax.ErrorHandler.fatalError.

Fatal error.

public void
startElement(String
The element type name.
name
,
AttributeList
The specified or defaulted attributes.
attributes
)

Overrides org.xml.sax.HandlerBase.startElement.

Implements org.xml.sax.DocumentHandler.startElement.

Deprecated as a consequence of AttributeList being deprecated.

Receive notification of the start of an element.

public void
warning(SAXParseException
The warning information encoded as an exception.
ex
)

Overrides org.xml.sax.HandlerBase.warning.

Implements org.xml.sax.ErrorHandler.warning.

Warning.

Inherited from org.xml.sax.HandlerBase:
endDocumentignorableWhitespacenotationDeclprocessingInstructionresolveEntitysetDocumentLocatorstartDocumentunparsedEntityDecl

Field Detail

charBuffback to summary
pack-priv StringBuffer charBuff
currentAppback to summary
pack-priv XmlSchema.SqlApp currentApp
currentStmtNameback to summary
pack-priv String currentStmtName
in_commentback to summary
pack-priv boolean in_comment
in_statementback to summary
pack-priv boolean in_statement
stateback to summary
pack-priv int state

Constructor Detail

MySaxHandlerback to summary
pack-priv MySaxHandler()

Method Detail

charactersback to summary
public void characters(char[] ch, int start, int length) throws SAXException

Overrides org.xml.sax.HandlerBase.characters.

Implements org.xml.sax.DocumentHandler.characters.

Doc from org.xml.sax.HandlerBase.characters.

Receive notification of character data inside an element.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).

Parameters
ch:char[]

The characters.

start:int

The start position in the character array.

length:int

The number of characters to use from the character array.

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
endElementback to summary
public void endElement(String name)

Overrides org.xml.sax.HandlerBase.endElement.

Implements org.xml.sax.DocumentHandler.endElement.

Doc from org.xml.sax.HandlerBase.endElement.

Receive notification of the end of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).

Parameters
name:String

the element name

errorback to summary
public void error(SAXParseException ex)

Overrides org.xml.sax.HandlerBase.error.

Implements org.xml.sax.ErrorHandler.error.

Error.

Parameters
ex:SAXParseException

Doc from org.xml.sax.HandlerBase.error.

The warning information encoded as an exception.

fatalErrorback to summary
public void fatalError(SAXParseException ex) throws SAXException

Overrides org.xml.sax.HandlerBase.fatalError.

Implements org.xml.sax.ErrorHandler.fatalError.

Fatal error.

Parameters
ex:SAXParseException

Doc from org.xml.sax.HandlerBase.fatalError.

The error information encoded as an exception.

Exceptions
SAXException:

Doc from org.xml.sax.HandlerBase.fatalError.

Any SAX exception, possibly wrapping another exception.

startElementback to summary
public void startElement(String name, AttributeList attributes)

Overrides org.xml.sax.HandlerBase.startElement.

Implements org.xml.sax.DocumentHandler.startElement.

Doc from org.xml.sax.HandlerBase.startElement.

Deprecated

as a consequence of AttributeList being deprecated. See corresponding docs for further information.

Receive notification of the start of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

Parameters
name:String

The element type name.

attributes:AttributeList

The specified or defaulted attributes.

warningback to summary
public void warning(SAXParseException ex)

Overrides org.xml.sax.HandlerBase.warning.

Implements org.xml.sax.ErrorHandler.warning.

Warning.

Parameters
ex:SAXParseException

Doc from org.xml.sax.HandlerBase.warning.

The warning information encoded as an exception.

com.mchange.v1.db.sql back to summary

pack-priv Class XmlSchema.SqlApp

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv Map<K, V>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

stmtMapback to summary
pack-priv Map<K, V> stmtMap

Constructor Detail

SqlAppback to summary
pack-priv SqlApp()

Method Detail

getStatementTextback to summary
public String getStatementText(String name)
setStatementTextback to summary
public void setStatementText(String name, String sql)