01: package org.conform.mdl;
02:
03: import org.xml.sax.*;
04:
05: import java.beans.ExceptionListener;
06:
07: /**
08: * Created by IntelliJ IDEA.
09: * User: nina
10: * Date: 24.08.2003
11: * Time: 11:16:04
12: * To change this template use Options | File Templates.
13: */
14: public class ScopeHandler extends HandlerBase {
15: protected Object scope;
16: protected ExceptionListener exceptionListener;
17: protected Locator locator;
18: private HandlerFactory handlerFactory;
19:
20: public ScopeHandler(ExceptionListener exceptionListener) {
21: this .exceptionListener = exceptionListener;
22: }
23:
24: public void setDocumentLocator(Locator locator) {
25: this .locator = locator;
26: }
27:
28: public Object getScope() {
29: return scope;
30: }
31:
32: public void setScope(Object scope) {
33: this .scope = scope;
34: }
35:
36: protected ScopeHandler getHandler(String name) {
37: if (handlerFactory == null)
38: handlerFactory = DefaultHandlerFactory.getInstance();
39:
40: return handlerFactory.getHandler(name);
41: }
42: }
|