Revision 8bc5f53a
Added by Andreas Müller over 16 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/DefinedTermBase.java | ||
---|---|---|
37 | 37 |
*/ |
38 | 38 |
@Entity |
39 | 39 |
@Inheritance(strategy=InheritanceType.SINGLE_TABLE) |
40 |
public abstract class DefinedTermBase<T extends DefinedTermBase> extends TermBase implements IDefTerm{
|
|
40 |
public abstract class DefinedTermBase<T extends DefinedTermBase> extends TermBase implements ILoadableTerm{
|
|
41 | 41 |
static Logger logger = Logger.getLogger(DefinedTermBase.class); |
42 | 42 |
|
43 | 43 |
static protected IVocabularyStore vocabularyStore = new DefaultVocabularyStore(); |
... | ... | |
66 | 66 |
} |
67 | 67 |
|
68 | 68 |
|
69 |
|
|
69 | 70 |
/* (non-Javadoc) |
70 |
* @see eu.etaxonomy.cdm.model.common.IDefTerm#readCsvLine(java.util.List)
|
|
71 |
* @see eu.etaxonomy.cdm.model.common.ILoadableTerm#readCsvLine(java.util.List)
|
|
71 | 72 |
*/ |
72 |
public void readCsvLine(List<String> csvLine) {
|
|
73 |
readCsvLine(csvLine, Language.ENGLISH()); |
|
73 |
public ILoadableTerm readCsvLine(List<String> csvLine) {
|
|
74 |
return readCsvLine(csvLine, Language.ENGLISH());
|
|
74 | 75 |
} |
75 |
public void readCsvLine(List<String> csvLine, Language lang) {
|
|
76 |
public ILoadableTerm readCsvLine(List<String> csvLine, Language lang) {
|
|
76 | 77 |
this.setUuid(UUID.fromString(csvLine.get(0))); |
77 | 78 |
this.setUri(csvLine.get(1)); |
78 |
this.addRepresentation(new Representation(csvLine.get(3), csvLine.get(2).trim(), lang) ); |
|
79 |
this.addRepresentation(Representation.NewInstance(csvLine.get(3), csvLine.get(2).trim(), lang) ); |
|
80 |
return this; |
|
79 | 81 |
} |
80 | 82 |
|
81 | 83 |
/* (non-Javadoc) |
82 |
* @see eu.etaxonomy.cdm.model.common.IDefTerm#writeCsvLine(au.com.bytecode.opencsv.CSVWriter)
|
|
84 |
* @see eu.etaxonomy.cdm.model.common.ILoadableTerm#writeCsvLine(au.com.bytecode.opencsv.CSVWriter)
|
|
83 | 85 |
*/ |
84 | 86 |
public void writeCsvLine(CSVWriter writer) { |
85 | 87 |
String [] line = new String[4]; |
Also available in: Unified diff