author | mkos |
Sun, 30 Dec 2012 00:00:00 +0100 | |
changeset 22678 | ac1ea46be942 |
parent 12009 | 4abb694f273a |
permissions | -rw-r--r-- |
12009 | 1 |
/* |
22678
ac1ea46be942
8029237: Update copyright year to match last edit in jaxws repository for 2012
mkos
parents:
12009
diff
changeset
|
2 |
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. |
12009 | 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 |
*/ |
|
27 |
||
28 |
package com.sun.xml.internal.fastinfoset.stax.events; |
|
29 |
||
30 |
import javax.xml.stream.events.EntityDeclaration; |
|
31 |
||
32 |
||
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; |
|
40 |
||
41 |
/** Creates a new instance of EntityDeclarationImpl */ |
|
42 |
public EntityDeclarationImpl() { |
|
43 |
init(); |
|
44 |
} |
|
45 |
||
46 |
public EntityDeclarationImpl(String entityName , String replacement){ |
|
47 |
init(); |
|
48 |
_entityName = entityName; |
|
49 |
_replacement = replacement; |
|
50 |
} |
|
51 |
||
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 |
} |
|
59 |
||
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 |
} |
|
67 |
||
68 |
/** |
|
69 |
* The entity's name |
|
70 |
* @return the name, may not be null |
|
71 |
*/ |
|
72 |
public String getName(){ |
|
73 |
return _entityName; |
|
74 |
} |
|
75 |
||
76 |
/** |
|
77 |
* The name of the associated notation. |
|
78 |
* @return the notation name |
|
79 |
*/ |
|
80 |
public String getNotationName() { |
|
81 |
return _notationName; |
|
82 |
} |
|
83 |
||
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 |
} |
|
93 |
||
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 |
} |
|
102 |
||
103 |
public void setPublicId(String publicId) { |
|
104 |
_publicId = publicId; |
|
105 |
} |
|
106 |
||
107 |
public void setSystemId(String systemId) { |
|
108 |
_systemId = systemId; |
|
109 |
} |
|
110 |
||
111 |
public void setBaseURI(String baseURI) { |
|
112 |
_baseURI = baseURI; |
|
113 |
} |
|
114 |
||
115 |
public void setName(String entityName){ |
|
116 |
_entityName = entityName; |
|
117 |
} |
|
118 |
||
119 |
public void setReplacementText(String replacement){ |
|
120 |
_replacement = replacement; |
|
121 |
} |
|
122 |
||
123 |
public void setNotationName(String notationName){ |
|
124 |
_notationName = notationName; |
|
125 |
} |
|
126 |
||
127 |
protected void init(){ |
|
128 |
setEventType(ENTITY_DECLARATION); |
|
129 |
} |
|
130 |
} |