// Path: es.alrocar.map.vector/src/main/java/es/alrocar/map/vector/provider/driver/impl/JSONDriver.java
// public abstract class JSONDriver extends BaseDriver {
// 
// 	protected String[] keys;
// 
// 	public ArrayList getData(int[] tile, Extent boundingBox,
// 			Cancellable cancellable, int zoom) {
// 
// 		String query = null;
// 		String jsonTweets = null;
// 		JSONTokener tokener = null;
// 		JSONObject o = null;
// 
// 		ArrayList points = new ArrayList();
// 		try {
// 			if (cancellable != null && cancellable.getCanceled())
// 				return null;
// 
// 			query = buildQuery(boundingBox);
// 
// 			jsonTweets = download(query);
// 
// 			tokener = new JSONTokener(jsonTweets);
// 
// 			o = new JSONObject(tokener);
// 
// 			points = processJSON(o, cancellable);
// 
// 		} catch (Exception e) {
// 			// TODO Auto-generated catch block
// 			e.printStackTrace();
// 			return points;
// 		} finally {
// 			tokener = null;
// 			jsonTweets = null;
// 			query = null;
// 			o = null;
// 		}
// 		return points;
// 	}
// 
// 	public ArrayList processJSON(JSONObject o, Cancellable cancellable)
// 			throws JSONException {
// 		ArrayList points = new ArrayList();
// 		JSONArray results = getJSONArray(o);
// 
// 		final int size = results.length();
// 
// 		JSONObject object;
// 		for (int i = 0; i < size; i++) {
// 			try {
// 				if (cancellable != null && cancellable.getCanceled())
// 					return null;
// 				object = results.getJSONObject(i);
// 				Point f = processResult(object);
// 				if (f != null)
// 					points.add(f);
// 			} catch (Exception e) {
// 				e.printStackTrace();
// 			}
// 		}
// 		return points;
// 	}
// 
// 	public abstract String buildQuery(Extent boundingBox);
// 
// 	public abstract JSONArray getJSONArray(JSONObject o) throws JSONException;
// 
// 	public abstract Point processResult(JSONObject object) throws JSONException;
// }
// 
// Path: es.alrocar.map.vector/src/main/java/es/alrocar/map/vector/provider/geom/AttributePoint.java
// public class AttributePoint extends Point {
// 
// 	private HashMap fields = new HashMap();
// 
// 	public void addField(String key, Object value, int type) {
// 		fields.put(key, new Attribute(value, type));
// 	}
// 
// 	public Attribute getAttribute(String key) {
// 		return (Attribute) fields.get(key);
// 	}
// 
// 	public HashMap getAttributes() {
// 		return fields;
// 	}
// 
// 	public static class Attribute {
// 
// 		public final static int TYPE_UNKNOWN = -1;
// 		public final static int TYPE_STRING = 0;
// 		public final static int TYPE_INT = 1;
// 		public final static int TYPE_DOUBLE = 2;
// 		public final static int TYPE_LIST_STRING = 3;
// 		public final static int TYPE_LIST_INT = 4;
// 		public final static int TYPE_LIST_DOUBLE = 5;
// 		public final static int TYPE_URL = 6;
// 		public final static int TYPE_PHONE = 7;
// 		public final static int TYPE_DATE = 8;
// 
// 		public int type = TYPE_UNKNOWN;
// 		public Object value;
// 
// 		public Attribute(Object value, int type) {
// 			this.value = value;
// 			this.type = type;
// 		}
// 	}
// }


import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import es.alrocar.map.vector.provider.driver.impl.JSONDriver;
import es.alrocar.map.vector.provider.geom.AttributePoint;
import es.prodevelop.gvsig.mini.geom.Extent;
import es.prodevelop.gvsig.mini.geom.Point;
			// TODO Auto-generated catch block
			// e.printStackTrace();
		}

		try {
			actorId = object.getJSONObject("actor").getString("id");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			// e.printStackTrace();
		}

		try {
			geocode = object.getString("geocode");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			// e.printStackTrace();
		}

		if (geocode == null)
			return null;

		if (!geocode.contains(" "))
			return null;

		String[] coords = geocode.split(" ");

		p.setX(Double.valueOf(coords[1]));
		p.setY(Double.valueOf(coords[0]));
		p.addField("title", title, AttributePoint.Attribute.TYPE_STRING);
		p.addField("published", published, AttributePoint.Attribute.TYPE_DATE);
