public class HTMLDatum extends SurveyDatum
StringDatums when the RESOURCE column was in use. Now a question is one of
an HTMLDatum or StringDatum.| Modifier and Type | Field and Description |
|---|---|
String |
data
The normalized HTML String associated with this SurveyDatum.
|
CUSTOM_DATUM, DEFAULT_SOURCE_COL, SYSTEM_DEFINED, TOTAL_COMPONENTS| Constructor and Description |
|---|
HTMLDatum(String html) |
HTMLDatum(String html,
int row,
int col,
int index)
Takes in a string of purported HTML, parses and normalizes it, and returns an HTMLDatum.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
dataEquals(String data) |
boolean |
equals(Object c)
Two HTMLDatums are equal if they have equal ids.
|
boolean |
isEmpty()
Tests whether this component is empty.
|
static boolean |
isHTMLComponent(String data)
Tests whether the input data is valid HTML using Jsoup.
|
protected String |
jsonize() |
String |
toString()
A string representation comprised of the identifier and the relative index, for use in debugging and logging.
|
String |
toString(boolean dataOnly)
Returns the data contents of the HTMLDatum.
|
compareTo, getId, getIndex, getSourceCol, getSourceRow, hashCode, html, isCustomDatum, isCustomDatum, jsonize, makeSurveyDatumId, resetId, setIndexpublic final String data
public HTMLDatum(String html, int row, int col, int index)
html - Arbitrary HTML fragment.row - Source row.col - Source column.public HTMLDatum(String html)
public boolean isEmpty()
SurveyDatumisEmpty in class SurveyDatumprotected String jsonize()
jsonize in class SurveyDatumpublic static boolean isHTMLComponent(String data)
data - Potentially HTML data.public boolean equals(Object c)
equals in class SurveyDatumc - Another HTMLDatum.public boolean dataEquals(String data)
dataEquals in class SurveyDatumpublic String toString()
SurveyDatumtoString in class SurveyDatumpublic String toString(boolean dataOnly)
dataOnly - boolean indicating whether to return data contents only.Copyright © 2015. All rights reserved.