sparqlGraphLibrary/src/main/java/com/ge/research/semtk/plotting/PlotlyPlotSpec.java
private boolean walkToApplyTable(Object parent, Object json, Table table) throws Exception {
		boolean changeFlag = false;
		if (json instanceof JSONObject) {
			changeFlag = this.applyTableToObject(parent, (JSONObject) json, table);
			
			if (! changeFlag) {
			
				// walk members
				JSONObject jObj = (JSONObject) json;
				for (Object key : jObj.keySet()) {
					Object member = jObj.get(key);
					
					if (member instanceof JSONObject) {
						changeFlag = this.walkToApplyTable(json, member, table);
					
					} else if (member instanceof JSONArray) {
						changeFlag = this.walkToApplyTable(json, member, table);
					
					} else if (member instanceof String) {
						// found a string field: do the work
						changeFlag = this.applyTableToJsonStringField(jObj, (String)key, table);
					}
					// return after first change to avoid concurrent operations exception
					if (changeFlag) break;  
				}
			}
	
		} else if (json instanceof JSONArray) {
			// recursively apply to each member of array
			JSONArray jArr = (JSONArray) json;
			for (Object o : jArr) {
				changeFlag = this.walkToApplyTable(json, o, table);
				// return after first change to avoid concurrent operations exception
				if (changeFlag) break;
			}
		}
		
		return changeFlag;
	}
/**
	 * Recursively walk json and apply table.  Make first change only (to avoid concurrent mod).
	 * Call repeatedly until you get "false"
	 * 
	 * Returns: boolean - were any changes made.
	 */
Recursively walk json and apply table.  Make first change only (to avoid concurrent mod).
Call repeatedly until you get "false"

were any changes made.
Recursively walk json and apply table . Make first change only ( to avoid concurrent mod ) . Call repeatedly until you get " false " were any changes made .
private boolean walkToApplyTable(Object parent, Object json, Table table) throws Exception {
		boolean changeFlag = false;
		if (json instanceof JSONObject) {
			changeFlag = this.applyTableToObject(parent, (JSONObject) json, table);
			if (! changeFlag) {
				JSONObject jObj = (JSONObject) json;
				for (Object key : jObj.keySet()) {
					Object member = jObj.get(key);
					if (member instanceof JSONObject) {
						changeFlag = this.walkToApplyTable(json, member, table);
					} else if (member instanceof JSONArray) {
						changeFlag = this.walkToApplyTable(json, member, table);
					} else if (member instanceof String) {
						changeFlag = this.applyTableToJsonStringField(jObj, (String)key, table);
					}
					if (changeFlag) break;  
				}
			}
		} else if (json instanceof JSONArray) {
			JSONArray jArr = (JSONArray) json;
			for (Object o : jArr) {
				changeFlag = this.walkToApplyTable(json, o, table);
				if (changeFlag) break;
			}
		}
		return changeFlag;
	}
private boolean walkToApplyTable ( Object parent , Object json , Table table ) throws Exception { boolean changeFlag = false ; if ( json instanceof JSONObject ) { changeFlag = this . applyTableToObject ( parent , ( JSONObject ) json , table ) ; if ( ! changeFlag ) { JSONObject jObj = ( JSONObject ) json ; for ( Object key : jObj . keySet ( ) ) { Object member = jObj . get ( key ) ; if ( member instanceof JSONObject ) { changeFlag = this . walkToApplyTable ( json , member , table ) ; } else if ( member instanceof JSONArray ) { changeFlag = this . walkToApplyTable ( json , member , table ) ; } else if ( member instanceof String ) { changeFlag = this . applyTableToJsonStringField ( jObj , ( String ) key , table ) ; } if ( changeFlag ) break ; } } } else if ( json instanceof JSONArray ) { JSONArray jArr = ( JSONArray ) json ; for ( Object o : jArr ) { changeFlag = this . walkToApplyTable ( json , o , table ) ; if ( changeFlag ) break ; } } return changeFlag ; }
Recursively walk json and apply table.
Recursively walk json and apply table .
// walk members // found a string field: do the work // return after first change to avoid concurrent operations exception // recursively apply to each member of array // return after first change to avoid concurrent operations exception