/** * Get the summary view of the logical metric. * * @param logicalMetric Logical metric to get the view of * @param uriInfo UriInfo of the request * * @return Summary view of the logical metric */ public static Map<String, String> getLogicalMetricSummaryView(LogicalMetric logicalMetric, UriInfo uriInfo) { Map<String, String> resultRow = new LinkedHashMap<>(); resultRow.put("category", logicalMetric.getCategory()); resultRow.put("name", logicalMetric.getName()); resultRow.put("longName", logicalMetric.getLongName()); resultRow.put("type", logicalMetric.getType()); resultRow.put("uri", getLogicalMetricUrl(logicalMetric, uriInfo)); return resultRow; }
/** * Get the full view of the logical metric. * * @param logicalMetric Logical metric to get the view of * @param logicalTableDictionary Logical Table Dictionary to look up the logical tables this metric is on * @param uriInfo UriInfo of the request * * @return Full view of the logical metric */ public static Map<String, Object> getLogicalMetricFullView( LogicalMetric logicalMetric, LogicalTableDictionary logicalTableDictionary, UriInfo uriInfo ) { Map<String, Object> resultRow = new LinkedHashMap<>(); resultRow.put("category", logicalMetric.getCategory()); resultRow.put("name", logicalMetric.getName()); resultRow.put("longName", logicalMetric.getLongName()); resultRow.put("description", logicalMetric.getDescription()); resultRow.put( "tables", TablesServlet.getLogicalTableListSummaryView( logicalTableDictionary.findByLogicalMetric(logicalMetric), uriInfo ) ); return resultRow; }