Class DatasetRepository
- java.lang.Object
-
- de.narimo.georepo.server.repository.ParentDatasetRepository
-
- de.narimo.georepo.server.repository.DatasetRepository
-
public class DatasetRepository extends ParentDatasetRepository
-
-
Constructor Summary
Constructors Constructor Description DatasetRepository()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>addTags(int layerId, int gfid, List<String> tags)Add one or multiple tags for a gfid on a layer.static booleancheckAuthTableExists(int layerId)static booleancheckTagTableExists(int layerId)static voidcreateAuthTable(String authTableName)Creates the auth table for the gd_x tablestatic voidcreateTagTable(int layerId)static booleandoesFeatureExist(int layerId, int gfid)Checks, whether a feature with gfid exists for the given layer.static List<String>getCategories(int layerId, String optCategoryColumn)static org.geotools.feature.FeatureCollectiongetDatasetHistory(int layerId, long userId, int gfid)Retrieves the history datasets of a feature for a given gfid ordered by insertedat date descending (newest first).static org.geotools.feature.FeatureCollectiongetDatasets(int layerId, long userId, boolean asAdmin)static intgetLayerId(String workspace, String featureType)static List<String>getTags(int layerId)static Map<Integer,List<String>>getTagsByGfid(int layerId)static List<String>removeTags(int layerId, int gfid, List<String> tags)Remove one or multiple tags from a gfid on a layer.-
Methods inherited from class de.narimo.georepo.server.repository.ParentDatasetRepository
checkHistoryTableExists, createSimpleFeatures, detectGeometryType, getCreator
-
-
-
-
Method Detail
-
getDatasets
public static org.geotools.feature.FeatureCollection getDatasets(int layerId, long userId, boolean asAdmin) throws SQLException- Throws:
SQLException
-
doesFeatureExist
public static boolean doesFeatureExist(int layerId, int gfid) throws SQLExceptionChecks, whether a feature with gfid exists for the given layer.- Parameters:
layerId-gfid-- Returns:
- Throws:
SQLExceptionIOException
-
getCategories
public static List<String> getCategories(int layerId, String optCategoryColumn) throws SQLException
- Throws:
SQLException
-
getTags
public static List<String> getTags(int layerId) throws SQLException
- Throws:
SQLException
-
getTagsByGfid
public static Map<Integer,List<String>> getTagsByGfid(int layerId) throws SQLException
- Throws:
SQLException
-
checkTagTableExists
public static boolean checkTagTableExists(int layerId) throws SQLException- Throws:
SQLException
-
checkAuthTableExists
public static boolean checkAuthTableExists(int layerId) throws SQLException- Throws:
SQLException
-
addTags
public static List<String> addTags(int layerId, int gfid, List<String> tags) throws SQLException
Add one or multiple tags for a gfid on a layer.- Parameters:
layerId-gfid-tags-- Returns:
- Throws:
SQLException
-
removeTags
public static List<String> removeTags(int layerId, int gfid, List<String> tags) throws SQLException
Remove one or multiple tags from a gfid on a layer.- Parameters:
layerId-gfid-tags-- Returns:
- Throws:
SQLException
-
createTagTable
public static void createTagTable(int layerId) throws SQLException- Throws:
SQLException
-
getDatasetHistory
public static org.geotools.feature.FeatureCollection getDatasetHistory(int layerId, long userId, int gfid) throws SQLExceptionRetrieves the history datasets of a feature for a given gfid ordered by insertedat date descending (newest first).- Parameters:
layerId-userId-- Returns:
- Throws:
SQLException
-
createAuthTable
public static void createAuthTable(String authTableName) throws SQLException, IOException
Creates the auth table for the gd_x table- Parameters:
authTableName-- Throws:
SQLExceptionIOException
-
-