Project

Profile

Help

Revision c74fd4aa

Added by Michael Kay 10 months ago

Refactoring to add @Override annotations throughout

View differences:

latest10/hej/javax/xml/xquery/XQItemType.java
400 400
     *
401 401
     * @return int      indicating the occurrence indicator
402 402
     */
403
    @Override
403 404
    public int getItemOccurrence();
404 405

  
405 406
    /**
latest10/hej/net/sf/saxon/Configuration.java
3282 3282
     * @since 9.3
3283 3283
     */
3284 3284

  
3285
    @Override
3285 3286
    public boolean isDeclaredNotation(String uri, String local) {
3286 3287
        return false;
3287 3288
    }
......
4067 4068
     */
4068 4069

  
4069 4070
    /*@Nullable*/
4071
    @Override
4070 4072
    public Source resolveSource(Source source, Configuration config) throws XPathException {
4071 4073
        if (source instanceof AugmentedSource) {
4072 4074
            return source;
latest10/hej/net/sf/saxon/dom/AttrOverNodeInfo.java
26 26
     * Get the name of an attribute node (the lexical QName) (DOM method)
27 27
     */
28 28

  
29
    @Override
29 30
    public String getName() {
30 31
        if (node.getNodeKind() == Type.NAMESPACE) {
31 32
            String local = node.getLocalPart();
......
44 45
     * @return the attribute value
45 46
     */
46 47

  
48
    @Override
47 49
    public String getValue() {
48 50
        return node.getStringValue();
49 51
    }
......
54 56
     * @return <code>true</code>: a DOM Attribute has a text node as a child.
55 57
     */
56 58

  
59
    @Override
57 60
    public boolean hasChildNodes() {
58 61
        return true;
59 62
    }
......
65 68
     *         node as its child.
66 69
     */
67 70

  
71
    @Override
68 72
    public Node getFirstChild() {
69 73
        return new TextOverAttrInfo(this);
70 74
    }
......
75 79
     * @return last child of this node, or null if it has no children
76 80
     */
77 81

  
82
    @Override
78 83
    public Node getLastChild() {
79 84
        return getFirstChild();
80 85
    }
......
85 90
     * nodes.
86 91
     */
87 92

  
93
    @Override
88 94
    public NodeList getChildNodes() {
89 95
        List<Node> list = new ArrayList<>(1);
90 96
        list.add(getFirstChild());
......
99 105
     * @return Always true in this implementation.
100 106
     */
101 107

  
108
    @Override
102 109
    public boolean getSpecified() {
103 110
        return true;
104 111
    }
......
109 116
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
110 117
     */
111 118

  
119
    @Override
112 120
    public void setValue(String value) throws DOMException {
113 121
        disallowUpdate();
114 122
    }
......
118 126
     * in DOM Level 3.
119 127
     */
120 128

  
129
    @Override
121 130
    public boolean isId() {
122 131
        return node.isId();
123 132
    }
......
130 139
     * @since DOM Level 2
131 140
     */
132 141

  
142
    @Override
133 143
    public Element getOwnerElement() {
134 144
        if (node.getNodeKind() == Type.ATTRIBUTE || node.getNodeKind() == Type.NAMESPACE) {
135 145
            return (Element) wrap(node.getParent());
......
144 154
     */
145 155

  
146 156
    /*@Nullable*/
157
    @Override
147 158
    public TypeInfo getSchemaTypeInfo() {
148 159
        SchemaType type = node.getSchemaType();
149 160
        if (type == null || BuiltInAtomicType.UNTYPED_ATOMIC.equals(type)) {
latest10/hej/net/sf/saxon/dom/DOMAttributeMap.java
63 63
     * Get named attribute (DOM NamedNodeMap method)
64 64
     */
65 65

  
66
    @Override
66 67
    public Node getNamedItem(String name) {
67 68
        if (name.equals("xmlns")) {
68 69
            NamespaceBinding[] nsarray = getNamespaceBindings();
......
101 102
     * p+1..n "real" attribute declarations
102 103
     */
103 104

  
105
    @Override
104 106
    public Node item(int index) {
105 107
        if (index < 0) {
106 108
            return null;
......
162 164
     * Get number of attributes and namespaces (DOM NamedNodeMap method).
163 165
     */
164 166

  
167
    @Override
165 168
    public int getLength() {
166 169
        int length = 0;
167 170
        AxisIterator atts = element.iterateAxis(AxisInfo.ATTRIBUTE);
......
175 178
     * Get named attribute (DOM NamedNodeMap method)
176 179
     */
177 180

  
181
    @Override
178 182
    public Node getNamedItemNS(String uri, String localName) {
179 183
        if (uri == null) {
180 184
            uri = "";
......
202 206
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
203 207
     */
204 208

  
209
    @Override
205 210
    public Node setNamedItem(Node arg) throws DOMException {
206 211
        NodeOverNodeInfo.disallowUpdate();
207 212
        return null;
......
212 217
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
213 218
     */
214 219

  
220
    @Override
215 221
    public Node removeNamedItem(String name) throws DOMException {
216 222
        NodeOverNodeInfo.disallowUpdate();
217 223
        return null;
......
222 228
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
223 229
     */
224 230

  
231
    @Override
225 232
    public Node setNamedItemNS(Node arg) throws DOMException {
226 233
        NodeOverNodeInfo.disallowUpdate();
227 234
        return null;
......
233 240
     */
234 241

  
235 242
    /*@Nullable*/
243
    @Override
236 244
    public Node removeNamedItemNS(String uri, String localName) throws DOMException {
237 245
        NodeOverNodeInfo.disallowUpdate();
238 246
        return null;
latest10/hej/net/sf/saxon/dom/DOMEnvelope.java
62 62
     * @return by convention (but not necessarily) the class that implements a document node in the relevant
63 63
     * external model
64 64
     */
65
    @Override
65 66
    public String getDocumentClassName() {
66 67
        return "org.w3c.dom.Document";
67 68
    }
......
71 72
     * an XPath implementation
72 73
     */
73 74

  
75
    @Override
74 76
    public String getIdentifyingURI() {
75 77
        return XPathConstants.DOM_OBJECT_MODEL;
76 78
    }
77 79

  
80
    @Override
78 81
    public PJConverter getPJConverter(Class<?> targetClass) {
79 82
        if (NodeOverNodeInfo.class.isAssignableFrom(targetClass)) {
80 83
            return new PJConverter() {
84
                @Override
81 85
                public Object convert(Sequence value, Class<?> targetClass, XPathContext context) throws XPathException {
82 86
                    return DOMObjectModel.convertXPathValueToObject(value, targetClass);
83 87
                }
84 88
            };
85 89
        } else if (NodeList.class.isAssignableFrom(targetClass)) {
86 90
            return new PJConverter() {
91
                @Override
87 92
                public Object convert(Sequence value, Class<?> targetClass, XPathContext context) throws XPathException {
88 93
                    return DOMObjectModel.convertXPathValueToObject(value, targetClass);
89 94
                }
......
93 98
        }
94 99
    }
95 100

  
101
    @Override
96 102
    public JPConverter getJPConverter(Class sourceClass, Configuration config) {
97 103
        if (NodeOverNodeInfo.class.isAssignableFrom(sourceClass)) {
98 104
            return new JPConverter() {
99 105
                /*@Nullable*/
106
                @Override
100 107
                public Sequence convert(Object object, XPathContext context) {
101 108
                    return convertObjectToXPathValue(object);
102 109
                }
103 110

  
111
                @Override
104 112
                public ItemType getItemType() {
105 113
                    return AnyNodeTest.getInstance();
106 114
                }
......
120 128
     *         returns a collection of nodes in this object model
121 129
     */
122 130

  
131
    @Override
123 132
    public PJConverter getNodeListCreator(Object node) {
124 133
        //return getPJConverter(NodeList.class);
125 134
        return null;
......
157 166
     * @return always null in this implementation
158 167
     */
159 168

  
169
    @Override
160 170
    public Receiver getDocumentBuilder(Result result) {
161 171
        return null;
162 172
    }
......
169 179
     * a "NodeOverNodeInfo".</p>
170 180
     */
171 181

  
182
    @Override
172 183
    public boolean sendSource(Source source, Receiver receiver) throws XPathException {
173 184
        if (source instanceof DOMSource) {
174 185
            Node startNode = ((DOMSource) source).getNode();
......
186 197
     * source does not belong to this object model, return null
187 198
     */
188 199

  
200
    @Override
189 201
    public NodeInfo unravel(Source source, Configuration config) {
190 202

  
191 203
        if (source instanceof DOMSource) {
latest10/hej/net/sf/saxon/dom/DOMImplementationImpl.java
30 30
     *         "", "3.0", "2.0", or "1.0".
31 31
     */
32 32

  
33
    @Override
33 34
    public boolean hasFeature(String feature, String version) {
34 35
        return (feature.equalsIgnoreCase("XML") || feature.equalsIgnoreCase("Core")) &&
35 36
                (version == null || version.isEmpty() ||
......
47 48
     * @since DOM Level 3
48 49
     */
49 50

  
51
    @Override
50 52
    public Object getFeature(String feature,
51 53
                             String version) {
52 54
        return null;
......
69 71
     * @since DOM Level 2
70 72
     */
71 73

  
74
    @Override
72 75
    public DocumentType createDocumentType(String qualifiedName,
73 76
                                           String publicId,
74 77
                                           String systemId)
......
91 94
     * @since DOM Level 2
92 95
     */
93 96
/*@Nullable*/
97
    @Override
94 98
    public Document createDocument(String namespaceURI,
95 99
                                   String qualifiedName,
96 100
                                   DocumentType doctype)
latest10/hej/net/sf/saxon/dom/DOMNodeList.java
32 32
     * return the number of nodes in the list (DOM method)
33 33
     */
34 34

  
35
    @Override
35 36
    public int getLength() {
36 37
        return sequence.size();
37 38
    }
......
43 44
     */
44 45

  
45 46
    /*@Nullable*/
47
    @Override
46 48
    public Node item(int index) {
47 49
        if (index < 0 || index >= sequence.size()) {
48 50
            return null;
latest10/hej/net/sf/saxon/dom/DOMNodeWrapper.java
148 148
        return wrapper;
149 149
    }
150 150

  
151
    @Override
151 152
    public DocumentWrapper getTreeInfo() {
152 153
        return (DocumentWrapper)treeInfo;
153 154
    }
......
156 157
     * Get the underlying DOM node, to implement the VirtualNode interface
157 158
     */
158 159

  
160
    @Override
159 161
    public Node getUnderlyingNode() {
160 162
        return node;
161 163
    }
......
166 168
     * @return one of the values Node.ELEMENT, Node.TEXT, Node.ATTRIBUTE, etc.
167 169
     */
168 170

  
171
    @Override
169 172
    public int getNodeKind() {
170 173
        return nodeKind;
171 174
    }
......
209 212
     *         return true, and the two nodes will produce the same result for generateId())
210 213
     */
211 214

  
215
    @Override
212 216
    public int compareOrder(NodeInfo other) {
213 217
        // Use the DOM Level-3 compareDocumentPosition() method
214 218
        if (other instanceof DOMNodeWrapper && docWrapper.domLevel3) {
......
246 250
     * the version of the method that returns a String.
247 251
     */
248 252

  
253
    @Override
249 254
    public CharSequence getStringValueCS() {
250 255
        synchronized (docWrapper.docNode) {
251 256
            switch (nodeKind) {
......
320 325
     * @return the local part of the name. For an unnamed node, returns "".
321 326
     */
322 327

  
328
    @Override
323 329
    public String getLocalPart() {
324 330
        synchronized (docWrapper.docNode) {
325 331
            switch (getNodeKind()) {
......
365 371
     *         string.
366 372
     */
367 373

  
374
    @Override
368 375
    public String getURI() {
369 376
        synchronized (docWrapper.docNode) {
370 377
            if (nodeKind == Type.ELEMENT) {
......
461 468
     * @return The prefix of the name of the node.
462 469
     */
463 470

  
471
    @Override
464 472
    public String getPrefix() {
465 473
        synchronized (docWrapper.docNode) {
466 474
            int kind = getNodeKind();
......
485 493
     *         For a node with no name, return an empty string.
486 494
     */
487 495

  
496
    @Override
488 497
    public String getDisplayName() {
489 498
        switch (nodeKind) {
490 499
            case Type.ELEMENT:
......
503 512
     * Get the NodeInfo object representing the parent of this node
504 513
     */
505 514

  
515
    @Override
506 516
    public DOMNodeWrapper getParent() {
507 517
        if (parent == null) {
508 518
            synchronized (docWrapper.docNode) {
......
535 545
     * parent element, when they are listed in document order.</p>
536 546
     */
537 547

  
548
    @Override
538 549
    public int getSiblingPosition() {
539 550
        if (index == -1) {
540 551
            synchronized (docWrapper.docNode) {
......
635 646
     *         if this node is not an element.
636 647
     * @since 9.4
637 648
     */
649
    @Override
638 650
    public String getAttributeValue(/*@NotNull*/ String uri, /*@NotNull*/ String local) {
639 651
        NameTest test = new NameTest(Type.ATTRIBUTE, uri, local, getNamePool());
640 652
        AxisIterator iterator = iterateAxis(AxisInfo.ATTRIBUTE, test);
......
652 664
     * @return the NodeInfo representing the containing document
653 665
     */
654 666

  
667
    @Override
655 668
    public NodeInfo getRoot() {
656 669
        return docWrapper.getRootNode();
657 670
    }
......
662 675
     * <code>getEnumeration(Axis.CHILD, AnyNodeTest.getInstance()).hasNext()</code></p>
663 676
     */
664 677

  
678
    @Override
665 679
    public boolean hasChildNodes() {
666 680
        // An attribute node has child text nodes
667 681
        synchronized (docWrapper.docNode) {
......
677 691
     *               documents
678 692
     */
679 693

  
694
    @Override
680 695
    public void generateId(FastStringBuffer buffer) {
681 696
        Navigator.appendSequentialKey(this, buffer, true);
682 697
    }
......
696 711
     *         <p>For a node other than an element, the method returns null.</p>
697 712
     */
698 713

  
714
    @Override
699 715
    public NamespaceBinding[] getDeclaredNamespaces(NamespaceBinding[] buffer) {
700 716
        synchronized (docWrapper.docNode) {
701 717
            if (node.getNodeType() == Node.ELEMENT_NODE) {
......
801 817
     * @return true if the node is an ID
802 818
     */
803 819

  
820
    @Override
804 821
    public boolean isId() {
805 822
        synchronized (docWrapper.docNode) {
806 823
            return (node instanceof Attr) && ((Attr) node).isId();
807 824
        }
808 825
    }
809 826

  
827
    @Override
810 828
    public DOMNodeWrapper getNextSibling() {
811 829
        synchronized(docWrapper.docNode) {
812 830
            Node currNode = node;
......
844 862
    }
845 863

  
846 864

  
865
    @Override
847 866
    public DOMNodeWrapper getFirstChild() {
848 867
        synchronized(docWrapper.docNode) {
849 868
            Node currNode = node.getFirstChild();
......
860 879
        }
861 880
    }
862 881

  
882
    @Override
863 883
    public DOMNodeWrapper getPreviousSibling() {
864 884
        synchronized(docWrapper.docNode) {
865 885
            Node currNode = node.getPreviousSibling();
......
888 908
        }
889 909
    }
890 910

  
911
    @Override
891 912
    public DOMNodeWrapper getSuccessorElement(DOMNodeWrapper anchor, String uri, String local) {
892 913
        synchronized (docWrapper.docNode) {
893 914
            Node stop = anchor == null ? null : anchor.node;
......
959 980
            }
960 981
        }
961 982

  
983
        @Override
962 984
        public boolean hasNext() {
963 985
            return ix < attList.size();
964 986
        }
965 987

  
988
        @Override
966 989
        public NodeInfo next() {
967 990
            if (ix >= attList.size()) {
968 991
                return null;
......
982 1005
         *         It is acceptable for the properties of the iterator to change depending on its state.
983 1006
         */
984 1007

  
1008
        @Override
985 1009
        public EnumSet<Property> getProperties() {
986 1010
            return EnumSet.of(Property.LOOKAHEAD);
987 1011
        }
......
1094 1118
            return count == 0 ? 1 : count;
1095 1119
        }
1096 1120

  
1121
        @Override
1097 1122
        public boolean hasNext() {
1098 1123
            if (forwards) {
1099 1124
                return ix + currentSpan < childNodesLength;
......
1103 1128
        }
1104 1129

  
1105 1130
        /*@Nullable*/
1131
        @Override
1106 1132
        public NodeInfo next() {
1107 1133
            synchronized(start.docWrapper.docNode) {
1108 1134
                while (true) {
......
1168 1194
         *         It is acceptable for the properties of the iterator to change depending on its state.
1169 1195
         */
1170 1196

  
1197
        @Override
1171 1198
        public EnumSet<Property> getProperties() {
1172 1199
            return EnumSet.of(Property.LOOKAHEAD);
1173 1200
        }
latest10/hej/net/sf/saxon/dom/DOMObjectModel.java
76 76
     * @return by convention (but not necessarily) the class that implements a document node in the relevant
77 77
     * external model
78 78
     */
79
    @Override
79 80
    public String getDocumentClassName() {
80 81
        return "org.w3c.dom.Document";
81 82
    }
......
85 86
     * an XPath implementation
86 87
     */
87 88

  
89
    @Override
88 90
    public String getIdentifyingURI() {
89 91
        return XPathConstants.DOM_OBJECT_MODEL;
90 92
    }
91 93

  
94
    @Override
92 95
    public String getName() {
93 96
        return "DOM";
94 97
    }
......
104 107
     *         otherwise null
105 108
     */
106 109

  
110
    @Override
107 111
    public PJConverter getPJConverter(Class<?> targetClass) {
108 112
        if (Node.class.isAssignableFrom(targetClass) && !NodeOverNodeInfo.class.isAssignableFrom(targetClass)) {
109 113
            return new PJConverter() {
114
                @Override
110 115
                public Object convert(Sequence value, Class<?> targetClass, XPathContext context) throws XPathException {
111 116
                    return convertXPathValueToObject(value, targetClass);
112 117
                }
113 118
            };
114 119
        } else if (NodeList.class == targetClass) {
115 120
            return new PJConverter() {
121
                @Override
116 122
                public Object convert(Sequence value, Class<?> targetClass, XPathContext context) throws XPathException {
117 123
                    return convertXPathValueToObject(value, targetClass);
118 124
                }
......
123 129
    }
124 130

  
125 131
    //public NodeSet ns;
132
    @Override
126 133
    public JPConverter getJPConverter(Class sourceClass, Configuration config) {
127 134
        if (Node.class.isAssignableFrom(sourceClass) && !NodeOverNodeInfo.class.isAssignableFrom(sourceClass)) {
128 135
            return new JPConverter() {
136
                @Override
129 137
                public Sequence convert(Object obj, XPathContext context) {
130 138
                    return wrapOrUnwrapNode((Node) obj, context.getConfiguration());
131 139
                }
132 140

  
141
                @Override
133 142
                public ItemType getItemType() {
134 143
                    return AnyNodeTest.getInstance();
135 144
                }
136 145
            };
137 146
        } else if (NodeList.class.isAssignableFrom(sourceClass)) {
138 147
            return new JPConverter() {
148
                @Override
139 149
                public Sequence convert(Object obj, XPathContext context) {
140 150
                    Configuration config = context.getConfiguration();
141 151
                    NodeList list = (NodeList) obj;
......
147 157
                    return new SequenceExtent(nodes);
148 158
                }
149 159

  
160
                @Override
150 161
                public ItemType getItemType() {
151 162
                    return AnyNodeTest.getInstance();
152 163
                }
153 164

  
165
                @Override
154 166
                public int getCardinality() {
155 167
                    return StaticProperty.ALLOWS_ZERO_OR_MORE;
156 168
                }
157 169
            };
158 170
        } else if (DOMSource.class.isAssignableFrom(sourceClass)) {
159 171
            return new JPConverter() {
172
                @Override
160 173
                public Sequence convert(Object obj, XPathContext context) {
161 174
                    return unravel((DOMSource) obj, context.getConfiguration());
162 175
                }
163 176

  
177
                @Override
164 178
                public ItemType getItemType() {
165 179
                    return AnyNodeTest.getInstance();
166 180
                }
167 181
            };
168 182
        } else if (DocumentWrapper.class == sourceClass) {
169 183
            return new JPConverter() {
184
                @Override
170 185
                public Sequence convert(Object obj, XPathContext context) {
171 186
                    return ((DocumentWrapper) obj).getRootNode();
172 187
                }
173 188

  
189
                @Override
174 190
                public ItemType getItemType() {
175 191
                    return AnyNodeTest.getInstance();
176 192
                }
......
190 206
     *         returns a collection of nodes in this object model
191 207
     */
192 208

  
209
    @Override
193 210
    public PJConverter getNodeListCreator(Object node) {
194 211
        if (node == null ||
195 212
                node instanceof Node ||
......
198 215
                (node instanceof VirtualNode && ((VirtualNode) node).getRealNode() instanceof Node)) {
199 216
            return new PJConverter() {
200 217
                /*@Nullable*/
218
                @Override
201 219
                public Object convert(Sequence value, Class<?> targetClass, XPathContext context) throws XPathException {
202 220
                    return convertXPathValueToObject(value, NodeList.class);
203 221
                }
......
214 232
     * @return either a Receiver that can be used to build a DOM instance, or null
215 233
     */
216 234

  
235
    @Override
217 236
    public Receiver getDocumentBuilder(Result result) throws XPathException {
218 237
        if (result instanceof DOMResult) {
219 238
            DOMWriter emitter = new DOMWriter();
......
257 276
     * Otherwise, return false
258 277
     */
259 278

  
279
    @Override
260 280
    public boolean sendSource(Source source, Receiver receiver) throws XPathException {
261 281
        if (source instanceof DOMSource) {
262 282
            sendDOMSource((DOMSource)source, receiver);
......
330 350
     * source does not belong to this object model, return null
331 351
     */
332 352

  
353
    @Override
333 354
    public NodeInfo unravel(Source source, Configuration config) {
334 355

  
335 356
        if (source instanceof DOMSource) {
latest10/hej/net/sf/saxon/dom/DOMTransform.java
31 31

  
32 32
public class DOMTransform extends Transform {
33 33

  
34
    @Override
34 35
    public List<Source> preprocess(List<Source> sources) throws XPathException {
35 36
        try {
36 37
            ArrayList<Source> domSources = new ArrayList<>(sources.size());
latest10/hej/net/sf/saxon/dom/DOMWriter.java
46 46
     * Set the pipelineConfiguration
47 47
     */
48 48

  
49
    @Override
49 50
    public void setPipelineConfiguration(/*@NotNull*/ PipelineConfiguration pipe) {
50 51
        this.pipe = pipe;
51 52
        config = pipe.getConfiguration();
......
56 57
     */
57 58

  
58 59
    /*@NotNull*/
60
    @Override
59 61
    public PipelineConfiguration getPipelineConfiguration() {
60 62
        return pipe;
61 63
    }
......
64 66
     * Set the System ID of the destination tree
65 67
     */
66 68

  
69
    @Override
67 70
    public void setSystemId(String systemId) {
68 71
        this.systemId = systemId;
69 72
    }
......
76 79
     * @param publicID The public identifier of the unparsed entity
77 80
     */
78 81

  
82
    @Override
79 83
    public void setUnparsedEntity(String name, String systemID, String publicID) throws XPathException {
80 84
        // no-op
81 85
    }
......
86 90
     * @return The system identifier that was set with setSystemId,
87 91
     *         or null if setSystemId was not called.
88 92
     */
93
    @Override
89 94
    public String getSystemId() {
90 95
        return systemId;
91 96
    }
......
94 99
     * Start of the document.
95 100
     */
96 101

  
102
    @Override
97 103
    public void open() {
98 104
    }
99 105

  
......
101 107
     * End of the document.
102 108
     */
103 109

  
110
    @Override
104 111
    public void close() {
105 112
    }
106 113

  
......
108 115
     * Start of a document node.
109 116
     */
110 117

  
118
    @Override
111 119
    public void startDocument(int properties) throws XPathException {
112 120
        if (document == null) {
113 121
            try {
......
125 133
     * Notify the end of a document node
126 134
     */
127 135

  
136
    @Override
128 137
    public void endDocument() throws XPathException {
129 138
    }
130 139

  
......
132 141
     * Start of an element.
133 142
     */
134 143

  
144
    @Override
135 145
    public void startElement(NodeName elemName, SchemaType type,
136 146
                             AttributeMap attributes, NamespaceMap namespaces,
137 147
                             Location location, int properties) throws XPathException {
......
186 196
     * End of an element.
187 197
     */
188 198

  
199
    @Override
189 200
    public void endElement() throws XPathException {
190 201
        nsStack.pop();
191 202
        if (canNormalize) {
......
205 216
     * Character data.
206 217
     */
207 218

  
219
    @Override
208 220
    public void characters(CharSequence chars, Location locationId, int properties) throws XPathException {
209 221
        if (level == 0 && nextSibling == null && Whitespace.isWhite(chars)) {
210 222
            return; // no action for top-level whitespace
......
226 238
     * Handle a processing instruction.
227 239
     */
228 240

  
241
    @Override
229 242
    public void processingInstruction(String target, CharSequence data, Location locationId, int properties)
230 243
            throws XPathException {
231 244
        try {
......
245 258
     * Handle a comment.
246 259
     */
247 260

  
261
    @Override
248 262
    public void comment(CharSequence chars, Location locationId, int properties) throws XPathException {
249 263
        try {
250 264
            Comment comment = document.createComment(chars.toString());
......
266 280
     *         may supply untyped nodes instead of supplying the type annotation
267 281
     */
268 282

  
283
    @Override
269 284
    public boolean usesTypeAnnotations() {
270 285
        return false;
271 286
    }
latest10/hej/net/sf/saxon/dom/DocumentBuilderImpl.java
94 94
     * namespaces. This implementation always returns true.
95 95
     */
96 96

  
97
    @Override
97 98
    public boolean isNamespaceAware() {
98 99
        return true;
99 100
    }
......
116 117
     * XML documents against a DTD; false otherwise.
117 118
     */
118 119

  
120
    @Override
119 121
    public boolean isValidating() {
120 122
        return parseOptions.getDTDValidationMode() == Validation.STRICT;
121 123
    }
......
127 129
     *                                       implementation is by using the parse() method.
128 130
     */
129 131

  
132
    @Override
130 133
    public Document newDocument() {
131 134
        throw new UnsupportedOperationException("The only way to build a document using this DocumentBuilder is with the parse() method");
132 135
    }
......
147 150
     * @throws SAXException If any parse errors occur.
148 151
     */
149 152

  
153
    @Override
150 154
    public Document parse(InputSource in) throws SAXException {
151 155
        try {
152 156
            if (config == null) {
......
178 182
     * @throws SAXException        If any parse errors occur.
179 183
     */
180 184

  
185
    @Override
181 186
    public Document parse(File f) throws SAXException {
182 187
        Objects.requireNonNull(f);
183 188
        String uri = f.toURI().toString();
......
194 199
     *           present in the XML document to be parsed.
195 200
     */
196 201

  
202
    @Override
197 203
    public void setEntityResolver(EntityResolver er) {
198 204
        parseOptions.setEntityResolver(er);
199 205
    }
......
205 211
     */
206 212

  
207 213

  
214
    @Override
208 215
    public void setErrorHandler(ErrorHandler eh) {
209 216
        parseOptions.setErrorHandler(eh);
210 217
    }
......
215 222
     * @return A new instance of a <code>DOMImplementation</code>.
216 223
     */
217 224

  
225
    @Override
218 226
    public DOMImplementation getDOMImplementation() {
219 227
        return newDocument().getImplementation();
220 228
    }
......
246 254
     * @see javax.xml.parsers.DocumentBuilderFactory#setXIncludeAware(boolean)
247 255
     * @since JAXP 1.5, Saxon 8.9
248 256
     */
257
    @Override
249 258
    public boolean isXIncludeAware() {
250 259
        return parseOptions.isXIncludeAware();
251 260
    }
latest10/hej/net/sf/saxon/dom/DocumentOverNodeInfo.java
35 35
     *         information.
36 36
     */
37 37

  
38
    @Override
38 39
    public DocumentType getDoctype() {
39 40
        return null;
40 41
    }
......
45 46
     * DOM method.
46 47
     */
47 48

  
49
    @Override
48 50
    public DOMImplementation getImplementation() {
49 51
        return new DOMImplementationImpl();
50 52
    }
......
55 57
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
56 58
     */
57 59

  
60
    @Override
58 61
    public Element createElement(String tagName) throws DOMException {
59 62
        disallowUpdate();
60 63
        return null;
......
67 70
     *         DOM method: returns null, because the Saxon tree is not updateable.
68 71
     */
69 72

  
73
    @Override
70 74
    public DocumentFragment createDocumentFragment() {
71 75
        return null;
72 76
    }
......
79 83
     * @return The new <code>Text</code> object.
80 84
     */
81 85

  
86
    @Override
82 87
    public Text createTextNode(String data) {
83 88
        return null;
84 89
    }
......
90 95
     * @param data The data for the node.
91 96
     * @return The new <code>Comment</code> object.
92 97
     */
98
    @Override
93 99
    public Comment createComment(String data) {
94 100
        return null;
95 101
    }
......
104 110
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
105 111
     */
106 112

  
113
    @Override
107 114
    public CDATASection createCDATASection(String data) throws org.w3c.dom.DOMException {
108 115
        disallowUpdate();
109 116
        return null;
......
120 127
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
121 128
     */
122 129

  
130
    @Override
123 131
    public ProcessingInstruction createProcessingInstruction(String target, String data)
124 132
            throws org.w3c.dom.DOMException {
125 133
        disallowUpdate();
......
138 146
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
139 147
     */
140 148

  
149
    @Override
141 150
    public Attr createAttribute(String name) throws org.w3c.dom.DOMException {
142 151
        disallowUpdate();
143 152
        return null;
......
152 161
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
153 162
     */
154 163

  
164
    @Override
155 165
    public EntityReference createEntityReference(String name) throws org.w3c.dom.DOMException {
156 166
        disallowUpdate();
157 167
        return null;
......
168 178
     *         <code>Elements</code> .
169 179
     */
170 180

  
181
    @Override
171 182
    public NodeList getElementsByTagName(String tagname) {
172 183
        return getElementsByTagName(node, tagname);
173 184
    }
......
180 191
     *         null.
181 192
     */
182 193

  
194
    @Override
183 195
    public Element getDocumentElement() {
184 196
        NodeInfo root = node.getRoot();
185 197
        if (root == null) {
......
216 228
     * @since DOM Level 2
217 229
     */
218 230

  
231
    @Override
219 232
    public Node importNode(Node importedNode, boolean deep) throws UnsupportedOperationException {
220 233
        disallowUpdate();
221 234
        return null;
......
233 246
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
234 247
     */
235 248

  
249
    @Override
236 250
    public Element createElementNS(String namespaceURI, String qualifiedName) throws UnsupportedOperationException {
237 251
        disallowUpdate();
238 252
        return null;
......
250 264
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
251 265
     */
252 266

  
267
    @Override
253 268
    public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws UnsupportedOperationException {
254 269
        disallowUpdate();
255 270
        return null;
......
271 286
     * @since DOM Level 2
272 287
     */
273 288

  
289
    @Override
274 290
    public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
275 291
        return getElementsByTagNameNS(node, namespaceURI, localName);
276 292
    }
......
309 325
     * @since DOM Level 2
310 326
     */
311 327

  
328
    @Override
312 329
    public Element getElementById(String elementId) {
313 330
        // Defined on Document node; but we support it on any node.
314 331
        TreeInfo doc = node.getTreeInfo();
......
325 342
     *
326 343
     * @since DOM Level 3
327 344
     */
345
    @Override
328 346
    public String getInputEncoding() {
329 347
        return null;
330 348
    }
......
338 356
     *
339 357
     * @since DOM Level 3
340 358
     */
359
    @Override
341 360
    public String getXmlEncoding() {
342 361
        return null;
343 362
    }
......
355 374
     *
356 375
     * @since DOM Level 3
357 376
     */
377
    @Override
358 378
    public boolean getXmlStandalone() {
359 379
        return false;
360 380
    }
......
372 392
     *                                  "XML" feature.
373 393
     * @since DOM Level 3
374 394
     */
395
    @Override
375 396
    public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
376 397
        disallowUpdate();
377 398
    }
......
401 422
     *
402 423
     * @since DOM Level 3
403 424
     */
425
    @Override
404 426
    public String getXmlVersion() {
405 427
        return "1.0";
406 428
    }
......
433 455
     *                                  does not support the "XML" feature.
434 456
     * @since DOM Level 3
435 457
     */
458
    @Override
436 459
    public void setXmlVersion(String xmlVersion) throws DOMException {
437 460
        disallowUpdate();
438 461
    }
......
448 471
     *
449 472
     * @since DOM Level 3
450 473
     */
474
    @Override
451 475
    public boolean getStrictErrorChecking() {
452 476
        return false;
453 477
    }
......
463 487
     *
464 488
     * @since DOM Level 3
465 489
     */
490
    @Override
466 491
    public void setStrictErrorChecking(boolean strictErrorChecking) {
467 492
        //no-op
468 493
    }
......
481 506
     *
482 507
     * @since DOM Level 3
483 508
     */
509
    @Override
484 510
    public String getDocumentURI() {
485 511
        return node.getSystemId();
486 512
    }
......
500 526
     * @since DOM Level 3
501 527
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
502 528
     */
529
    @Override
503 530
    public void setDocumentURI(String documentURI) throws DOMException {
504 531
        disallowUpdate();
505 532
    }
......
574 601
     * @since DOM Level 3
575 602
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
576 603
     */
604
    @Override
577 605
    public Node adoptNode(Node source) throws DOMException {
578 606
        disallowUpdate();
579 607
        return null;
......
585 613
     *
586 614
     * @since DOM Level 3
587 615
     */
616
    @Override
588 617
    public DOMConfiguration getDomConfig() {
589 618
        return null;
590 619
    }
......
622 651
     * @since DOM Level 3
623 652
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
624 653
     */
654
    @Override
625 655
    public void normalizeDocument() throws DOMException {
626 656
        disallowUpdate();
627 657
    }
......
638 668
     * @throws org.w3c.dom.DOMException always, to indicate that update is not supported in this DOM implementation
639 669
     */
640 670
    /*@Nullable*/
671
    @Override
641 672
    public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException {
642 673
        disallowUpdate();
643 674
        return null;
latest10/hej/net/sf/saxon/dom/DocumentWrapper.java
114 114
     *         that comes last should be returned.
115 115
     */
116 116

  
117
    @Override
117 118
    public NodeInfo selectID(String id, boolean getParent) {
118 119
        synchronized (docNode) {
119 120
            Node node = ((DOMNodeWrapper)getRootNode()).node;
......
151 152
     * @since 9.1 (implemented for this subclass since 9.2)
152 153
     */
153 154

  
155
    @Override
154 156
    public Iterator<String> getUnparsedEntityNames() {
155 157
        synchronized (docNode) {
156 158
            Node node = ((DOMNodeWrapper) getRootNode()).node;
......
193 195
     * @since 8.4 (implemented for this subclass since 9.2)
194 196
     */
195 197

  
198
    @Override
196 199
    public String[] getUnparsedEntity(String name) {
197 200
        synchronized (docNode) {
198 201
            Node node = ((DOMNodeWrapper) getRootNode()).node;
latest10/hej/net/sf/saxon/dom/ElementOverNodeInfo.java
36 36
     * The name of the element (DOM interface).
37 37
     */
38 38

  
39
    @Override
39 40
    public String getTagName() {
40 41
        return node.getDisplayName();
41 42
    }
......
48 49
     *             matches all tags.
49 50
     * @return A list of matching <code>Element</code> nodes.
50 51
     */
52
    @Override
51 53
    public NodeList getElementsByTagName(String name) {
52 54
        return DocumentOverNodeInfo.getElementsByTagName(node, name);
53 55
    }
......
68 70
     *                                  through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
69 71
     * @since DOM Level 2
70 72
     */
73
    @Override
71 74
    public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException {
72 75
        return DocumentOverNodeInfo.getElementsByTagNameNS(node, namespaceURI, localName);
73 76
    }
......
78 81
     * namespace declarations are treated as attributes.
79 82
     */
80 83

  
84
    @Override
81 85
    public NamedNodeMap getAttributes() {
82 86
        if (attributeMap == null) {
83 87
            attributeMap = new DOMAttributeMap(node);
......
93 97
     *         that attribute does not have a specified or default value.
94 98
     */
95 99

  
100
    @Override
96 101
    public String getAttribute(String name) {
97 102
        if (name.startsWith("xmlns")) {
98 103
            Node node = getAttributes().getNamedItem(name);
......
126 131
     *         attribute.
127 132
     */
128 133

  
134
    @Override
129 135
    public Attr getAttributeNode(String name) {
130 136
        AxisIterator atts = node.iterateAxis(AxisInfo.ATTRIBUTE);
131 137
        while (true) {
......
145 151
     * @throws org.w3c.dom.DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
146 152
     */
147 153

  
154
    @Override
148 155
    public Attr setAttributeNode(Attr newAttr) throws DOMException {
149 156
        disallowUpdate();
150 157
        return null;
......
156 163
     * @throws org.w3c.dom.DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
157 164
     */
158 165

  
166
    @Override
159 167
    public void removeAttribute(String oldAttr) throws DOMException {
160 168
        disallowUpdate();
161 169
    }
......
166 174
     * @throws org.w3c.dom.DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
167 175
     */
168 176

  
177
    @Override
169 178
    public Attr removeAttributeNode(Attr oldAttr) throws DOMException {
170 179
        disallowUpdate();
171 180
        return null;
......
183 192
     * @since DOM Level 2
184 193
     */
185 194

  
195
    @Override
186 196
    public String getAttributeNS(String namespaceURI, String localName) {
187 197
        if (NamespaceConstant.XMLNS.equals(namespaceURI)) {
188 198
            Node node = getAttributes().getNamedItemNS(namespaceURI, localName);
......
206 216
     *                                  <code>Document.xmlVersion</code> attribute.
207 217
     *                                  <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
208 218
     */
219
    @Override
209 220
    public void setAttribute(String name, String value) throws DOMException {
210 221
        disallowUpdate();
211 222
    }
......
221 232
     * @throws org.w3c.dom.DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
222 233
     */
223 234

  
235
    @Override
224 236
    public void setAttributeNS(String namespaceURI,
225 237
                               String qualifiedName,
226 238
                               String value)
......
235 247
     * @since DOM Level 2
236 248
     */
237 249

  
250
    @Override
238 251
    public void removeAttributeNS(String namespaceURI,
239 252
                                  String localName)
240 253
            throws DOMException {
......
253 266
     * @since DOM Level 2
254 267
     */
255 268

  
269
    @Override
256 270
    public Attr getAttributeNodeNS(String namespaceURI, String localName) {
257 271
        NamePool pool = node.getConfiguration().getNamePool();
258 272
        NameTest test = new NameTest(Type.ATTRIBUTE, namespaceURI, localName, pool);
......
272 286
     * @since DOM Level 2
273 287
     */
274 288

  
289
    @Override
275 290
    public Attr setAttributeNodeNS(Attr newAttr)
276 291
            throws DOMException {
277 292
        disallowUpdate();
......
290 305
     * @since DOM Level 2
291 306
     */
292 307

  
308
    @Override
293 309
    public boolean hasAttribute(String name) {
294 310
        if (name.startsWith("xmlns")) {
295 311
            Node node = getAttributes().getNamedItem(name);
......
320 336
     * @since DOM Level 2
321 337
     */
322 338

  
339
    @Override
323 340
    public boolean hasAttributeNS(String namespaceURI, String localName) {
324 341
        if (NamespaceConstant.XMLNS.equals(namespaceURI)) {
325 342
            Node node = getAttributes().getNamedItemNS(namespaceURI, localName);
......
335 352
     * @throws UnsupportedOperationException always
336 353
     */
337 354

  
355
    @Override
338 356
    public void setIdAttribute(String name, boolean isId) throws UnsupportedOperationException {
339 357
        disallowUpdate();
340 358
    }
......
345 363
     * @throws UnsupportedOperationException always
346 364
     */
347 365

  
366
    @Override
348 367
    public void setIdAttributeNS(String namespaceURI, String localName, boolean isId)
349 368
            throws UnsupportedOperationException {
350 369
        disallowUpdate();
......
355 374
     * @throws UnsupportedOperationException always
356 375
     */
357 376

  
377
    @Override
358 378
    public void setIdAttributeNode(Attr idAttr, boolean isId) throws UnsupportedOperationException {
359 379
        disallowUpdate();
360 380
    }
......
367 387
     */
368 388

  
369 389
    /*@Nullable*/
390
    @Override
370 391
    public TypeInfo getSchemaTypeInfo() {
371 392
        SchemaType type = node.getSchemaType();
372 393
        if (type == null || Untyped.getInstance().equals(type) || BuiltInAtomicType.UNTYPED_ATOMIC.equals(type)) {
latest10/hej/net/sf/saxon/dom/NodeOverNodeInfo.java
92 92
     *         same node in the tree.
93 93
     */
94 94

  
95
    @Override
95 96
    public final boolean isSameNode(Node other) {
96 97
        return other instanceof NodeOverNodeInfo &&
97 98
                node.equals(((NodeOverNodeInfo) other).node);
......
129 130
     * the base URI of the parent node.
130 131
     */
131 132

  
133
    @Override
132 134
    public String getBaseURI() {
133 135
        return node.getBaseURI();
134 136
    }
......
141 143
     *         as "#text" or "#comment"
142 144
     */
143 145

  
146
    @Override
144 147
    public String getNodeName() {
145 148
        switch (node.getNodeKind()) {
146 149
            case Type.DOCUMENT:
......
173 176
     *         for an attribute it is the local part of the attribute name. Other node types return null.
174 177
     */
175 178

  
179
    @Override
176 180
    public String getLocalName() {
177 181
        switch (node.getNodeKind()) {
178 182
            case Type.ELEMENT:
......
202 206
     *         <code>false</code> otherwise.
203 207
     */
204 208

  
209
    @Override
205 210
    public boolean hasChildNodes() {
206 211
        return node.hasChildNodes();
207 212
    }
......
216 221
     * @since DOM Level 2
217 222
     */
218 223

  
224
    @Override
219 225
    public boolean hasAttributes() {
220 226
        return true;
221 227
    }
......
226 232
     * in Saxon (see {@link Type}) are the same as those assigned in the DOM
227 233
     */
228 234

  
235
    @Override
229 236
    public short getNodeType() {
230 237
        short kind = (short) node.getNodeKind();
231 238
        if (kind == Type.NAMESPACE) {
......
241 248
     * @return The Node object describing the containing element or root node.
242 249
     */
243 250

  
251
    @Override
244 252
    public Node getParentNode() {
245 253
        return wrap(node.getParent());
246 254
    }
......
252 260
     *         child of its parent.
253 261
     */
254 262

  
263
    @Override
255 264
    public Node getPreviousSibling() {
256 265
        return wrap(node.iterateAxis(AxisInfo.PRECEDING_SIBLING).next());
257 266
    }
......
263 272
     *         child of its parent.
264 273
     */
265 274

  
275
    @Override
266 276
    public Node getNextSibling() {
267 277
        return wrap(node.iterateAxis(AxisInfo.FOLLOWING_SIBLING).next());
268 278
    }
......
273 283
     * @return the first child node of this node, or null if it has no children
274 284
     */
275 285

  
286
    @Override
276 287
    public Node getFirstChild() {
277 288
        return wrap(node.iterateAxis(AxisInfo.CHILD).next());
278 289
    }
......
283 294
     * @return last child of this node, or null if it has no children
284 295
     */
285 296

  
297
    @Override
286 298
    public Node getLastChild() {
287 299
        AxisIterator children = node.iterateAxis(AxisInfo.CHILD);
288 300
        NodeInfo last = null;
......
302 314
     * node value of an element node is null.
303 315
     */
304 316

  
317
    @Override
305 318
    public String getNodeValue() {
306 319
        switch (node.getNodeKind()) {
307 320
            case Type.DOCUMENT:
......
322 335
     * Set the node value. Always fails
323 336
     */
324 337

  
338
    @Override
325 339
    public void setNodeValue(String nodeValue) throws DOMException {
326 340
        disallowUpdate();
327 341
    }
......
332 346
     * nodes.
333 347
     */
334 348

  
349
    @Override
335 350
    public NodeList getChildNodes() {
336 351
        List<Node> nodes = new ArrayList<>(10);
337 352
        for (NodeInfo child : node.children()) {
......
345 360
     * it is an <code>Element</code>) or <code>null</code> otherwise.
346 361
     */
347 362

  
363
    @Override
348 364
    public NamedNodeMap getAttributes() {
349 365
        return null;
350 366
    }
......
353 369
     * Return the <code>Document</code> object associated with this node.
354 370
     */
355 371

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff