View Javadoc
1   /**
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v1.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  package ch.qos.logback.core.joran.event;
15  
16  import org.xml.sax.Locator;
17  import org.xml.sax.helpers.LocatorImpl;
18  
19  public class SaxEvent {
20  
21      final public String namespaceURI;
22      final public String localName;
23      final public String qName;
24      final public Locator locator;
25  
26      SaxEvent(String namespaceURI, String localName, String qName, Locator locator) {
27          this.namespaceURI = namespaceURI;
28          this.localName = localName;
29          this.qName = qName;
30          // locator impl is used to take a snapshot!
31          this.locator = new LocatorImpl(locator);
32      }
33  
34      public String getLocalName() {
35          return localName;
36      }
37  
38      public Locator getLocator() {
39          return locator;
40      }
41  
42      public String getNamespaceURI() {
43          return namespaceURI;
44      }
45  
46      public String getQName() {
47          return qName;
48      }
49  }