2010-05-11 20:37:48 +00:00
|
|
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
|
|
|
|
|
|
|
package edu.cornell.mannlib.vitro.webapp.view;
|
|
|
|
|
|
|
|
import org.apache.commons.logging.Log;
|
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
|
|
|
|
|
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
2010-05-27 14:20:59 +00:00
|
|
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Params;
|
2010-05-28 21:44:59 +00:00
|
|
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Route;
|
2010-05-11 20:37:48 +00:00
|
|
|
|
|
|
|
public class VClassView extends ViewObject {
|
|
|
|
|
|
|
|
private static final Log log = LogFactory.getLog(VClassView.class.getName());
|
2010-05-28 21:44:59 +00:00
|
|
|
private static final String PATH = Route.INDIVIDUAL_LIST.path();
|
2010-05-11 20:37:48 +00:00
|
|
|
|
|
|
|
private VClass vclass;
|
|
|
|
|
|
|
|
public VClassView(VClass vclass) {
|
|
|
|
this.vclass = vclass;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
return vclass.getName();
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUrl() {
|
2010-05-27 14:20:59 +00:00
|
|
|
return getUrl(PATH, new Params("vclassId", vclass.getURI()));
|
2010-05-11 20:37:48 +00:00
|
|
|
}
|
|
|
|
|
2010-05-21 15:55:26 +00:00
|
|
|
public int getIndividualCount() {
|
2010-05-11 20:37:48 +00:00
|
|
|
return vclass.getEntityCount();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|