/** * Get the summary view of the logical table. * * @param logicalTable Logical table to get the view of * @param uriInfo UriInfo of the request * * @return Summary view of the logical table */ public static Map<String, String> getLogicalTableSummaryView(LogicalTable logicalTable, UriInfo uriInfo) { Map<String, String> resultRow = new LinkedHashMap<>(); resultRow.put("category", logicalTable.getCategory()); resultRow.put("name", logicalTable.getName()); resultRow.put("longName", logicalTable.getLongName()); resultRow.put("granularity", logicalTable.getGranularity().getName()); resultRow.put("uri", getLogicalTableUrl(logicalTable, uriInfo)); return resultRow; }
protected static Map<String, Object> getLogicalTableFullView(LogicalTable logicalTable, UriInfo uriInfo) { Map<String, Object> resultRow = new LinkedHashMap<>(); resultRow.put("category", logicalTable.getCategory()); resultRow.put("name", logicalTable.getName()); resultRow.put("longName", logicalTable.getLongName());
LogicalTable logicalTable = tablesApiRequest.getTable(); return Stream.of( new SimpleImmutableEntry<>("category", logicalTable.getCategory()), new SimpleImmutableEntry<>("name", logicalTable.getName()), new SimpleImmutableEntry<>("longName", logicalTable.getLongName()),
/** * Method to provide metadata of the table. * * @param logicalTable Logical Table Ex: Network, SpaceId * @param uriInfo Uri information to construct the uri's * * @return Meta data details of the given table */ @Override public TableView formatTable(LogicalTable logicalTable, UriInfo uriInfo) { TableView resultRow = new TableView(); resultRow.put("name", logicalTable.getName()); resultRow.put("longName", logicalTable.getLongName()); resultRow.put("description", logicalTable.getDescription()); resultRow.put("category", logicalTable.getCategory()); return resultRow; }