View Javadoc

1   /**
2    * Logback: the generic, reliable, fast and flexible logging framework for Java.
3    * 
4    * Copyright (C) 2000-2006, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  package ch.qos.logback.core.joran.event;
11  
12  import org.xml.sax.Locator;
13  import org.xml.sax.helpers.LocatorImpl;
14  
15  public class SaxEvent {
16  
17    final public String namespaceURI;
18    final public String localName;
19    final public String qName;
20    final public Locator locator;
21  
22    SaxEvent(String namespaceURI, String localName, String qName, Locator locator) {
23      this.namespaceURI = namespaceURI;
24      this.localName = localName;
25      this.qName = qName;
26      // locator impl is used to take a snapshot!
27      this.locator = new LocatorImpl(locator);
28    }
29  
30    public String getLocalName() {
31      return localName;
32    }
33  
34    public Locator getLocator() {
35      return locator;
36    }
37  
38    public String getNamespaceURI() {
39      return namespaceURI;
40    }
41  
42    public String getQName() {
43      return qName;
44    }
45  }