// Path: es.alrocar.map.vector/src/main/java/es/alrocar/map/vector/provider/driver/impl/JSONDriver.java
// public abstract class JSONDriver extends BaseDriver {
// 
// 	protected String[] keys;
// 
// 	public ArrayList getData(int[] tile, Extent boundingBox,
// 			Cancellable cancellable, int zoom) {
// 
// 		String query = null;
// 		String jsonTweets = null;
// 		JSONTokener tokener = null;
// 		JSONObject o = null;
// 
// 		ArrayList points = new ArrayList();
// 		try {
// 			if (cancellable != null && cancellable.getCanceled())
// 				return null;
// 
// 			query = buildQuery(boundingBox);
// 
// 			jsonTweets = download(query);
// 
// 			tokener = new JSONTokener(jsonTweets);
// 
// 			o = new JSONObject(tokener);
// 
// 			points = processJSON(o, cancellable);
// 
// 		} catch (Exception e) {
// 			// TODO Auto-generated catch block
// 			e.printStackTrace();
// 			return points;
// 		} finally {
// 			tokener = null;
// 			jsonTweets = null;
// 			query = null;
// 			o = null;
// 		}
// 		return points;
// 	}
// 
// 	public ArrayList processJSON(JSONObject o, Cancellable cancellable)
// 			throws JSONException {
// 		ArrayList points = new ArrayList();
// 		JSONArray results = getJSONArray(o);
// 
// 		final int size = results.length();
// 
// 		JSONObject object;
// 		for (int i = 0; i < size; i++) {
// 			try {
// 				if (cancellable != null && cancellable.getCanceled())
// 					return null;
// 				object = results.getJSONObject(i);
// 				Point f = processResult(object);
// 				if (f != null)
// 					points.add(f);
// 			} catch (Exception e) {
// 				e.printStackTrace();
// 			}
// 		}
// 		return points;
// 	}
// 
// 	public abstract String buildQuery(Extent boundingBox);
// 
// 	public abstract JSONArray getJSONArray(JSONObject o) throws JSONException;
// 
// 	public abstract Point processResult(JSONObject object) throws JSONException;
// }
// 
// Path: es.alrocar.map.vector/src/main/java/es/alrocar/map/vector/provider/geom/AttributePoint.java
// public class AttributePoint extends Point {
// 
// 	private HashMap fields = new HashMap();
// 
// 	public void addField(String key, Object value, int type) {
// 		fields.put(key, new Attribute(value, type));
// 	}
// 
// 	public Attribute getAttribute(String key) {
// 		return (Attribute) fields.get(key);
// 	}
// 
// 	public HashMap getAttributes() {
// 		return fields;
// 	}
// 
// 	public static class Attribute {
// 
// 		public final static int TYPE_UNKNOWN = -1;
// 		public final static int TYPE_STRING = 0;
// 		public final static int TYPE_INT = 1;
// 		public final static int TYPE_DOUBLE = 2;
// 		public final static int TYPE_LIST_STRING = 3;
// 		public final static int TYPE_LIST_INT = 4;
// 		public final static int TYPE_LIST_DOUBLE = 5;
// 		public final static int TYPE_URL = 6;
// 		public final static int TYPE_PHONE = 7;
// 		public final static int TYPE_DATE = 8;
// 
// 		public int type = TYPE_UNKNOWN;
// 		public Object value;
// 
// 		public Attribute(Object value, int type) {
// 			this.value = value;
// 			this.type = type;
// 		}
// 	}
// }


// Path: es.alrocar.map.vector/src/main/java/es/alrocar/map/vector/provider/driver/buzz/BuzzDriverV1.java
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import es.alrocar.map.vector.provider.driver.impl.JSONDriver;
import es.alrocar.map.vector.provider.geom.AttributePoint;
import es.prodevelop.gvsig.mini.geom.Extent;
import es.prodevelop.gvsig.mini.geom.Point;

			// TODO Auto-generated catch block
			// e.printStackTrace();
		}

		try {
			actorId = object.getJSONObject("actor").getString("id");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			// e.printStackTrace();
		}

		try {
			geocode = object.getString("geocode");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			// e.printStackTrace();
		}

		if (geocode == null)
			return null;

		if (!geocode.contains(" "))
			return null;

		String[] coords = geocode.split(" ");

		p.setX(Double.valueOf(coords[1]));
		p.setY(Double.valueOf(coords[0]));
		p.addField("title", title, AttributePoint.Attribute.TYPE_STRING);
		p.addField("published", published, AttributePoint.Attribute.TYPE_DATE);
		p.addField("id", id, AttributePoint.Attribute.TYPE_STRING);