Fix license header violations in sal-netconf-connector
[controller.git] / opendaylight / md-sal / sal-netconf-connector / src / main / java / org / opendaylight / controller / sal / connect / netconf / NetconfStateSchemas.java
index aa0897e021cdd2402ae539bd0536fc89fda3c270..3874040c2eab645a80909281b9eebcbda2d9b02c 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.controller.sal.connect.netconf;
 
 import static org.opendaylight.controller.sal.connect.netconf.util.NetconfMessageTransformUtil.NETCONF_DATA_QNAME;
@@ -174,7 +182,7 @@ public final class NetconfStateSchemas {
     public final static class RemoteYangSchema {
         private final QName qname;
 
-        private RemoteYangSchema(final QName qname) {
+        RemoteYangSchema(final QName qname) {
             this.qname = qname;
         }
 
@@ -188,13 +196,8 @@ public final class NetconfStateSchemas {
             QName childNode = NetconfMessageTransformUtil.IETF_NETCONF_MONITORING_SCHEMA_FORMAT;
 
             String formatAsString = getSingleChildNodeValue(schemaNode, childNode).get();
-            //This is HotFix for situations where format statement in netconf-monitoring might be passed with prefix.
-            if (formatAsString.contains(":")) {
-                final String[] prefixedString = formatAsString.split(":");
-                //FIXME: might be good idea to check prefix against model namespace
-                formatAsString = prefixedString[1];
-            }
-            if(formatAsString.equals(Yang.QNAME.getLocalName()) == false) {
+
+            if(formatAsString.equals(Yang.QNAME.toString()) == false) {
                 LOG.debug("{}: Ignoring schema due to unsupported format: {}", id, formatAsString);
                 return Optional.absent();
             }