/*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (c) 2013, 2015 Red Hat, 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
- *
- * Authors : Madhu Venugopal, Brent Salisbury
*/
+
package org.opendaylight.ovsdb.northbound;
import java.io.IOException;
public static OvsdbRow fromJsonNode(OvsdbClient client, String dbName, JsonNode json) {
JsonNode parentUuidNode = json.get(PARENTUUID);
String parentUuid = null;
- if (parentUuidNode != null) parentUuid = parentUuidNode.asText();
-
+ if (parentUuidNode != null) {
+ parentUuid = parentUuidNode.asText();
+ }
JsonNode parentTableNode = json.get(PARENTTABLE);
String parentTable = null;
- if (parentTableNode != null) parentTable = parentTableNode.asText();
-
+ if (parentTableNode != null) {
+ parentTable = parentTableNode.asText();
+ }
JsonNode parentColumnNode = json.get(PARENTCOLUMN);
String parentColumn = null;
- if (parentColumnNode != null) parentColumn = parentColumnNode.asText();
-
+ if (parentColumnNode != null) {
+ parentColumn = parentColumnNode.asText();
+ }
JsonNode rowNode = json.get(ROW);
- if (rowNode == null) return null;
+ if (rowNode == null) {
+ return null;
+ }
for(Iterator<String> fieldNames = rowNode.fieldNames(); fieldNames.hasNext();) {
String tableName = fieldNames.next();
Row<GenericTableSchema> row = null;