src/de/uka/ipd/idaho/goldenGateServer/imp/GoldenGateImpConstants.java
/**
		 * Read an array of batch descriptors from its JSON representation.
		 * This method expects a JSON encoded list of batch descriptor objects.
		 * @param in the reader to read from
		 * @return an array holding the batch descriptors
		 * @throws IOException
		 */
Read an array of batch descriptors from its JSON representation.
This method expects a JSON encoded list of batch descriptor objects.
@param in the reader to read from
@return an array holding the batch descriptors
@throws IOException
Read an array of batch descriptors from its JSON representation . This method expects a JSON encoded list of batch descriptor objects . @param in the reader to read from @return an array holding the batch descriptors @throws IOException
public static ImpBatchDescriptor[] readJson(Reader in) throws IOException {
			Object ibdsObj = JsonParser.parseJson(in);
			if (ibdsObj instanceof List) {}
			else if (ibdsObj instanceof Map) {
				ImpBatchDescriptor ibd = readJson((Map) ibdsObj);
				if (ibd == null)
					return null;
				ImpBatchDescriptor[] ibds = {ibd};
				return ibds;
			}
			else return null;
			List ibdsArray = ((List) ibdsObj);
			List ibdsList = new ArrayList(ibdsArray.size());
			for (int d = 0; d < ibdsArray.size(); d++) {
				Map ibdObject = JsonParser.getObject(ibdsArray, d);
				if (ibdObject == null)
					continue;
				ImpBatchDescriptor ibd = readJson(ibdObject);
				if (ibd != null)
					ibdsList.add(ibd);
			}
			return ((ImpBatchDescriptor[]) ibdsList.toArray(new ImpBatchDescriptor[ibdsList.size()]));
		}
public static ImpBatchDescriptor [ ] readJson ( Reader in ) throws IOException { Object ibdsObj = JsonParser . parseJson ( in ) ; if ( ibdsObj instanceof List ) { } else if ( ibdsObj instanceof Map ) { ImpBatchDescriptor ibd = readJson ( ( Map ) ibdsObj ) ; if ( ibd == null ) return null ; ImpBatchDescriptor [ ] ibds = { ibd } ; return ibds ; } else return null ; List ibdsArray = ( ( List ) ibdsObj ) ; List ibdsList = new ArrayList ( ibdsArray . size ( ) ) ; for ( int d = 0 ; d < ibdsArray . size ( ) ; d ++ ) { Map ibdObject = JsonParser . getObject ( ibdsArray , d ) ; if ( ibdObject == null ) continue ; ImpBatchDescriptor ibd = readJson ( ibdObject ) ; if ( ibd != null ) ibdsList . add ( ibd ) ; } return ( ( ImpBatchDescriptor [ ] ) ibdsList . toArray ( new ImpBatchDescriptor [ ibdsList . size ( ) ] ) ) ; }
Read an array of batch descriptors from its JSON representation.
Read an array of batch descriptors from its JSON representation .