* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.yangtools.yang.data.codec.xml;
import com.google.common.base.Preconditions;
import javax.xml.stream.XMLStreamWriter;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.QNameModule;
+import org.opendaylight.yangtools.yang.data.util.codec.IdentityCodecUtil;
import org.opendaylight.yangtools.yang.data.util.codec.QNameCodecUtil;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
@Override
public QName parseValue(final NamespaceContext ctx, final String str) {
- return QNameCodecUtil.decodeQName(str, prefix -> {
+ return IdentityCodecUtil.parseIdentity(str, schemaContext, prefix -> {
if (prefix.isEmpty()) {
return parentModule;
}
final Module module = schemaContext.findModuleByNamespaceAndRevision(URI.create(prefixedNS), null);
Preconditions.checkArgument(module != null, "Could not find module for namespace %s", prefixedNS);
return module.getQNameModule();
- });
+ }).getQName();
}
@Override