public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception {
NamespacedGUID namespacedGUID = new NamespacedGUID(request.getParameter("namespacedGUID"));
TreebaseIDString treebaseIDString = null;
PhyloWSPath phyloWSPath = null;
request.setAttribute("hasWebPage", false);
request.setAttribute("hasNexus", false);
request.setAttribute("hasNeXML", false);
request.setAttribute("hasRdf", false);
try {
treebaseIDString = namespacedGUID.getTreebaseIDString();
} catch ( Exception e ) {
e.printStackTrace();
}
if ( null != treebaseIDString ) {
LOGGER.info("TreeBASE ID String: "+treebaseIDString);
String typePrefix = treebaseIDString.getTypePrefix();
if ( null != typePrefix ) {
LOGGER.info("Type prefix: "+typePrefix);
Class<?> theClass = TreebaseIDString.getClassForPrefix(typePrefix);
if ( null != theClass ) {
LOGGER.info("Class: "+theClass);
if ( theClass.isAssignableFrom(PhyloTree.class)
|| theClass.isAssignableFrom(Matrix.class)
|| theClass.isAssignableFrom(Study.class) ) {
request.setAttribute("hasWebPage", true);
request.setAttribute("hasNexus", true);
request.setAttribute("hasNeXML", true);
request.setAttribute("hasRdf", true);
}
phyloWSPath = new PhyloWSPath(theClass.getPackage(),namespacedGUID);
TBPersistable theObject = getStudyService().findByID(theClass, treebaseIDString.getId());
if ( null != theObject ) {
Study theContainingStudy = theObject.getStudy();
if (null != theContainingStudy && ! theContainingStudy.isPublished()) {