Top Fields Constructors Methods
liquibase.parser.core.xml

pack-priv Class XMLChangeLogSAXHandler

extends DefaultHandler
Class Inheritance
Imports
liquibase.Scope, liquibase.change.ChangeFactory, liquibase.changelog.ChangeLogParameters, .DatabaseChangeLog, liquibase.logging.Logger, liquibase.parser.ChangeLogParserFactory, liquibase.parser.core.ParsedNode, .ParsedNodeException, liquibase.precondition.PreconditionFactory, liquibase.resource.ResourceAccessor, liquibase.sql.visitor.SqlVisitorFactory, liquibase.util.StringUtil, org.xml.sax.Attributes, .SAXException, org.xml.sax.helpers.DefaultHandler, java.util.Stack

Field Summary

Modifier and TypeField and Description
private final ChangeFactory
private final ChangeLogParameters
private final ChangeLogParserFactory
private final DatabaseChangeLog
private ParsedNode
protected Logger
private final Stack<ParsedNode>
private final PreconditionFactory
private final ResourceAccessor
private final SqlVisitorFactory
private final Stack<StringBuilder>

Constructor Summary

AccessConstructor and Description
protected
XMLChangeLogSAXHandler(String physicalChangeLogLocation, ResourceAccessor resourceAccessor, ChangeLogParameters changeLogParameters)

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.helpers.DefaultHandler.characters.

Implements org.xml.sax.ContentHandler.characters.

Receive notification of character data inside an element.

public void
endElement(String
The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
uri
,
String
The local name (without prefix), or the empty string if Namespace processing is not being performed.
localName
,
String
The qualified name (with prefix), or the empty string if qualified names are not available.
qName
)

Overrides org.xml.sax.helpers.DefaultHandler.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Receive notification of the end of an element.

public DatabaseChangeLog
public ParsedNode
public void
startElement(String
The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
uri
,
String
The local name (without prefix), or the empty string if Namespace processing is not being performed.
localName
,
String
The qualified name (with prefix), or the empty string if qualified names are not available.
qualifiedName
,
Attributes
The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
attributes
)

Overrides org.xml.sax.helpers.DefaultHandler.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Receive notification of the start of an element.

Inherited from org.xml.sax.helpers.DefaultHandler:
endDocumentendPrefixMappingerrorfatalErrorignorableWhitespacenotationDeclprocessingInstructionresolveEntitysetDocumentLocatorskippedEntitystartDocumentstartPrefixMappingunparsedEntityDeclwarning

Field Detail

changeFactoryback to summary
private final ChangeFactory changeFactory
changeLogParametersback to summary
private final ChangeLogParameters changeLogParameters
changeLogParserFactoryback to summary
private final ChangeLogParserFactory changeLogParserFactory
databaseChangeLogback to summary
private final DatabaseChangeLog databaseChangeLog
databaseChangeLogTreeback to summary
private ParsedNode databaseChangeLogTree
logback to summary
protected Logger log
nodeStackback to summary
private final Stack<ParsedNode> nodeStack
preconditionFactoryback to summary
private final PreconditionFactory preconditionFactory
resourceAccessorback to summary
private final ResourceAccessor resourceAccessor
sqlVisitorFactoryback to summary
private final SqlVisitorFactory sqlVisitorFactory
textStackback to summary
private final Stack<StringBuilder> textStack

Constructor Detail

XMLChangeLogSAXHandlerback to summary
protected XMLChangeLogSAXHandler(String physicalChangeLogLocation, ResourceAccessor resourceAccessor, ChangeLogParameters changeLogParameters)

Method Detail

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

Overrides org.xml.sax.helpers.DefaultHandler.characters.

Implements org.xml.sax.ContentHandler.characters.

Doc from org.xml.sax.helpers.DefaultHandler.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.

Annotations
@Override
endElementback to summary
public void endElement(String uri, String localName, String qName) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Doc from org.xml.sax.helpers.DefaultHandler.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
uri:String

The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.

localName:String

The local name (without prefix), or the empty string if Namespace processing is not being performed.

qName:String

The qualified name (with prefix), or the empty string if qualified names are not available.

Annotations
@Override
Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
getDatabaseChangeLogback to summary
public DatabaseChangeLog getDatabaseChangeLog()
getDatabaseChangeLogTreeback to summary
public ParsedNode getDatabaseChangeLogTree()
startElementback to summary
public void startElement(String uri, String localName, String qualifiedName, Attributes attributes) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Doc from org.xml.sax.helpers.DefaultHandler.startElement.

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
uri:String

The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.

localName:String

The local name (without prefix), or the empty string if Namespace processing is not being performed.

qualifiedName:String

The qualified name (with prefix), or the empty string if qualified names are not available.

attributes:Attributes

The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.

Annotations
@Override
Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.