public abstract class Model extends Object
| Modifier and Type | Field and Description |
|---|---|
protected FormElement |
fe
the
FormElement for which this model represents. |
protected RecommendationModel |
recModel |
| Constructor and Description |
|---|
Model(FormElement fe,
HTMLUserGenerator render) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSRCProp(Properties p,
String url)
Create a
Properties instance with a src key pointing to the
cached resource. |
abstract StringBuffer |
generateHTML()
Generate the HTML code for the concrete
FormElement, Including
all of it's children (if applies). |
protected String |
getCachedURL(String url) |
FormElement |
getFormElement()
get the
FormElement associated to this Model. |
HTMLUserGenerator |
getRenderer()
Get the
HTMLUserGenerator instance to which this Model is
associated to |
static StringBuffer |
singleTag(String tagName,
Properties tagProps)
Create a tag that has no closing tag, and therefore no body.
|
static StringBuffer |
tag(String tagName,
StringBuffer body,
Properties tagProps)
Create a HTML simply providing the tag type, the body inside and the
properties for the opening tag.
|
static StringBuffer |
tag(String tagName,
String body,
Properties tagProps)
Wrapper method for
tag(String, StringBuffer, Properties),
where the body is just a String. |
protected FormElement fe
FormElement for which this model represents.protected RecommendationModel recModel
public Model(FormElement fe, HTMLUserGenerator render)
fe - render - public HTMLUserGenerator getRenderer()
HTMLUserGenerator instance to which this Model is
associated toHTMLUserGeneratorpublic FormElement getFormElement()
FormElement associated to this Model.public abstract StringBuffer generateHTML()
FormElement, Including
all of it's children (if applies).StringBuffer with all the HTML code for the Element.public static StringBuffer tag(String tagName, String body, Properties tagProps)
tag(String, StringBuffer, Properties),
where the body is just a String.tagName - the HTML tag typebody - the Body that goes in between tags.tagProps - the Tag properties that go in the opening tag. May be null if
empty.StringBuffer with the HTML code.tag(String, StringBuffer, Properties)public static StringBuffer tag(String tagName, StringBuffer body, Properties tagProps)
tagName - the HTML tag typebody - the Body that goes in between tags. May be null if empty.tagProps - the Tag properties that go in the opening tag.StringBuffer with the HTML code.public static StringBuffer singleTag(String tagName, Properties tagProps)
tagName - the HTML tag typetagProps - the Tag properties that go in the opening tag.StringBuffer with the HTML code.public void addSRCProp(Properties p, String url)
Properties instance with a src key pointing to the
cached resource.p - the properties to which to add the src property.url - the url of the original content.Copyright © 2018 universAAL Consortium. All rights reserved.