001: /*
002: * $Id: NotationDeclarationEvent.java,v 1.2 2004/07/15 02:11:02 cniles Exp $
003: *
004: * Copyright (c) 2004, Christian Niles, unit12.net
005: * All rights reserved.
006: *
007: * Redistribution and use in source and binary forms, with or without
008: * modification, are permitted provided that the following conditions are met:
009: *
010: * * Redistributions of source code must retain the above copyright
011: * notice, this list of conditions and the following disclaimer.
012: *
013: * * Redistributions in binary form must reproduce the above copyright
014: * notice, this list of conditions and the following disclaimer in the
015: * documentation and/or other materials provided with the distribution.
016: *
017: * * Neither the name of Christian Niles, Unit12, nor the names of its
018: * contributors may be used to endorse or promote products derived from
019: * this software without specific prior written permission.
020: *
021: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
022: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
023: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
024: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
025: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
026: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
027: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
028: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
029: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
030: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
031: * POSSIBILITY OF SUCH DAMAGE.
032: *
033: */
034: package javanet.staxutils.events;
035:
036: import javax.xml.stream.Location;
037: import javax.xml.stream.events.NotationDeclaration;
038:
039: /**
040: * {@link NotationDeclaration} implementation.
041: *
042: * @author Christian Niles
043: * @version $Revision: 1.2 $
044: */
045: public class NotationDeclarationEvent extends AbstractXMLEvent
046: implements NotationDeclaration {
047:
048: /** The notation name. */
049: protected String name;
050:
051: /** The public id of the notation */
052: protected String publicId;
053:
054: /** The system id of the notation */
055: protected String systemId;
056:
057: public NotationDeclarationEvent(String name, String publicId,
058: Location location) {
059:
060: super (location);
061: this .name = name;
062: this .publicId = publicId;
063:
064: }
065:
066: public NotationDeclarationEvent(String name, String publicId,
067: String systemId, Location location) {
068:
069: super (location);
070: this .name = name;
071: this .publicId = publicId;
072: this .systemId = systemId;
073:
074: }
075:
076: public NotationDeclarationEvent(NotationDeclaration that) {
077:
078: super (that);
079: this .name = that.getName();
080: this .publicId = that.getPublicId();
081: this .systemId = that.getSystemId();
082:
083: }
084:
085: /**
086: * Returns {@link #NOTATION_DECLARATION}.
087: */
088: public int getEventType() {
089:
090: return NOTATION_DECLARATION;
091:
092: }
093:
094: public String getName() {
095:
096: return this .name;
097:
098: }
099:
100: public String getPublicId() {
101:
102: return this .publicId;
103:
104: }
105:
106: public String getSystemId() {
107:
108: return this.systemId;
109:
110: }
111:
112: }
|