|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.ac.ebi.intact.application.search2.struts.view.html.HtmlBuilder
This class generates an HTML view of search results.
This should be used from within the Web framework. The main method only serves as a usage example and for quick development.
For each request, one HtmlBuilder object should be instantiated.
There is one public htmlView method for each of the major IntAct classes:
AnnotatedObject, Experiment, Interaction, Protein.
Each of these normally call
htmlViewHead: Display the object's "administrative data"
htmlViewData: Display the object's attributes
htmlViewAnnotation: Display annotation
htmlViewXref: Display xrefs
Rest of the htmlView method: Display additional "bulk" data,
e.g. the list of interactors for an Interaction, or
the amino acid sequence for a Protein.
Private html* methods display partial objects which need to be surrounded by the appropriate context.
htmlViewPartial methods indicate that this method only displays an object partially, usually used in the context of another htmlView. Example: htmlViewPartial(CvObject) will only display the hyperlinked shortLabel, while htmlView(CvObject) shows the full object on its own.
Layout: The Layout is based on a table layout with four columns in all tables.
Status: The "experiment" view is produced.
todo: specific htmlView for BioSource, CvDagObject
| Field Summary | |
static int |
MAX_CHUNK_IN_INDEX
|
| Constructor Summary | |
HtmlBuilder(java.io.Writer writer,
java.util.Set highlight,
java.lang.String link,
java.lang.String contextPath)
Instantiate a new view object |
|
| Method Summary | |
void |
buildChunkIndex(java.lang.Object object,
java.lang.String link,
int currentChunk,
int maxChunk,
int objectCount,
java.lang.String chunkedObjectType)
Display the chunk index. |
void |
htmlView(AnnotatedObject anAnnotatedObject)
The default html view for an AnnotatedObject. |
void |
htmlView(BinaryDetailsViewBean.BinaryData binaryData)
Displays a interaction partner table for BinaryData data structure. |
void |
htmlView(BioSource bioSource)
TODO as to be refined |
void |
htmlView(CvComponentRole componentRole)
TODO as to be refined |
void |
htmlView(CvDatabase cvDatabase)
TODO as to be refined |
void |
htmlView(CvIdentification cvIdentification)
TODO as to be refined |
void |
htmlView(CvInteraction interaction)
TODO as to be refined |
void |
htmlView(CvInteractionType interactionType)
TODO as to be refined |
void |
htmlView(CvTopic topic)
TODO as to be refined |
void |
htmlView(CvXrefQualifier qualifier)
TODO as to be refined |
void |
htmlView(Experiment ex)
HTML view of an experiment. |
void |
htmlView(Interaction act)
HTML view of an Interaction object. |
void |
htmlView(InteractionImpl act)
HTML view of an InteractionProxy object. |
void |
htmlView(Protein aProtein)
HTML view of a Protein object. |
void |
htmlView(ProteinImpl aProtein)
HTML view of a ProteinProxy object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MAX_CHUNK_IN_INDEX
| Constructor Detail |
public HtmlBuilder(java.io.Writer writer,
java.util.Set highlight,
java.lang.String link,
java.lang.String contextPath)
writer - The Writer all html output is written to.highlight - A HashSet containing all shortLabels which should be
highlighted in the result set.link - the link to the help page.| Method Detail |
public void htmlView(AnnotatedObject anAnnotatedObject)
throws java.io.IOException
anAnnotatedObject -
java.io.IOException
public void htmlView(BinaryDetailsViewBean.BinaryData binaryData)
throws java.io.IOException
BinaryData data structure.
binaryData - representation of the interaction partners.
java.io.IOException
public void htmlView(ProteinImpl aProtein)
throws java.io.IOException
aProtein -
java.io.IOException
public void htmlView(Protein aProtein)
throws java.io.IOException
aProtein -
java.io.IOException
public void htmlView(CvDatabase cvDatabase)
throws java.io.IOException
cvDatabase -
java.io.IOException
public void htmlView(CvXrefQualifier qualifier)
throws java.io.IOException
qualifier -
java.io.IOException
public void htmlView(BioSource bioSource)
throws java.io.IOException
bioSource -
java.io.IOException
public void htmlView(CvTopic topic)
throws java.io.IOException
topic -
java.io.IOException
public void htmlView(CvInteraction interaction)
throws java.io.IOException
interaction -
java.io.IOException
public void htmlView(CvInteractionType interactionType)
throws java.io.IOException
interactionType -
java.io.IOException
public void htmlView(CvComponentRole componentRole)
throws java.io.IOException
componentRole -
java.io.IOException
public void htmlView(CvIdentification cvIdentification)
throws java.io.IOException
cvIdentification -
java.io.IOException
public void htmlView(InteractionImpl act)
throws java.io.IOException
act -
java.io.IOException
public void htmlView(Interaction act)
throws java.io.IOException
act -
java.io.IOException
public void htmlView(Experiment ex)
throws java.io.IOException
ex -
java.io.IOException
public void buildChunkIndex(java.lang.Object object,
java.lang.String link,
int currentChunk,
int maxChunk,
int objectCount,
java.lang.String chunkedObjectType)
throws java.io.IOException
object - the object for which we create that index of its chunk.link - the help linkcurrentChunk - the user selected chunk to displaymaxChunk - the maximum number of chunk (ie. objectCount /
uk.ac.ebi.intact.application.search2.business.Constants.MAX_CHUNK_SIZE)objectCount - the count of object (those we display in chunks).chunkedObjectType - the type of the object we chunk. Used to give a context to the user.
- Throws:
java.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||