public abstract class SurveyDatum extends Object implements Comparable, Serializable
Modifier and Type | Field and Description |
---|---|
protected static String |
CUSTOM_DATUM |
protected static int |
DEFAULT_SOURCE_COL |
protected static int |
SYSTEM_DEFINED |
protected static int |
TOTAL_COMPONENTS |
Constructor and Description |
---|
SurveyDatum(int row,
int col,
int index)
Creates a new survey datum.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object object) |
abstract boolean |
dataEquals(String data) |
abstract boolean |
equals(Object c) |
String |
getId()
Returns the internal data identifier.
|
int |
getIndex()
Returns the current index of this datum, relative to its containing object.
|
int |
getSourceCol()
Returns the source column number (or character index in the row).
|
int |
getSourceRow()
Returns the source line number.
|
int |
hashCode()
Components are hashed on their identifiers.
|
static String |
html(SurveyDatum c) |
boolean |
isCustomDatum() |
static boolean |
isCustomDatum(String oid) |
abstract boolean |
isEmpty()
Tests whether this component is empty.
|
protected abstract String |
jsonize() |
protected static String |
jsonize(List<SurveyDatum> options) |
static String |
makeSurveyDatumId(int row,
int col)
Creates a SurveyMan SurveyDatum internal identifier for the source location.
|
protected void |
resetId(int row,
int col) |
void |
setIndex(int index)
Sets the current index of this datum, realtive to its containing object.
|
String |
toString()
A string representation comprised of the identifier and the relative index, for use in debugging and logging.
|
protected static int DEFAULT_SOURCE_COL
protected static int TOTAL_COMPONENTS
protected static int SYSTEM_DEFINED
protected static String CUSTOM_DATUM
public SurveyDatum(int row, int col, int index)
row
- The source line number.col
- The source column (or character index in the row).public static String makeSurveyDatumId(int row, int col)
row
- The source line number.col
- The source column (or character index in the row)public String getId()
protected void resetId(int row, int col)
public int getSourceRow()
public int getSourceCol()
public int getIndex()
public void setIndex(int index)
index
- The new index at which this datum can be found.public static boolean isCustomDatum(String oid)
public boolean isCustomDatum()
public abstract boolean isEmpty()
public abstract boolean dataEquals(String data)
protected abstract String jsonize()
protected static String jsonize(List<SurveyDatum> options)
public static String html(SurveyDatum c)
public int hashCode()
public String toString()
public int compareTo(Object object)
compareTo
in interface Comparable
Copyright © 2015. All rights reserved.