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 booleancheckAuthTableExists(int layerId)static voidcreateAuthTable(String authTableName)Creates the auth table for the gd_x tablestatic voidcreateHistoryTable(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.FeatureCollectiongetFeatures(int layerId, Integer gfid, boolean asAdmin)static intgetLayerId(String workspace, String featureType)static List<FeatureType>getLayerTitles(String dataWorkspace, List<String> featureTypes)static voidmain(String[] args)-
Methods inherited from class de.narimo.georepo.server.repository.ParentDatasetRepository
checkHistoryTableExists, createSimpleFeatures, detectGeometryType, getColumnFeatureTypes, getColumnTypes, getCreatorName, tableExists
-
-
-
-
Method Detail
-
getFeatures
public static org.geotools.feature.FeatureCollection getFeatures(int layerId, Integer gfid, 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
-
checkAuthTableExists
public static boolean checkAuthTableExists(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
Creates the auth table for the gd_x table- Parameters:
authTableName-- Throws:
SQLExceptionIOException
-
createHistoryTable
public static void createHistoryTable(int layerId) throws SQLException- Throws:
SQLException
-
getLayerTitles
public static List<FeatureType> getLayerTitles(String dataWorkspace, List<String> featureTypes) throws SQLException
- Throws:
SQLException
-
main
public static void main(String[] args)
-
-