From 6bcea05ef4b13de491d5c1bcaa0e90b55ffea34a Mon Sep 17 00:00:00 2001 From: Dan Galdi Date: Mon, 29 Jan 2024 10:42:01 -0500 Subject: [PATCH] Use new view --- .../services/jbrowse/JBrowseUserDatasetsService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Service/src/main/java/org/apidb/apicommon/service/services/jbrowse/JBrowseUserDatasetsService.java b/Service/src/main/java/org/apidb/apicommon/service/services/jbrowse/JBrowseUserDatasetsService.java index 393f640af..929d1a15e 100644 --- a/Service/src/main/java/org/apidb/apicommon/service/services/jbrowse/JBrowseUserDatasetsService.java +++ b/Service/src/main/java/org/apidb/apicommon/service/services/jbrowse/JBrowseUserDatasetsService.java @@ -44,7 +44,7 @@ public class JBrowseUserDatasetsService extends UserService { private static final Logger LOG = Logger.getLogger(JBrowseUserDatasetsService.class); private static final String VDI_DATASET_DIR_KEY = "VDI_DATASETS_DIRECTORY"; - private static final String VDI_CONTROL_SCHEMA_KEY ="VDI_CONTROL_SCHEMA"; + private static final String VDI_DATA_SCHEMA_KEY ="VDI_DATA_SCHEMA"; public JBrowseUserDatasetsService(@PathParam(USER_ID_PATH_PARAM) String uid) { super(uid); @@ -152,7 +152,7 @@ private List fetchTracksFromFilesystem(VDIDatasetReference vdiData } private boolean datasetBelongsToUser(long userID, String datasetID) { - final String schema = getWdkModel().getProperties().get(VDI_CONTROL_SCHEMA_KEY); + final String schema = getWdkModel().getProperties().get(VDI_DATA_SCHEMA_KEY); String sql = String.format( "SELECT user_dataset_id FROM %s.dataset_availability da WHERE da.user_id = ? AND da.user_dataset_id = ?", schema.toLowerCase(Locale.ROOT) @@ -172,9 +172,9 @@ private boolean datasetBelongsToUser(long userID, String datasetID) { * @return List of visible datasets. */ private List queryVisibleDatasets(long userID) { - final String schema = getWdkModel().getProperties().get(VDI_CONTROL_SCHEMA_KEY); + final String schema = getWdkModel().getProperties().get(VDI_DATA_SCHEMA_KEY); String sql = String.format( - "SELECT user_dataset_id, (SELECT 'BigWig' FROM DUAL) type_name, (SELECT 'name' FROM DUAL) name, (SELECT 'description' FROM DUAL) description FROM %s.dataset_availability da WHERE da.user_id = ?", + "SELECT user_dataset_id, type, name, description FROM %s.dataset_availability da WHERE da.user_id = ?", schema.toLowerCase(Locale.ROOT) ); return new SQLRunner(getWdkModel().getAppDb().getDataSource(), sql)