|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--gate.config.ConfigXmlHandler
This is a SAX handler for processing gate.xml
files.
Field Summary | |
private SimpleErrorHandler |
_seh
This object indicates what to do when the parser encounts an error |
private Stack |
contentStack
A stack to stuff PCDATA onto for reading back at element ends. |
private FeatureMap |
currentAttributeMap
A feature map representation of the current element's attribute list |
private org.xml.sax.Attributes |
currentAttributes
The current element's attribute list |
private static boolean |
DEBUG
Debug flag |
private CreoleRegister |
register
The register object that we add CREOLE directories to during parsing. |
private URL |
sourceUrl
The source URL of the config file being parsed. |
private SystemData |
systemData
The current resource data object |
Constructor Summary | |
ConfigXmlHandler(URL configUrl)
Construction |
Method Summary | |
protected FeatureMap |
attributeListToParameterList()
Utility method to convert the current SAX attribute list to a FeatureMap |
private String |
attributes2String(org.xml.sax.Attributes atts)
A verbose method for Attributes |
void |
characters(char[] text,
int start,
int length)
Called when the SAX parser encounts text (PCDATA) in the XML doc |
private void |
checkStack(String methodName,
String elementName)
Utility function to throw exceptions on stack errors. |
protected void |
createResource(String resourceTypeName,
List resourceList)
Utility method to create a resource and add to appropriate list. |
void |
endDocument()
Called when the SAX parser encounts the end of the XML document |
void |
endElement(String uri,
String qName,
String elementName)
Called when the SAX parser encounts the end of an XML element. |
void |
error(org.xml.sax.SAXParseException ex)
Called for parse errors. |
void |
fatalError(org.xml.sax.SAXParseException ex)
Called for fatal errors. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Called when the SAX parser encounts white space |
void |
startDocument()
Called when the SAX parser encounts the beginning of the XML document |
void |
startElement(String uri,
String qName,
String elementName,
org.xml.sax.Attributes atts)
Called when the SAX parser encounts the beginning of an XML element |
void |
warning(org.xml.sax.SAXParseException ex)
Called for warnings. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Stack contentStack
private SystemData systemData
private org.xml.sax.Attributes currentAttributes
private FeatureMap currentAttributeMap
private static final boolean DEBUG
private URL sourceUrl
private SimpleErrorHandler _seh
private CreoleRegister register
Constructor Detail |
public ConfigXmlHandler(URL configUrl)
Method Detail |
public void startDocument() throws GateSaxException
startDocument
in class org.xml.sax.helpers.DefaultHandler
public void endDocument() throws GateSaxException
endDocument
in class org.xml.sax.helpers.DefaultHandler
private String attributes2String(org.xml.sax.Attributes atts)
public void startElement(String uri, String qName, String elementName, org.xml.sax.Attributes atts)
startElement
in class org.xml.sax.helpers.DefaultHandler
private void checkStack(String methodName, String elementName) throws GateSaxException
public void endElement(String uri, String qName, String elementName) throws GateSaxException
endElement
in class org.xml.sax.helpers.DefaultHandler
public void characters(char[] text, int start, int length) throws org.xml.sax.SAXException
characters
in class org.xml.sax.helpers.DefaultHandler
protected void createResource(String resourceTypeName, List resourceList) throws GateSaxException
protected FeatureMap attributeListToParameterList()
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in class org.xml.sax.helpers.DefaultHandler
public void error(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
error
in class org.xml.sax.helpers.DefaultHandler
public void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
fatalError
in class org.xml.sax.helpers.DefaultHandler
public void warning(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
warning
in class org.xml.sax.helpers.DefaultHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |