01: /*
02: * $Id: NotationDeclarationImpl.java,v 1.2 2006/04/01 06:01:35 jeffsuttor Exp $
03: */
04:
05: /*
06: * The contents of this file are subject to the terms
07: * of the Common Development and Distribution License
08: * (the License). You may not use this file except in
09: * compliance with the License.
10: *
11: * You can obtain a copy of the license at
12: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
13: * See the License for the specific language governing
14: * permissions and limitations under the License.
15: *
16: * When distributing Covered Code, include this CDDL
17: * Header Notice in each file and include the License file
18: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
19: * If applicable, add the following below the CDDL Header,
20: * with the fields enclosed by brackets [] replaced by
21: * you own identifying information:
22: * "Portions Copyrighted [year] [name of copyright owner]"
23: *
24: * [Name of File] [ver.__] [Date]
25: *
26: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
27: */
28:
29: package com.sun.xml.stream.events;
30:
31: import javax.xml.stream.events.NotationDeclaration;
32: import javax.xml.stream.events.XMLEvent;
33: import com.sun.xml.stream.dtd.nonvalidating.XMLNotationDecl;
34:
35: /**
36: * Implementation of NotationDeclaration event.
37: *
38: * @author k.venugopal@sun.com
39: */
40: public class NotationDeclarationImpl extends DummyEvent implements
41: NotationDeclaration {
42:
43: String fName = null;
44: String fPublicId = null;
45: String fSystemId = null;
46:
47: /** Creates a new instance of NotationDeclarationImpl */
48: public NotationDeclarationImpl() {
49: setEventType(XMLEvent.NOTATION_DECLARATION);
50: }
51:
52: public NotationDeclarationImpl(String name, String publicId,
53: String systemId) {
54: this .fName = name;
55: this .fPublicId = publicId;
56: this .fSystemId = systemId;
57: setEventType(XMLEvent.NOTATION_DECLARATION);
58: }
59:
60: public NotationDeclarationImpl(XMLNotationDecl notation) {
61: this .fName = notation.name;
62: this .fPublicId = notation.publicId;
63: this .fSystemId = notation.systemId;
64: setEventType(XMLEvent.NOTATION_DECLARATION);
65: }
66:
67: public String getName() {
68: return fName;
69: }
70:
71: public String getPublicId() {
72: return fPublicId;
73: }
74:
75: public String getSystemId() {
76: return fSystemId;
77: }
78:
79: void setPublicId(String publicId) {
80: this .fPublicId = publicId;
81: }
82:
83: void setSystemId(String systemId) {
84: this .fSystemId = systemId;
85: }
86:
87: void setName(String name) {
88: this.fName = name;
89: }
90: }
|