diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/legacysearch/MetadataResultSetUtil.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/legacysearch/MetadataResultSetUtil.java index 8d3b367..6358534 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/legacysearch/MetadataResultSetUtil.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/legacysearch/MetadataResultSetUtil.java @@ -33,6 +33,7 @@ public Result mapContinuousMetadata(ResultSet rs) throws SQLException { String description = getDescription(rs); String parentName = getParentName(rs); String parentDisplay = getParentDisplay(rs); + String dsFullName = getDatasetFullName(rs); String max = String.valueOf(jsonBlobParser.parseMax(rs.getString("values"))); String min = String.valueOf(jsonBlobParser.parseMin(rs.getString("values"))); @@ -41,8 +42,8 @@ public Result mapContinuousMetadata(ResultSet rs) throws SQLException { rs.getString("stigmatized"), rs.getString("display"), description, min, rs.getString("conceptPath"), parentName, rs.getString("conceptPath"), rs.getString("name"), parentDisplay, description, // changed "{}", "", parentName, max, description, rs.getString("dataset"), hashedVarId, rs.getString("conceptType"), rs.getString("name"), - rs.getString("dataset"), rs.getString("stigmatized"), rs.getString("display"), rs.getString("studyAcronym"), - rs.getString("dsFullName"), parentName, parentDisplay, rs.getString("conceptPath"), min, max + rs.getString("dataset"), rs.getString("stigmatized"), rs.getString("display"), rs.getString("studyAcronym"), dsFullName, + parentName, parentDisplay, rs.getString("conceptPath"), min, max ); return new Result( metadata, jsonBlobParser.parseValues(rs.getString("values")), rs.getString("dataset"), parentName, rs.getString("name"), false, @@ -55,13 +56,14 @@ public Result mapCategoricalMetadata(ResultSet rs) throws SQLException { String description = getDescription(rs); String parentName = getParentName(rs); String parentDisplay = getParentDisplay(rs); + String dsFullName = getDatasetFullName(rs); CategoricalMetadata metadata = new CategoricalMetadata( rs.getString("stigmatized"), rs.getString("display"), description, "", rs.getString("conceptPath"), parentName, - rs.getString("conceptPath"), rs.getString("name"), parentDisplay, description, // changed - "{}", "", parentName, "", description, rs.getString("dataset"), hashedVarId, rs.getString("conceptType"), rs.getString("name"), - rs.getString("dataset"), rs.getString("stigmatized"), rs.getString("display"), rs.getString("studyAcronym"), - rs.getString("dsFullName"), parentName, parentDisplay, rs.getString("conceptPath") + rs.getString("conceptPath"), rs.getString("name"), parentDisplay, description, "{}", "", parentName, "", description, + rs.getString("dataset"), hashedVarId, rs.getString("conceptType"), rs.getString("name"), rs.getString("dataset"), + rs.getString("stigmatized"), rs.getString("display"), rs.getString("studyAcronym"), dsFullName, parentName, parentDisplay, + rs.getString("conceptPath") ); return new Result( @@ -70,6 +72,8 @@ public Result mapCategoricalMetadata(ResultSet rs) throws SQLException { ); } + + private static String hashVarId(String hpdsPath) { String hashedVarId = ""; try { @@ -106,4 +110,9 @@ private String getParentName(ResultSet rs) throws SQLException { private String getDescription(ResultSet rs) throws SQLException { return StringUtils.hasLength(rs.getString("description")) ? rs.getString("description") : ""; } + + private String getDatasetFullName(ResultSet rs) throws SQLException { + return StringUtils.hasLength(rs.getString("dsFullName")) ? rs.getString("dsFullName") : ""; + } + }