package org.sagebionetworks.web.client.widget.entity.tabs;

import java.util.Collections;
import java.util.List;

import org.sagebionetworks.repo.model.Entity;
import org.sagebionetworks.repo.model.EntityType;
import org.sagebionetworks.repo.model.table.Dataset;
import org.sagebionetworks.web.client.DisplayConstants;
import org.sagebionetworks.web.client.PortalGinInjector;
import org.sagebionetworks.web.client.place.Synapse.EntityArea;

import com.google.inject.Inject;

/**
 * Tab that shows Datasets only.
 */
public class DatasetsTab extends AbstractTablesTab {

	public static final String DATASETS_HELP = "Create and share a collection of File versions using a Dataset.";
	public static final String DATASETS_HELP_URL = ""; // WebConstants.DOCS_URL + "Tables.2011038095.html"; // TODO

	@Inject
	public DatasetsTab(Tab tab, PortalGinInjector ginInjector) {
		super(tab, ginInjector);
		this.tab = tab;
		this.ginInjector = ginInjector;
		tab.configure(DisplayConstants.DATASETS, "dataset", DATASETS_HELP, "", EntityArea.DATASETS);
	}

	@Override
	protected EntityArea getTabArea() {
		return EntityArea.DATASETS;
	}

	@Override
	protected String getTabDisplayName() {
		return DisplayConstants.DATASETS;
	}

	@Override
	protected List<EntityType> getTypesShownInList() {
		return Collections.singletonList(EntityType.dataset);
	}

	@Override
	protected boolean isEntityShownInTab(Entity entity) {
		return entity instanceof Dataset;
	}


}

@@ -432,16 +432,68 @@
 ityArea;
+%0Aimport org.sagebionetworks.web.shared.WebConstants;
 %0A%0Aimport
@@ -777,15 +777,8 @@
 RL =
- %22%22; //
  Web
@@ -803,40 +803,34 @@
  + %22
-Tables.2011038095
+Datasets.2611281979
 .html%22;
- // TODO
 %0A%0A%09@
@@ -1050,10 +1050,25 @@
 LP, 
-%22%22
+DATASETS_HELP_URL
 , En

Update docs link