001 package de.kiezatlas.service;
002
003 import de.kiezatlas.GeoObjects;
004 import de.kiezatlas.GroupedGeoObjects;
005
006 import de.deepamehta.core.RelatedTopic;
007 import de.deepamehta.core.Topic;
008 import de.deepamehta.core.service.PluginService;
009 import de.deepamehta.core.service.ResultList;
010
011 import java.util.List;
012
013
014
015 public interface KiezatlasService extends PluginService {
016
017 /**
018 * Returns the "Kiezatlas Website" topic the given geomap is assigned to.
019 */
020 Topic getWebsite(long geomapId);
021
022 /**
023 * Returns the facet types assigned to the given Kiezatlas Website.
024 */
025 ResultList<RelatedTopic> getFacetTypes(long websiteId);
026
027 /**
028 * Returns all Kiezatlas criteria existing in the DB. ### Experimental
029 * A Kiezatlas criteria is a topic type whose URI starts with <code>ka2.criteria.</code>
030 * but does not end with <code>.facet</code>.
031 */
032 List<Topic> getAllCriteria();
033
034 /**
035 * Returns all Geo Objects assigned to the given geomap.
036 */
037 List<Topic> getGeoObjects(long geomapId);
038
039 /**
040 * Returns all Geo Objects assigned to the given category.
041 */
042 List<RelatedTopic> getGeoObjectsByCategory(long categoryId);
043
044 /**
045 * Searches for Geo Objects whose name match the search term (case-insensitive substring search).
046 *
047 * @param clock The logical clock value send back to the client (contained in GeoObjects).
048 * Allows the client to order asynchronous responses.
049 */
050 GeoObjects searchGeoObjects(String searchTerm, long clock);
051
052 /**
053 * Searches for categories that match the search term (case-insensitive substring search)
054 * and returns all Geo Objects of those categories, grouped by category.
055 *
056 * @param clock The logical clock value send back to the client (contained in GroupedGeoObjects).
057 * Allows the client to order asynchronous responses.
058 */
059 GroupedGeoObjects searchCategories(String searchTerm, long clock);
060 }