001/** 002 * Logback: the reliable, generic, fast and flexible logging framework. 003 * Copyright (C) 1999-2015, QOS.ch. All rights reserved. 004 * 005 * This program and the accompanying materials are dual-licensed under 006 * either the terms of the Eclipse Public License v1.0 as published by 007 * the Eclipse Foundation 008 * 009 * or (per the licensee's choosing) 010 * 011 * under the terms of the GNU Lesser General Public License version 2.1 012 * as published by the Free Software Foundation. 013 */ 014package ch.qos.logback.core.joran.event; 015 016import org.xml.sax.Locator; 017import org.xml.sax.helpers.LocatorImpl; 018 019public class SaxEvent { 020 021 final public String namespaceURI; 022 final public String localName; 023 final public String qName; 024 final public Locator locator; 025 026 SaxEvent(String namespaceURI, String localName, String qName, Locator locator) { 027 this.namespaceURI = namespaceURI; 028 this.localName = localName; 029 this.qName = qName; 030 // locator impl is used to take a snapshot! 031 this.locator = new LocatorImpl(locator); 032 } 033 034 public String getLocalName() { 035 return localName; 036 } 037 038 public Locator getLocator() { 039 return locator; 040 } 041 042 public String getNamespaceURI() { 043 return namespaceURI; 044 } 045 046 public String getQName() { 047 return qName; 048 } 049}