|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.jenkinsci.plugins.darcs.DarcsSaxHandler
class DarcsSaxHandler
SAS based change log parser.
Nested Class Summary | |
---|---|
private static class |
DarcsSaxHandler.DarcsChangelogTag
The tags used in the change log XML. |
private static class |
DarcsSaxHandler.DarcsMoveTagAttribute
Attributes the <move> has. |
private static class |
DarcsSaxHandler.DarcsPatchTagAttribute
Attributes the <patch> has. |
Field Summary | |
---|---|
private static String |
ATTR_FALSE
False attribute value for boolean tag attributes. |
private static String |
ATTR_TRUE
True attribute value for boolean tag attributes. |
private List<DarcsChangeSet> |
changeSets
Change sets collected during the parse process. |
private DarcsChangeSet |
currentChangeSet
Current processed change set. |
private DarcsSaxHandler.DarcsChangelogTag |
currentTag
The current parsed tag. |
private StringBuilder |
literalBuffer
Buffers scanned literals. |
private static Logger |
LOGGER
Logging facility. |
private boolean |
ready
Signals that parsing has ended. |
Constructor Summary | |
---|---|
DarcsSaxHandler()
Dedicated constructor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(String uri,
String name,
String qName)
|
void |
error(SAXParseException saxpe)
|
void |
fatalError(SAXParseException saxpe)
|
List<DarcsChangeSet> |
getChangeSets()
Get the list of parsed change sets. |
boolean |
isReady()
Returns if the parsing of the XML has ended. |
private boolean |
isWhiteSpace(char c)
Determine whether a character is a whitespace character or not. |
private void |
recognizeTag(String tagName)
Recognizes the current scanned tag. |
private boolean |
skipWhiteSpace()
Return whether to skip white spaces. |
void |
startElement(String uri,
String name,
String qName,
Attributes atts)
|
(package private) static String |
stripIgnoreThisFromComment(String comment)
Strips out strings like "Ignore-this: 606c40ef0d257da9b7a916e7f1c594aa". |
void |
warning(SAXParseException saxpe)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Logger LOGGER
private static final String ATTR_TRUE
private static final String ATTR_FALSE
private DarcsSaxHandler.DarcsChangelogTag currentTag
private DarcsChangeSet currentChangeSet
private boolean ready
private final List<DarcsChangeSet> changeSets
private StringBuilder literalBuffer
Constructor Detail |
---|
public DarcsSaxHandler()
Method Detail |
---|
public boolean isReady()
true
if end of document reached, else false
public List<DarcsChangeSet> getChangeSets()
null
public void endDocument()
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
private void recognizeTag(String tagName)
currentTag
to .
tagName
- scanned tag namepublic void startElement(String uri, String name, String qName, Attributes atts)
startElement
in interface ContentHandler
startElement
in class DefaultHandler
public void endElement(String uri, String name, String qName)
endElement
in interface ContentHandler
endElement
in class DefaultHandler
static String stripIgnoreThisFromComment(String comment)
comment
- comment message
private boolean isWhiteSpace(char c)
c
- character to check
true
if passed in char is one of \n, \r, \t, ' '; else false
private boolean skipWhiteSpace()
false
if current tag is or ;
else false
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class DefaultHandler
public void error(SAXParseException saxpe)
error
in interface ErrorHandler
error
in class DefaultHandler
public void fatalError(SAXParseException saxpe)
fatalError
in interface ErrorHandler
fatalError
in class DefaultHandler
public void warning(SAXParseException saxpe)
warning
in interface ErrorHandler
warning
in class DefaultHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |