public Map<String, Object> adaptOrders(String data) throws ExchangeException {
Map<String, Object> resultMap = new HashMap<String, Object>();
CoinfloorOrderbook rawRetObj;
try {
rawRetObj = streamObjectMapper.readValue(data, CoinfloorOrderbook.class);
} catch (IOException e) {
throw new ExchangeException("JSON parse error", e);
}
resultMap.put("raw", rawRetObj);
OrderBook orderbook;
synchronized (cachedDataSynchronizationObject) {
List<LimitOrder> bidList = (cachedOrderBook == null ? new ArrayList<LimitOrder>() : cachedOrderBook.getBids());
List<LimitOrder> askList = (cachedOrderBook == null ? new ArrayList<LimitOrder>() : cachedOrderBook.getAsks());
List<CoinfloorOrder> orders = rawRetObj.getOrders();
if (orders != null) {
for (CoinfloorOrder order : orders) {
if (order.getBaseQty().doubleValue() > 0) {
bidList.add(adaptOrder(order));