Merge branch 'master' of ../controller
[yangtools.git] / yang / yang-data-codec-xml / src / main / java / org / opendaylight / yangtools / yang / data / codec / xml / DOMSourceXMLStreamReader.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.data.codec.xml;
9
10 import javax.xml.stream.Location;
11 import javax.xml.stream.XMLStreamException;
12 import javax.xml.transform.dom.DOMSource;
13 import org.codehaus.stax2.ri.dom.DOMWrappingReader;
14
15 final class DOMSourceXMLStreamReader extends DOMWrappingReader {
16     DOMSourceXMLStreamReader(final DOMSource src) throws XMLStreamException {
17         super(src, true, true);
18     }
19
20     @Override
21     public Object getProperty(final String name) {
22         return null;
23     }
24
25     @Override
26     public boolean isPropertySupported(final String name) {
27         return false;
28     }
29
30     @Override
31     public boolean setProperty(final String name, final Object value) {
32         return false;
33     }
34
35     @Override
36     protected void throwStreamException(final String msg, final Location loc) throws XMLStreamException {
37         throw new XMLStreamException(msg, loc);
38     }
39 }