home *** CD-ROM | disk | FTP | other *** search
- package com.extensibility.saf.sax;
-
- import com.extensibility.saf.Association;
- import com.extensibility.saf.SchemaAdjunct;
- import org.xml.sax.AttributeList;
- import org.xml.sax.DocumentHandler;
- import org.xml.sax.Locator;
- import org.xml.sax.SAXException;
-
- public class AssociatedDocumentHandler implements DocumentHandler {
- private SchemaAdjunct associations;
- private DocumentHandler sourceHandler;
- private String currentPath;
-
- public AssociatedDocumentHandler(SchemaAdjunct var1, DocumentHandler var2) {
- this.sourceHandler = var2;
- this.associations = var1;
- this.currentPath = "";
- }
-
- protected SchemaAdjunct getSchemaAdjunct() {
- return this.associations;
- }
-
- protected String getCurrentPath() {
- return this.currentPath;
- }
-
- protected DocumentHandler getSourceHandler() {
- return this.sourceHandler;
- }
-
- public void setDocumentLocator(Locator var1) {
- this.sourceHandler.setDocumentLocator(var1);
- }
-
- public void startDocument() throws SAXException {
- this.sourceHandler.startDocument();
- }
-
- public void endDocument() throws SAXException {
- this.sourceHandler.endDocument();
- }
-
- public void startAssociatedElement(String var1, AttributeList var2, Association[] var3) throws SAXException {
- this.sourceHandler.startElement(var1, var2);
- }
-
- public void startElement(String var1, AttributeList var2) throws SAXException {
- this.currentPath = String.valueOf(String.valueOf(this.currentPath).concat(String.valueOf("/"))).concat(String.valueOf(var1));
- SchemaAdjunct var3 = this.getSchemaAdjunct();
- Association[] var4 = var3.getAssociations(this.currentPath);
- this.startAssociatedElement(var1, var2, var4);
- }
-
- public void endElement(String var1) throws SAXException {
- this.sourceHandler.endElement(var1);
- this.currentPath = this.currentPath.substring(0, this.currentPath.lastIndexOf("/"));
- }
-
- public void characters(char[] var1, int var2, int var3) throws SAXException {
- this.sourceHandler.characters(var1, var2, var3);
- }
-
- public void ignorableWhitespace(char[] var1, int var2, int var3) throws SAXException {
- this.sourceHandler.ignorableWhitespace(var1, var2, var3);
- }
-
- public void processingInstruction(String var1, String var2) throws SAXException {
- this.sourceHandler.processingInstruction(var1, var2);
- }
- }
-