Back to project page dbpendler.
The source code is released under:
Copyright 2013 Marcus Schiesser Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Softw...
If you think the Android project dbpendler listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.marcusschiesser.dbpendler.client.services.resources; // w w w . j av a2 s . c o m import java.io.IOException; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper; import android.util.Log; import de.marcusschiesser.dbpendler.common.resources.ConnectionResource; import de.marcusschiesser.dbpendler.common.vo.ConnectionVO; public class ConnectionClientResource extends AbstractClientResource implements ConnectionResource { public ConnectionVO[] listDaily(String startId, String destinationId) { String responseText = doGet("connections", "start=" + startId + "&destination=" + destinationId); ObjectMapper mapper = new ObjectMapper(); try { return mapper.readValue(responseText, ConnectionVO[].class); } catch (JsonParseException e) { Log.e(ConnectionClientResource.class.toString(), "parse error", e); } catch (JsonMappingException e) { Log.e(ConnectionClientResource.class.toString(), "mapping error", e); } catch (IOException e) { Log.e(ConnectionClientResource.class.toString(), "i/o error", e); } return new ConnectionVO[0]; } public ConnectionVO[] listDay(String startId, String destinationId, String date) { // TODO Auto-generated method stub return null; } }