public class TranslationTable extends MapObject
Modifier and Type | Class and Description |
---|---|
static class |
TranslationTable.Translation |
Constructor and Description |
---|
TranslationTable(Resource resource) |
Modifier and Type | Method and Description |
---|---|
void |
addTranslation(String dbValue,
String rdfValue)
Adds a translation mapping.
|
void |
setHref(String href) |
void |
setJavaClass(String className)
Sets a translation class.
|
int |
size()
Returns the number of defined mappings.
|
String |
toString() |
Translator |
translator() |
void |
validate() |
assertArgumentNotNull, assertHasBeenDefined, assertNotYetDefined, resource
public TranslationTable(Resource resource)
public int size()
public void addTranslation(String dbValue, String rdfValue)
dbValue
- the value on the database side (usually coming from a DB column)rdfValue
- the value on the RDF side (a string or URI)public void setJavaClass(String className)
Translator
interface. This method will take care
of generating an instance of the class.className
- name of a class implementing Translator
public void setHref(String href)
public Translator translator()
public void validate() throws D2RQException
validate
in class MapObject
D2RQException