de.deepamehta.plugins.geomaps.model
Class Geomap
java.lang.Object
de.deepamehta.plugins.geomaps.model.Geomap
- All Implemented Interfaces:
- JSONEnabled, Iterable<TopicModel>
public class Geomap
- extends Object
- implements Iterable<TopicModel>, JSONEnabled
A geomap model: a collection of Geo Coordinate topic models.
Features:
- load from DB (by constructor).
- Serialization to JSON.
geomapTopic
protected Topic geomapTopic
geoCoords
protected Map<Long,TopicModel> geoCoords
dms
protected DeepaMehtaService dms
logger
private Logger logger
Geomap
public Geomap(long geomapId,
DeepaMehtaService dms)
- Loads a topicmap from the DB.
getId
public long getId()
containsTopic
public boolean containsTopic(long geoCoordId)
toJSON
public org.codehaus.jettison.json.JSONObject toJSON()
- Specified by:
toJSON
in interface JSONEnabled
iterator
public Iterator<TopicModel> iterator()
- Specified by:
iterator
in interface Iterable<TopicModel>
toString
public String toString()
- Overrides:
toString
in class Object
fetchGeoCoordinates
private void fetchGeoCoordinates()
fetchGeoCoordinates
private ResultList<RelatedTopic> fetchGeoCoordinates(Topic geomapTopic)
Copyright © 2015. All Rights Reserved.