Skip to content
Browse files

Changes to make the BII handle external URIs better. Requires further…

… testing by @proccaserra #49
  • Loading branch information...
1 parent d7ebd94 commit 4955750e703f16e646e7539ee97f32421754e6e7 @eamonnmag eamonnmag committed Feb 19, 2012
View
69 model/src/main/java/uk/ac/ebi/bioinvindex/search/hibernatesearch/bridge/AssayBridge.java
@@ -47,10 +47,8 @@
import org.apache.lucene.document.Field;
import org.hibernate.search.bridge.FieldBridge;
import org.hibernate.search.bridge.LuceneOptions;
-import uk.ac.ebi.bioinvindex.model.Annotation;
import uk.ac.ebi.bioinvindex.model.AssayResult;
import uk.ac.ebi.bioinvindex.model.processing.Assay;
-import uk.ac.ebi.bioinvindex.model.term.AnnotationTypes;
import uk.ac.ebi.bioinvindex.model.xref.Xref;
import uk.ac.ebi.bioinvindex.search.hibernatesearch.StudyBrowseField;
import uk.ac.ebi.bioinvindex.utils.datasourceload.DataLocationManager;
@@ -81,31 +79,7 @@ public void set(String s, Object o, Document document, LuceneOptions luceneOptio
dataLocationManager.setEntityManager(entityManager);
for (Assay assay : assays) {
-
- if (assay.getTechnologyName().equals("mass spectrometry")) {
- Collection<AssayResult> assayResults = ProcessingUtils.findAssayResultsFromAssay(assay);
-
- String fileLink = dataLocationManager.getDataLocationLink(assay.getMeasurement().getName(), assay.getTechnologyName(), assay.getStudy().getObfuscationCode(),
- AnnotationTypes.GENERIC_DATA_FILE_LINK);
-
- System.out.println("File link: " + fileLink);
-
- String pathLink = dataLocationManager.getDataLocationLink(assay.getMeasurement().getName(), assay.getTechnologyName(), assay.getStudy().getObfuscationCode(),
- AnnotationTypes.GENERIC_DATA_FILE_PATH);
-
- System.out.println("Path link: " + pathLink);
-
- for (AssayResult result : assayResults) {
- for (Annotation annotation : result.getData().getAnnotation("metaboliteFile")) {
- System.out.printf("Type: %s -> Value: %s\n", annotation.getType().getValue(), annotation.getText());
-
- MetaboLightsIndexer.indexMetaboliteFile(pathLink.replace("${study-acc}",
- assay.getStudy().getObfuscationCode()) + annotation.getText(),
- document,
- luceneOptions);
- }
- }
- }
+ Collection<AssayResult> assayResults = ProcessingUtils.findAssayResultsFromAssay(assay);
String type = buildType(assay);
@@ -114,19 +88,11 @@ public void set(String s, Object o, Document document, LuceneOptions luceneOptio
assayTypeToInfo.put(type, info);
}
- for (Xref xref : assay.getXrefs()) {
- System.out.println("Adding XREF to AssayTypeInfo: " + xref.getSource().getAcc() + "(" + xref.getAcc() + ") for " + type);
-
- StringBuilder sb = new StringBuilder();
- sb.append("xref(").append(xref.getAcc()).append("->");
- sb.append(xref.getSource().getAcc()).append(")");
-
- assayTypeToInfo.get(type).addAccession(sb.toString());
- }
+ createAssayExternalLinks(assayTypeToInfo, assayResults, type);
+ createXrefs(assayTypeToInfo, assay, type);
assayTypeToInfo.get(type).increaseCount();
}
- // each data link should be stored perhaps, or at least whatever is required to make it display in the Study page.
for (String type : assayTypeToInfo.keySet()) {
StringBuilder fullInfo = new StringBuilder();
@@ -160,6 +126,35 @@ public void set(String s, Object o, Document document, LuceneOptions luceneOptio
entityManager.close();
}
+ private void createXrefs(Map<String, AssayTypeInfo> assayTypeToInfo, Assay assay, String type) {
+ for (Xref xref : assay.getXrefs()) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("xref(").append(xref.getAcc()).append("->");
+ sb.append(xref.getSource().getAcc()).append(")");
+ assayTypeToInfo.get(type).addAccession(sb.toString());
+ }
+ }
+
+ private void createAssayExternalLinks(Map<String, AssayTypeInfo> assayTypeToInfo, Collection<AssayResult> assayResults, String type) {
+ Set<String> addedLinks = new HashSet<String>();
+ for (AssayResult result : assayResults) {
+ // we're only looking at links...should accommodate webdav etc. too
+ //todo remove this after testing
+ if (!result.getData().getName().matches("(http|ftp|https).*") && result.getData().getName().contains("/")) {
+ // we only store the folder since that will take us to multiple file locations. Otherwise we'd have too
+ // many individual links pointing to the same place.
+ String folder = result.getData().getName().substring(0, result.getData().getName().lastIndexOf("/"));
+ if (!addedLinks.contains(folder)) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("link(").append(folder).append("->");
+ sb.append(result.getData().getType().getName()).append(")");
+ addedLinks.add(folder);
+ assayTypeToInfo.get(type).addAccession(sb.toString());
+ }
+ }
+ }
+ }
+
private String buildType(Assay assay) {
return assay.getMeasurement().getName() + "|" + assay.getTechnologyName();
}
View
3 model/src/main/java/uk/ac/ebi/bioinvindex/utils/datasourceload/Repository.java
@@ -11,7 +11,8 @@
public enum Repository {
PRIDE("^[0-9]+","pride"), ARRAYEXPRESS("^(e-).*", "arrayexpress"), GEO("^[(gse)|(ges)]*[0-9]+", "geo"),
- ENA("^[(sra)|(ena)]*[0-9]+","embl-bank", "ena", "ebi/ena"), GENERIC("generic", "generic", "none", "generic proteomic location", "generic microarray location");
+ ENA("^[(sra)|(ena)]*[0-9]+","embl-bank", "ena", "ebi/ena"),
+ GENERIC("generic", "generic", "none", "generic proteomic location", "generic microarray location");
private String startString;
View
9 services/src/main/java/uk/ac/ebi/bioinvindex/services/SourceURLResolverImpl.java
@@ -65,6 +65,8 @@
@AutoCreate
public class SourceURLResolverImpl implements SourceURLResolver {
+ public static final String EXTERNAL_LINK_PATTERN = "(http|ftp|https).*";
+
private static Cache<String, String> cache = new BIICache<String, String>();
private static final Log log = LogFactory.getLog(SourceURLResolverImpl.class);
@@ -74,16 +76,21 @@
public String getRawDataURL(String measurement, String technology, String accession) {
try {
+ if (checkIsExternalLink(accession)) return accession;
return getDataURL(measurement, technology, accession, AnnotationTypes.RAW_DATA_FILE_LINK);
} catch (Exception e) {
log.error("Unable to resolve Raw data URL");
return "";
}
}
+ private boolean checkIsExternalLink(String accession) {
+ return accession.matches(EXTERNAL_LINK_PATTERN);
+ }
+
public String getProcessedDataURL(String measurement, String technology, String accession) {
try {
-
+ if (checkIsExternalLink(accession)) return accession;
return getDataURL(measurement, technology, accession, AnnotationTypes.PROCESSED_DATA_FILE_LINK);
} catch (Exception e) {
log.error("Unable to resolve Processed data URL");
View
20 services/src/main/java/uk/ac/ebi/bioinvindex/services/StudyBeanImpl.java
@@ -94,23 +94,11 @@
@In(required = false)
private StudyIndexLocatorImpl studyIndexLocator;
-
- private String organism;
-
- private String design;
-
- private Map<String, List<String>> factorsToValues;
-
- private Map<String, List<String>> characteristicsToValues;
-
- private List<Contact> contacts;
-
- private List<AssayGroupInfo> assayInfos;
-
- private String studyId;
-
+ private String studyId, organism, design;
private Collection<Investigation> investigations;
-
+ private List<AssayGroupInfo> assayInfos;
+ private List<Contact> contacts;
+ private Map<String, List<String>> characteristicsToValues, factorsToValues;
private List<String> relatedStudies;
public StudyBeanImpl() {
View
4 services/src/main/java/uk/ac/ebi/bioinvindex/services/browse/BrowseStudyBeanImpl.java
@@ -354,12 +354,12 @@ private AssayInfoBean createAssayInfoBean(AssayInfoBean assayInfoBean, String as
private DataLink createDBLink(String dbLinkRepresentation) {
DataLink link = new DataLink();
- dbLinkRepresentation = dbLinkRepresentation.replace("xref(", "").replace(")", "");
+ dbLinkRepresentation = dbLinkRepresentation.replace("xref(", "").replace("link(", "").replace(")", "");
if (dbLinkRepresentation.contains("->")) {
String[] dbLinkParts = dbLinkRepresentation.split("->");
link.setAcc(dbLinkParts[0]);
- link.setSourceName(dbLinkParts[1]);
+ link.setSourceName(dbLinkParts[1].toUpperCase());
}
return link;
View
172 services/src/main/java/uk/ac/ebi/bioinvindex/services/compound/ChEBICompound.java
@@ -1,172 +0,0 @@
-package uk.ac.ebi.bioinvindex.services.compound;
-
-/*
- * __________
- * CREDITS
- * __________
- *
- * Team page: http://isatab.sf.net/
- * - Marco Brandizi (software engineer: ISAvalidator, ISAconverter, BII data management utility, BII model)
- * - Eamonn Maguire (software engineer: ISAcreator, ISAcreator configurator, ISAvalidator, ISAconverter, BII data management utility, BII web)
- * - Nataliya Sklyar (software engineer: BII web application, BII model, BII data management utility)
- * - Philippe Rocca-Serra (technical coordinator: user requirements and standards compliance for ISA software, ISA-tab format specification, BII model, ISAcreator wizard, ontology)
- * - Susanna-Assunta Sansone (coordinator: ISA infrastructure design, standards compliance, ISA-tab format specification, BII model, funds raising)
- *
- * Contributors:
- * - Manon Delahaye (ISA team trainee: BII web services)
- * - Richard Evans (ISA team trainee: rISAtab)
- *
- *
- * ______________________
- * Contacts and Feedback:
- * ______________________
- *
- * Project overview: http://isatab.sourceforge.net/
- *
- * To follow general discussion: isatab-devel@list.sourceforge.net
- * To contact the developers: isatools@googlegroups.com
- *
- * To report bugs: http://sourceforge.net/tracker/?group_id=215183&atid=1032649
- * To request enhancements: http://sourceforge.net/tracker/?group_id=215183&atid=1032652
- *
- *
- * __________
- * License:
- * __________
- *
- * This work is licenced under the Creative Commons Attribution-Share Alike 2.0 UK: England & Wales License. To view a copy of this licence, visit http://creativecommons.org/licenses/by-sa/2.0/uk/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
- *
- * __________
- * Sponsors
- * __________
- * This work has been funded mainly by the EU Carcinogenomics (http://www.carcinogenomics.eu) [PL 037712] and in part by the
- * EU NuGO [NoE 503630](http://www.nugo.org/everyone) projects and in part by EMBL-EBI.
- */
-
-import org.jboss.seam.util.Base64;
-
-import javax.imageio.ImageIO;
-import java.util.ArrayList;
-import java.util.List;
-import java.awt.image.RenderedImage;
-import java.awt.image.BufferedImage;
-import java.awt.*;
-import java.io.OutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-
-/**
- * Object to represent results of ChEBI query for use when creating compound page....
- * @author: eamonnmaguire
- * @date Oct 15, 2008
- */
-public class ChEBICompound implements Comparable {
- private static final String CHEBI_URL = "http://www.ebi.ac.uk/chebi/searchId.do?chebiId=";
- private String chebiId;
- private String name;
- private String definitions;
- private String structure;
- private String formula;
- private String imgLoc;
-
- // we also need information about the related studies!
- private List<String> studyAcc;
- private List<String> organsUsedOn;
- private List<String> organismsUsedOn;
-
- /**
- * ChEBICompound constructor
- * @param chebiId - ChEBI ID for the compound
- * @param name - Name of compound
- * @param definitions - Definition of the compound
- * @param structure - A String containing a MDL MolFile representation of the Compound structure for later rendering
- * @param formula - The formula representing the compound
- */
- public ChEBICompound(String chebiId, String name, String definitions,
- String structure, String formula, String imgLoc) {
- this.chebiId = chebiId;
- this.name = name;
- this.definitions = definitions;
- this.structure = structure;
- this.formula = formula;
- this.imgLoc = imgLoc;
-
- organismsUsedOn = new ArrayList<String>();
- organsUsedOn = new ArrayList<String>();
- studyAcc = new ArrayList<String>();
- }
-
- public void addToOrganismsUsed(String organismUsedOn) {
-
- if (!this.organismsUsedOn.contains(organismUsedOn)) {
- this.organismsUsedOn.add(organismUsedOn);
- }
- }
-
- public void addToOrgansUsed(String organUsedOn) {
-
- if (!this.organsUsedOn.contains(organUsedOn)) {
- this.organsUsedOn.add(organUsedOn);
- }
- }
-
- public int compareTo(Object cc) {
- int result = ((ChEBICompound) cc).getName().toLowerCase()
- .compareTo(name.toLowerCase());
-
- if (result < 0) {
- return 1;
- } else if (result > 0) {
- return -1;
- }
-
- return 0;
- }
-
- public String getChebiId() {
- return chebiId;
- }
-
- public static String getChebiUrl() {
- return CHEBI_URL;
- }
-
- public String getDefinitions() {
- return definitions;
- }
-
- public String getFormula() {
- return formula;
- }
-
- public String getName() {
- return name;
- }
-
- public List<String> getOrganismsUsedOn() {
- return organismsUsedOn;
- }
-
- public List<String> getOrgansUsedOn() {
- return organsUsedOn;
- }
-
- public String getStructure() {
- return structure;
- }
-
- public List<String> getStudyAcc() {
- return studyAcc;
- }
-
- public String getImgLoc() {
- return imgLoc;
- }
-
-
-
- public void setStudyAcc(List<String> studyAcc) {
- this.studyAcc = studyAcc;
- }
-}
View
193 services/src/main/java/uk/ac/ebi/bioinvindex/services/compound/ChEBIConnector.java
@@ -1,193 +0,0 @@
-package uk.ac.ebi.bioinvindex.services.compound;
-
-/*
- * __________
- * CREDITS
- * __________
- *
- * Team page: http://isatab.sf.net/
- * - Marco Brandizi (software engineer: ISAvalidator, ISAconverter, BII data management utility, BII model)
- * - Eamonn Maguire (software engineer: ISAcreator, ISAcreator configurator, ISAvalidator, ISAconverter, BII data management utility, BII web)
- * - Nataliya Sklyar (software engineer: BII web application, BII model, BII data management utility)
- * - Philippe Rocca-Serra (technical coordinator: user requirements and standards compliance for ISA software, ISA-tab format specification, BII model, ISAcreator wizard, ontology)
- * - Susanna-Assunta Sansone (coordinator: ISA infrastructure design, standards compliance, ISA-tab format specification, BII model, funds raising)
- *
- * Contributors:
- * - Manon Delahaye (ISA team trainee: BII web services)
- * - Richard Evans (ISA team trainee: rISAtab)
- *
- *
- * ______________________
- * Contacts and Feedback:
- * ______________________
- *
- * Project overview: http://isatab.sourceforge.net/
- *
- * To follow general discussion: isatab-devel@list.sourceforge.net
- * To contact the developers: isatools@googlegroups.com
- *
- * To report bugs: http://sourceforge.net/tracker/?group_id=215183&atid=1032649
- * To request enhancements: http://sourceforge.net/tracker/?group_id=215183&atid=1032652
- *
- *
- * __________
- * License:
- * __________
- *
- * This work is licenced under the Creative Commons Attribution-Share Alike 2.0 UK: England & Wales License. To view a copy of this licence, visit http://creativecommons.org/licenses/by-sa/2.0/uk/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
- *
- * __________
- * Sponsors
- * __________
- * This work has been funded mainly by the EU Carcinogenomics (http://www.carcinogenomics.eu) [PL 037712] and in part by the
- * EU NuGO [NoE 503630](http://www.nugo.org/everyone) projects and in part by EMBL-EBI.
- */
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.security.Identity;
-import uk.ac.ebi.bioinvindex.dao.OntologyEntryDAO;
-import uk.ac.ebi.bioinvindex.dao.StudyDAO;
-import uk.ac.ebi.bioinvindex.dao.ejb3.DaoFactory;
-import uk.ac.ebi.bioinvindex.model.term.OntologyTerm;
-import uk.ac.ebi.bioinvindex.model.term.PropertyValue;
-import uk.ac.ebi.bioinvindex.services.browse.BrowseBean;
-
-import javax.persistence.EntityManager;
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * @author Eamonn Maguire
- * @date Oct 14, 2008
- */
-@Name("taxon")
-@Scope(ScopeType.PAGE)
-@AutoCreate
-public class ChEBIConnector implements BrowseBean {
-
- @In
- private EntityManager entityManager;
-
- @In
- private Identity identity;
-
- private static final Log log = LogFactory.getLog(ChEBIConnector.class);
-
- private OntologyEntryDAO<OntologyTerm> ontologyDAO;
-
- private StudyDAO studyEJB3DAO;
-
- private List<ChEBICompound> compoundSearchResults;
-
- public int getRowCount() {
- try {
- return getCompounds().size();
- } catch (Exception e) {
- return 0;
- }
- }
-
- public List getItemList() {
- return getCompounds(); //To change body of implemented methods use File | Settings | File Templates.
- }
-
- private List<ChEBICompound> getCompounds() {
- try {
- if (compoundSearchResults == null) {
- compoundSearchResults = new ArrayList<ChEBICompound>();
-
- List<OntologyTerm> result = getOntologyDAO().getOntologyEntriesByRefSource("CHEBI");
-
- for (OntologyTerm ontologyTerm : result) {
-
- // need to determine what to search by here since if we have a chebi accession, we can do a more exact
- // search - quicker!
-
- log.info("Getting ChEBI record for : " + ontologyTerm.getAcc());
-
- String formula = "";
-
- // create the image of the compound using the ChEBICompoundImageCreator helper class
- //ToDo: Uncomment the following line when needed, fails when deployed on tc-test
- // String compoundImgLoc = "file:///" + ChEBICompoundImageCreator.createImageForCompound(structure.getStructure(), compound);
-
- String compoundImgLoc = "file:///";
- ChEBICompound chebiCompound = new ChEBICompound(ontologyTerm.getAcc(),
- ontologyTerm.getName(), "",
- "", formula, compoundImgLoc);
-
- List<String> studyAccsForCompound =
- getStudyEJB3DAO().filterFactorsByOntologyTermAndRefNameForUser(ontologyTerm.getAcc(), "CHEBI", identity.getUsername());
-
-
- chebiCompound.setStudyAcc(studyAccsForCompound);
-
-
- for (String studyAcc : studyAccsForCompound) {
-
- List<PropertyValue> organismsUsingCompound = getStudyEJB3DAO().getValuesOfPropertyForStudyAcc(studyAcc,
- "organism");
-
- for (PropertyValue pvi : organismsUsingCompound) {
- chebiCompound.addToOrganismsUsed(pvi.getValue());
- }
- }
-
- if (studyAccsForCompound != null && studyAccsForCompound.size() > 0) {
- compoundSearchResults.add(chebiCompound);
- }
-
- }
-
- }
-
- log.info("Produced " + compoundSearchResults.size() +
- "ChEBICompound objects to display in browser :o) ");
- return compoundSearchResults;
- } catch (Exception e) {
- log.error(e.getMessage());
- return new ArrayList<ChEBICompound>();
- }
-
- }
-
- public OntologyEntryDAO getOntologyDAO() {
- if (ontologyDAO == null) {
- ontologyDAO = DaoFactory.getInstance(entityManager).getOntologyEntryDAO(OntologyTerm.class);
- }
- return ontologyDAO;
- }
-
- public StudyDAO getStudyEJB3DAO() {
- if (studyEJB3DAO == null) {
- studyEJB3DAO = DaoFactory.getInstance(entityManager).getStudyDAO();
- }
- return studyEJB3DAO;
- }
-
-
- public void setEntityManager(EntityManager entityManager) {
- this.entityManager = entityManager;
- }
-
- public List<Image> getImages() {
- List<Image> images = new ArrayList<Image>();
-
- Image i1 = new Image("http://www.googlyfoogly.com/images/AWESOME.jpg", "I'm awesome", "01");
- Image i2 = new Image("http://9.media.tumblr.com/tumblr_kv4399hWWz1qzdr4go1_500.jpg", "I'm awesome too", "02");
- Image i3 = new Image("http://www.googlyfoogly.com/images/AWESOME.jpg", "I'm awesome three", "03");
-
- images.add(i1);
- images.add(i2);
- images.add(i3);
-
- return images;
- }
-}
View
34 services/src/main/java/uk/ac/ebi/bioinvindex/services/compound/Image.java
@@ -1,34 +0,0 @@
-package uk.ac.ebi.bioinvindex.services.compound;
-
-/**
- * Created by the ISA team
- *
- * @author Eamonn Maguire (eamonnmag@gmail.com)
- * <p/>
- * Date: 21/09/2011
- * Time: 20:39
- */
-public class Image {
-
- private String url;
- private String caption;
- private String altTag;
-
- public Image(String url, String caption, String altTag) {
- this.url = url;
- this.caption = caption;
- this.altTag = altTag;
- }
-
- public String getUrl() {
- return url;
- }
-
- public String getCaption() {
- return caption;
- }
-
- public String getAltTag() {
- return altTag;
- }
-}
View
3 web/src/main/webapp/WEB-INF/pages.xml
@@ -16,9 +16,6 @@
<page view-id="/credits.xhtml"/>
- <page view-id="/compound_view.xhtml">
- </page>
-
<page view-id="/clearStudyCache.xhtml"/>
<page view-id="/clearFilterCache.xhtml"/>
View
12 web/src/main/webapp/browse_studies.xhtml
@@ -147,25 +147,25 @@
rows="15"
rowClasses="even"
cellpadding="0" cellspacing="0" style="table-layout:fixed; vertical-align:top;"
- var="bean"
+ var="assayGroup"
value="#{browseStudyBeanModel.itemList}">
<rich:column width="60%" style="vertical-align: top">
- <h:outputLink value="study.seam?studyId=#{bean.acc}" styleClass="green-button">
- <span>#{bean.acc}</span><span>View record</span>
+ <h:outputLink value="study.seam?studyId=#{assayGroup.acc}" styleClass="green-button">
+ <span>#{assayGroup.acc}</span><span>View record</span>
</h:outputLink>
</rich:column>
<rich:column style="vertical-align: top">
<div align="right">
- <span class="feature-tag"><h:outputText value="#{bean.organism}"/></span>
+ <span class="feature-tag"><h:outputText value="#{assayGroup.organism}"/></span>
</div>
</rich:column>
<rich:column breakBefore="true" styleClass="study-info" style="vertical-align: top">
- <h:outputText value="#{bean.title}"/>
+ <h:outputText value="#{assayGroup.title}"/>
</rich:column>
@@ -174,7 +174,7 @@
<div class="assay-tag" align="right">
<rich:dataTable style="align:right" width="100%"
- value="#{bean.assayBeans}" var="assayBean">
+ value="#{assayGroup.assayBeans}" var="assayBean">
<rich:column width="100%">
<span class="assaycount-tag">
<h:outputText value="#{assayBean.count}"/>
View
85 web/src/main/webapp/compound_view.xhtml
@@ -1,85 +0,0 @@
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- template="layout/local-template.xhtml">
-
- <ui:define name="body">
- <div id="showcase" class="showcase">
-
- <ui:repeat var="taxonImage" value="#{chebiCompoundProvider.images}">
- <div class="showcase-slide">
-
- <!-- Put the slide content in a div with the class .showcase-content. -->
- <div class="showcase-content">
- <img src="${taxonImage.url}" title="${taxonImage.caption}" alt="${taxonImage.altTag}"/>
- </div>
-
- <!-- Put the thumbnail content in a div with the class .showcase-thumbnail -->
- <div class="showcase-thumbnail">
-
- <img src="${taxonImage.url}" width="140px" alt="${taxonImage.altTag}"/>
- <!-- The div below with the class .showcase-thumbnail-caption contains the thumbnail caption. -->
- <!-- <div class="showcase-thumbnail-caption">${image.caption}</div> -->
- <!-- The div below with the class .showcase-thumbnail-cover is used for the thumbnails active state. -->
- <div class="showcase-thumbnail-cover"></div>
-
- </div>
- <!-- Put the caption content in a div with the class .showcase-caption -->
-
- <div class="showcase-caption">
- <h2>alt="${taxonImage.altTag}"</h2>
- </div>
-
- </div>
- </ui:repeat>
- </div>
-
- <div class="showcase-slide">
- <div class="showcase-content">
- <div class="showcase-content-wrapper">
- Content...
- </div>
- </div>
- </div>
-
- <script type="text/javascript">
- jQuery(document).ready(function() {
- jQuery("#showcase").awShowcase(
- {
- content_width: 700,
- content_height: 470,
- fit_to_parent: false,
- auto: false,
- interval: 3000,
- continuous: false,
- loading: true,
- tooltip_width: 200,
- tooltip_icon_width: 32,
- tooltip_icon_height: 32,
- tooltip_offsetx: 18,
- tooltip_offsety: 0,
- arrows: true,
- buttons: true,
- btn_numbers: true,
- keybord_keys: true,
- mousetrace: false, /* Trace x and y coordinates for the mouse */
- pauseonover: true,
- stoponclick: true,
- transition: 'hslide', /* hslide/vslide/fade */
- transition_delay: 300,
- transition_speed: 500,
- show_caption: 'onhover', /* onload/onhover/show */
- thumbnails: true,
- thumbnails_position: 'outside-last', /* outside-last/outside-first/inside-last/inside-first */
- thumbnails_direction: 'horizontal', /* vertical/horizontal */
- thumbnails_slidex: 0, /* 0 = auto / 1 = slide one thumbnail / 2 = slide two thumbnails / etc. */
- dynamic_height: false, /* For dynamic height to work in webkit you need to set the width and height of images in the source. Usually works to only set the dimension of the first slide in the showcase. */
- speed_change: false, /* Set to true to prevent users from swithing more then one slide at once. */
- viewline: false /* If set to true content_width, thumbnails, transition and dynamic_height will be disabled. As for dynamic height you need to set the width and height of images in the source. */
- });
- });
- </script>
-
- </ui:define>
-</ui:composition>
View
22 web/src/main/webapp/study.xhtml
@@ -268,7 +268,7 @@
<td width="85%" class="attrs">
<table align="center" width="100%" cellpadding="0" cellspacing="2" style="table-layout:fixed">
- <ui:repeat var="bean" value="#{viewStudyBeanModel.studyBean.assayGroups}">
+ <ui:repeat var="assayGroup" value="#{viewStudyBeanModel.studyBean.assayGroups}">
<tr>
<td>
@@ -280,30 +280,30 @@
<table width="100%" border="0" align="left" style="table-layout:fixed;">
<tr>
<td width="100%" valign="top"
- class="subtable_title">#{bean.getDisplayLabel()}
+ class="subtable_title">#{assayGroup.getDisplayLabel()}
</td>
</tr>
<tr>
- <td width="100%" class="subtable_value_count">#{bean.platform}</td>
+ <td width="100%" class="subtable_value_count">#{assayGroup.platform}</td>
</tr>
<tr>
- <td width="65%"><span class="green-tag">#{bean.count} assays</span></td>
+ <td width="65%"><span class="green-tag">#{assayGroup.count} assays</span></td>
</tr>
</table>
</td>
<td width="45%" valign="middle">
<table width="100%" border="0" align="center" style="table-layout:fixed;">
- <ui:repeat var="dataLink" value="#{bean.dataLinks}">
+ <ui:repeat var="dataLink" value="#{assayGroup.dataLinks}">
<tr class="bigSpaceUnder">
<td width="30%" valign="top">
<h:panelGroup
- rendered="#{sourceURLResolver.hasRawData(bean.endPoint, bean.technology, dataLink)}">
+ rendered="#{sourceURLResolver.hasRawData(assayGroup.endPoint, assayGroup.technology, dataLink)}">
<div align="center">
<h:outputLink
- value="#{sourceURLResolver.getRawDataURL(bean.endPoint, bean.technology, dataLink.acc)}"
+ value="#{sourceURLResolver.getRawDataURL(assayGroup.endPoint, assayGroup.technology, dataLink.acc)}"
target="_blank" styleClass="download-button">
<span>Raw Data</span>
<span>Raw Data</span>
@@ -314,10 +314,10 @@
<td width="30%" valign="top">
<h:panelGroup
- rendered="#{sourceURLResolver.hasProcessedData(bean.endPoint, bean.technology, dataLink)}">
+ rendered="#{sourceURLResolver.hasProcessedData(assayGroup.endPoint, assayGroup.technology, dataLink)}">
<div align="center">
<h:outputLink
- value="#{sourceURLResolver.getProcessedDataURL(bean.endPoint, bean.technology, dataLink.acc)}"
+ value="#{sourceURLResolver.getProcessedDataURL(assayGroup.endPoint, assayGroup.technology, dataLink.acc)}"
target="_blank" styleClass="download-button">
<span>Processed Data</span>
<span>Processed Data</span>
@@ -330,9 +330,9 @@
<td width="40%" valign="top">
<h:panelGroup
- rendered="#{sourceURLResolver.hasWebEntry(bean.endPoint, bean.technology, dataLink)}">
+ rendered="#{sourceURLResolver.hasWebEntry(assayGroup.endPoint, assayGroup.technology, dataLink)}">
<h:outputLink
- value="#{sourceURLResolver.getEntryURL(bean.endPoint, bean.technology, dataLink.acc)}"
+ value="#{sourceURLResolver.getEntryURL(assayGroup.endPoint, assayGroup.technology, dataLink.acc)}"
target="_blank" styleClass="download-button">
<div align="right">
<span>#{dataLink.acc}</span>

0 comments on commit 4955750

Please sign in to comment.
Something went wrong with that request. Please try again.