|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.HandlerBase | +--gate.creole.CreoleXmlHandler
This is a SAX handler for processing creole.xml
files.
It would have been better to write it using DOM or JDOM but....
Resource data objects are created and added to the CREOLE register.
URLs for resource JAR files are added to the GATE class loader.
Field Summary | |
private Stack |
contentStack
A stack to stuff PCDATA onto for reading back at element ends. |
private org.xml.sax.AttributeList |
currentAttributes
The current element's attribute list |
private Parameter |
currentParam
The current parameter |
private List |
currentParamDisjunction
The current parameter disjunction |
private ParameterList |
currentParamList
The current parameter list |
private static boolean |
DEBUG
Debug flag |
private CreoleRegister |
register
The register object that we add ResourceData objects to during parsing. |
private ResourceData |
resourceData
The current resource data object |
private URL |
sourceUrl
The source URL of the directory file being parsed. |
private FeatureMap |
viewFeatures
The features (attributes) of VIEW elements |
Constructor Summary | |
CreoleXmlHandler(CreoleRegister register,
URL directoryUrl)
Construction |
Method Summary | |
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. |
void |
endDocument()
Called when the SAX parser encounts the end of the XML document |
void |
endElement(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 elementName,
org.xml.sax.AttributeList 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.HandlerBase |
notationDecl, processingInstruction, resolveEntity, setDocumentLocator, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Stack contentStack
private ResourceData resourceData
private ParameterList currentParamList
private List currentParamDisjunction
private Parameter currentParam
private org.xml.sax.AttributeList currentAttributes
private static final boolean DEBUG
private URL sourceUrl
private FeatureMap viewFeatures
private CreoleRegister register
Constructor Detail |
public CreoleXmlHandler(CreoleRegister register, URL directoryUrl)
Method Detail |
public void startDocument() throws GateSaxException
startDocument
in class org.xml.sax.HandlerBase
public void endDocument() throws GateSaxException
endDocument
in class org.xml.sax.HandlerBase
public void startElement(String elementName, org.xml.sax.AttributeList atts)
startElement
in class org.xml.sax.HandlerBase
private void checkStack(String methodName, String elementName) throws GateSaxException
public void endElement(String elementName) throws GateSaxException
endElement
in class org.xml.sax.HandlerBase
public void characters(char[] text, int start, int length) throws org.xml.sax.SAXException
characters
in class org.xml.sax.HandlerBase
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in class org.xml.sax.HandlerBase
public void error(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
error
in class org.xml.sax.HandlerBase
public void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
fatalError
in class org.xml.sax.HandlerBase
public void warning(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
warning
in class org.xml.sax.HandlerBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |