|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
EntityImpl.java | - | 0% | 0% | 0% |
|
1 | /* | |
2 | * Licensed to the Apache Software Foundation (ASF) under one or more | |
3 | * contributor license agreements. See the NOTICE file distributed with | |
4 | * this work for additional information regarding copyright ownership. | |
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 | |
6 | * (the "License"); you may not use this file except in compliance with | |
7 | * the License. You may obtain a copy of the License at | |
8 | * | |
9 | * http://www.apache.org/licenses/LICENSE-2.0 | |
10 | * | |
11 | * Unless required by applicable law or agreed to in writing, software | |
12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 | * See the License for the specific language governing permissions and | |
15 | * limitations under the License. | |
16 | * | |
17 | * $Id: EntityImpl.java 571948 2007-09-02 10:51:37Z vgritsenko $ | |
18 | */ | |
19 | ||
20 | package org.apache.xindice.xml.dom; | |
21 | ||
22 | import org.w3c.dom.Entity; | |
23 | import org.w3c.dom.Node; | |
24 | ||
25 | /** | |
26 | * EntityImpl | |
27 | * | |
28 | * @version $Revision: 571948 $, $Date: 2007-09-02 03:51:37 -0700 (Sun, 02 Sep 2007) $ | |
29 | */ | |
30 | public final class EntityImpl extends NodeImpl implements Entity { | |
31 | ||
32 | private String encoding; | |
33 | private String inputEncoding; | |
34 | private String version; | |
35 | ||
36 | ||
37 | 0 | public EntityImpl() { |
38 | } | |
39 | ||
40 | 0 | public EntityImpl(NodeImpl parent, byte[] data, int pos, int len) { |
41 | 0 | super(parent, data, pos, len); |
42 | } | |
43 | ||
44 | 0 | public EntityImpl(NodeImpl parent, boolean dirty) { |
45 | 0 | super(parent, dirty); |
46 | } | |
47 | ||
48 | 0 | public short getNodeType() { |
49 | 0 | return Node.ENTITY_NODE; |
50 | } | |
51 | ||
52 | /** | |
53 | * The public identifier associated with the entity, if specified. If the | |
54 | * public identifier was not specified, this is <code>null</code>. | |
55 | */ | |
56 | 0 | public String getPublicId() { |
57 | 0 | return null; |
58 | } | |
59 | ||
60 | /** | |
61 | * The system identifier associated with the entity, if specified. If the | |
62 | * system identifier was not specified, this is <code>null</code>. | |
63 | */ | |
64 | 0 | public String getSystemId() { |
65 | 0 | return null; |
66 | } | |
67 | ||
68 | /** | |
69 | * For unparsed entities, the name of the notation for the entity. For | |
70 | * parsed entities, this is <code>null</code>. | |
71 | */ | |
72 | 0 | public String getNotationName() { |
73 | 0 | return null; |
74 | } | |
75 | ||
76 | 0 | public String getInputEncoding() { |
77 | 0 | checkLoaded(); |
78 | 0 | return inputEncoding; |
79 | } | |
80 | ||
81 | 0 | public String getXmlEncoding() { |
82 | 0 | checkLoaded(); |
83 | 0 | return encoding; |
84 | } | |
85 | ||
86 | // DOM Level 3 Stuff | |
87 | 0 | public String getXmlVersion() { |
88 | 0 | checkLoaded(); |
89 | 0 | return version; |
90 | } | |
91 | ||
92 | // Setters | |
93 | 0 | public void setEncoding(String encoding) { |
94 | 0 | checkReadOnly(); |
95 | 0 | checkLoaded(); |
96 | 0 | this.encoding = encoding; |
97 | } | |
98 | ||
99 | 0 | public void setInputEncoding(String inputEncoding) { |
100 | 0 | checkReadOnly(); |
101 | 0 | checkLoaded(); |
102 | 0 | this.inputEncoding = inputEncoding; |
103 | } | |
104 | ||
105 | 0 | public void setXmlVersion(String version) { |
106 | 0 | checkReadOnly(); |
107 | 0 | checkLoaded(); |
108 | 0 | this.version = version; |
109 | } | |
110 | } |
|