public class Geomap extends Object implements Iterable<TopicModel>, JSONEnabled
Features: - load from DB (by constructor). - Serialization to JSON. ### TODO: rename to GeomapViewmodel
Modifier and Type | Field and Description |
---|---|
protected CoreService |
dmx |
protected Map<Long,TopicModel> |
geoCoords |
protected Topic |
geomapTopic |
private Logger |
logger |
Constructor and Description |
---|
Geomap(long geomapId,
CoreService dmx)
Loads a topicmap from the DB.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsTopic(long geoCoordId) |
private void |
fetchGeoCoordinates() |
private List<RelatedTopic> |
fetchGeoCoordinates(Topic geomapTopic) |
long |
getId() |
Iterator<TopicModel> |
iterator() |
org.codehaus.jettison.json.JSONObject |
toJSON() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected Topic geomapTopic
protected Map<Long,TopicModel> geoCoords
protected CoreService dmx
public Geomap(long geomapId, CoreService dmx)
public long getId()
public boolean containsTopic(long geoCoordId)
public org.codehaus.jettison.json.JSONObject toJSON()
toJSON
in interface JSONEnabled
public Iterator<TopicModel> iterator()
iterator
in interface Iterable<TopicModel>
private void fetchGeoCoordinates()
private List<RelatedTopic> fetchGeoCoordinates(Topic geomapTopic)
Copyright © 2018. All Rights Reserved.