Wed, 27 Apr 2016 01:27:09 +0800
Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/jaxws/
changeset: 657:d47a47f961ee
tag: jdk8u25-b17
1 /*
2 * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 *
25 * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
26 */
28 package com.sun.xml.internal.fastinfoset.stax.events;
30 import javax.xml.stream.events.EntityDeclaration;
33 public class EntityDeclarationImpl extends EventBase implements EntityDeclaration {
34 private String _publicId;
35 private String _systemId;
36 private String _baseURI;
37 private String _entityName;
38 private String _replacement;
39 private String _notationName;
41 /** Creates a new instance of EntityDeclarationImpl */
42 public EntityDeclarationImpl() {
43 init();
44 }
46 public EntityDeclarationImpl(String entityName , String replacement){
47 init();
48 _entityName = entityName;
49 _replacement = replacement;
50 }
52 /**
53 * The entity's public identifier, or null if none was given
54 * @return the public ID for this declaration or null
55 */
56 public String getPublicId(){
57 return _publicId;
58 }
60 /**
61 * The entity's system identifier.
62 * @return the system ID for this declaration or null
63 */
64 public String getSystemId(){
65 return _systemId;
66 }
68 /**
69 * The entity's name
70 * @return the name, may not be null
71 */
72 public String getName(){
73 return _entityName;
74 }
76 /**
77 * The name of the associated notation.
78 * @return the notation name
79 */
80 public String getNotationName() {
81 return _notationName;
82 }
84 /**
85 * The replacement text of the entity.
86 * This method will only return non-null
87 * if this is an internal entity.
88 * @return null or the replacment text
89 */
90 public String getReplacementText() {
91 return _replacement;
92 }
94 /**
95 * Get the base URI for this reference
96 * or null if this information is not available
97 * @return the base URI or null
98 */
99 public String getBaseURI() {
100 return _baseURI;
101 }
103 public void setPublicId(String publicId) {
104 _publicId = publicId;
105 }
107 public void setSystemId(String systemId) {
108 _systemId = systemId;
109 }
111 public void setBaseURI(String baseURI) {
112 _baseURI = baseURI;
113 }
115 public void setName(String entityName){
116 _entityName = entityName;
117 }
119 public void setReplacementText(String replacement){
120 _replacement = replacement;
121 }
123 public void setNotationName(String notationName){
124 _notationName = notationName;
125 }
127 protected void init(){
128 setEventType(ENTITY_DECLARATION);
129 }
130 }