Project

General

Profile

Download (20.1 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2017 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.io.cdmLight;
10

    
11
/**
12
 * An enumeration with each instance representing a table type in the Output Model.
13
 *
14
 * @author a.mueller
15
 * @since 15.03.2017
16
 */
17
public enum CdmLightExportTable {
18
    METADATA("Metadata", metaDataColumns()),
19
    SCIENTIFIC_NAME("ScientificName", nameColumns()),
20
    NAME_RELATIONSHIP("NameRelationship",nameRelationColumns()),
21
    HOMOTYPIC_GROUP("HomotypicGroup", homotypicGroupColumns()),
22
    NOMENCLATURAL_AUTHOR("PersonOrTeam", nomenclaturalAuthorColumns()),
23
    NOMENCLATURAL_AUTHOR_TEAM_RELATION("PersonTeamRelation", nomenclaturalAuthorTeamRelColumns()),
24
    TYPE_DESIGNATION("SpecimenTypeDesignation", typeDesignationColumns()),
25
    SPECIMEN("Specimen", specimenColumns()),
26
    TAXON("Taxon", taxonColumns()),
27
    SYNONYM("Synonym", synonymColumns()),
28
    REFERENCE("Reference", referenceColumns()),
29
    SIMPLE_FACT("SimpleFact", simpleFactsColumns()),
30
    TAXON_INTERACTION_FACT("TaxonInteractionFact", taxonInteractionFactsColumns()),
31
    SPECIMEN_FACT("SpecimenFact", specimenFactsColumns()),
32
    GEOGRAPHIC_AREA_FACT("GeographicAreaFact", geographicAreaFactsColumns()),
33
    COMMON_NAME_FACT("CommonNameFact", commonNameFactsColumns()),
34
    FACT_SOURCES("FactSources", factSourcesColumns()),
35
    IDENTIFIER("Identifier", identifierColumns()),
36
    MEDIA("MediaFact", mediaColumns()),
37
//    CONDENSED_DISTRIBUTION_FACT("CondensedDistributionFact", compressedDistributionFactColumns()),
38
    NAME_FACT("NameFact", nameFactColumns()),
39
    TYPE_SPECIMEN_NAME("NameSpecimenTypeRelation", typeDesignationNameColumns())
40
    ;
41

    
42
    //Taxon/Synonym
43
    protected static final String NAME_FK = "Name_Fk";
44
    protected static final String TAXON_ID = "Taxon_ID";
45
    protected static final String TAXON_FK = "Taxon_Fk";
46
    protected static final String CLASSIFICATION_ID = "Classification_ID";
47
    protected static final String CLASSIFICATION_TITLE = "ClassificationName";
48
    protected static final String SYNONYM_ID = "Synonym_ID";
49
    protected static final String PARENT_FK = "Parent_Fk";
50
    protected static final String SEC_REFERENCE_FK = "SecReference_Fk";
51
    protected static final String SEC_REFERENCE = "SecReference";
52
    protected static final String SEC_SUBNAME_FK = "SecSubName_Fk";
53
    protected static final String SEC_SUBNAME = "SecSubName";
54
    protected static final String SEC_SUBNAME_AUTHORS = "SecSubNameAuthors";
55
    protected static final String SORT_INDEX = "SortIndex";
56
    protected static final String UNPLACED = "Unplaced";
57
    protected static final String EXCLUDED = "Excluded";
58
    protected static final String DOUBTFUL = "PlacementDoubtful";
59
    protected static final String PUBLISHED = "Published";
60
    protected static final String STATUS_NOTES = "StatusNotes";
61

    
62
    //pro parte / misapplied
63
    protected static final String SYN_SEC_REFERENCE_FK = "SynSecReference_Fk";
64
    protected static final String SYN_SEC_REFERENCE = "SynSecReference";
65
    protected static final String IS_PRO_PARTE = "IsProParteSynonym";
66
    protected static final String IS_PARTIAL = "IsPartial";
67
    protected static final String IS_MISAPPLIED = "IsMisapplied";
68

    
69
    //Reference
70
    protected static final String REFERENCE_ID = "Reference_ID";
71
    protected static final String BIBLIO_SHORT_CITATION = "BibliographicShortCitation";
72
    protected static final String REF_TITLE = "Title";
73
    protected static final String ABBREV_REF_TITLE = "AbbrevTitle";
74
    protected static final String DATE_PUBLISHED = "DatePublished";
75
    protected static final String EDITION = "Edition";
76
    protected static final String EDITOR= "Editor";
77
    protected static final String ISBN = "ISBN";
78
    protected static final String ISSN = "ISSN";
79
    protected static final String ORGANISATION = "Organisation";
80
    protected static final String PAGES = "Pages";
81
    protected static final String PLACE_PUBLISHED = "PlacePublished";
82
    protected static final String PUBLISHER = "Publisher";
83
    protected static final String REF_ABSTRACT = "ReferenceAbstract";
84
    protected static final String SERIES_PART = "SeriesPart";
85
    protected static final String VOLUME = "Volume";
86
    protected static final String YEAR = "Year";
87
    protected static final String AUTHORSHIP_TITLE = "FullAuthor";
88

    
89

    
90
    protected static final String IN_REFERENCE = "InReference";
91
    protected static final String INSTITUTION = "Institution";
92
   // protected static final String LSID = "LSID";
93
    protected static final String SCHOOL = "School";
94
    protected static final String REF_TYPE = "ReferenceType";
95
    protected static final String URI = "URI";
96

    
97
    //Name
98
    protected static final String NAME_ID = "Name_ID";
99
//    protected static final String TROPICOS_ID = "Tropicos_ID";
100
//    protected static final String IPNI_ID = "IPNI_ID";
101
//    protected static final String WFO_ID = "WorldFloraOnline_ID";
102
    protected static final String LSID = "LSID";
103
    protected static final String RANK = "Rank";
104
    protected static final String RANK_SEQUENCE = "RankSequence";
105
    protected static final String FULL_NAME_WITH_AUTHORS = "FullNameWithAuthors";
106
    protected static final String FULL_NAME_WITH_REF = "FullNameWithRef";
107
    protected static final String FULL_NAME_NO_AUTHORS = "FullNameNoAuthors";
108
    protected static final String GENUS_UNINOMIAL = "GenusOrUninomial";
109
    protected static final String INFRAGENERIC_RANK = "InfragenericRank";
110
    protected static final String INFRAGENERIC_EPITHET = "InfraGenericEpithet";
111
    protected static final String SPECIFIC_EPITHET = "SpecificEpithet";
112
    protected static final String INFRASPECIFIC_RANK = "InfraspecificRank";
113
    protected static final String INFRASPECIFIC_EPITHET = "InfraSpecificEpithet ";
114
    protected static final String APPENDED_PHRASE = "AppendedPhrase";
115
    protected static final String BAS_EX_AUTHORTEAM_FK = "BasionymExAuthorTeam_Fk";
116
    protected static final String BAS_AUTHORTEAM_FK = "BasionymAuthorTeam_Fk";
117
    protected static final String COMB_EX_AUTHORTEAM_FK = "PublishingExAuthorTeam_Fk";
118
    protected static final String COMB_AUTHORTEAM_FK = "PublishingAuthorTeam_Fk";
119
    protected static final String AUTHOR_TEAM_STRING = "AuthorTeamString";
120
    protected static final String NAME_USED_IN_SOURCE_FK = "NameUsedInSource_Fk";
121
   // protected static final String REFERENCE_FK = "Reference_Fk"
122
    protected static final String PUBLICATION_TYPE = "PublicationType";
123
    protected static final String ABBREV_TITLE = "AbbreviatedTitle";
124
    protected static final String FULL_TITLE = "FullTitle";
125
    protected static final String ABBREV_REF_AUTHOR = "AbbreviatedInRefAuthor";
126
    protected static final String FULL_REF_AUTHOR = "FullInRefAuthor";
127
    protected static final String COLLATION = "Collation";
128
    protected static final String VOLUME_ISSUE = "VolumeIssue";
129
    protected static final String DETAIL = "Detail";
130
    protected static final String YEAR_PUBLISHED = "YearPublished";
131
    protected static final String VERBATIM_DATE = "VerbatimDate";
132
    protected static final String PROTOLOGUE_URI = "ProtologueURI";
133
    protected static final String NOM_STATUS = "NomenclaturalStatus";
134
    protected static final String NOM_STATUS_ABBREV = "NomenclaturalStatusAbbreviation";
135
    protected static final String HOMOTYPIC_GROUP_FK = "HomotypicGroup_Fk";
136
    protected static final String HOMOTYPIC_GROUP_SEQ = "HomotypicGroupSequenceNumber";
137
    protected static final String PROTOLOGUE_TYPE_STATEMENT = "ProtologueTypeStatement";
138
    protected static final String TYPE_SPECIMEN = "TypeSpecimens";
139
    protected static final String TYPE_STATEMENT = "TypeStatements";
140

    
141

    
142

    
143
    //Name Relationship
144
    protected static final String NAME1_FK = "Name1_Fk";
145
    protected static final String NAME2_FK = "Name2_Fk";
146
    protected static final String NAME_REL_TYPE = "NameRelationshipType";
147

    
148
    //CDM MetaData
149
    protected static final String INSTANCE_ID = "EditInstance_ID";
150
    protected static final String INSTANCE_NAME = "EditInstanceName";
151

    
152
    protected static final String DATASET_DESCRIPTION = "DatasetDescription";
153
    protected static final String DATASET_CREATOR = "DatasetCreator";
154
    protected static final String DATASET_CONTRIBUTOR = "DatasetContributor";
155
    protected static final String DATASET_TITLE = "DatasetTitle";
156
    protected static final String DATASET_LANGUAGE = "Language";
157
    protected static final String DATASET_LANDINGPAGE = "DataSetLandingPage";
158
    protected static final String DATASET_DOWNLOAD_LINK = "DatasetDownloadLink";
159
    protected static final String DATASET_BASE_URL = "DatasetBaseUrl";
160
    protected static final String DATASET_RECOMMENDED_CITATTION = "RecommendedCitation";
161
    protected static final String DATASET_LOCATION = "DatasetLocation";
162
    protected static final String DATASET_KEYWORDS = "DatasetKeywords";
163
    protected static final String DATASET_LICENCE = "Licence";
164

    
165

    
166
    //Homotypic Group
167
    protected static final String HOMOTYPIC_GROUP_ID = "HomotypicGroup_ID";
168
    protected static final String HOMOTYPIC_GROUP_STRING = "HomotypicGroupString";
169
    protected static final String HOMOTYPIC_GROUP_WITH_SEC_STRING = "HomotypicGroupStringWithSec";
170
    protected static final String HOMOTYPIC_GROUP_WITHOUT_ACCEPTED = "HomotypicGroupStringWithoutAccepted";
171
    protected static final String HOMOTYPIC_GROUP_WITHOUT_ACCEPTEDWITHSEC = "HomotypicGroupStringWithoutAcceptedWithSec";
172
    protected static final String HOMOTYPIC_GROUP_TYPE_STATEMENT_REFERENCE = "HomotypicGroupTypeStatementReference";
173

    
174
    protected static final String TYPE_STRING = "TypeSpecimenString";
175
    protected static final String TYPE_CACHE = "TypeStatementsString";
176
    protected static final String TYPE_STRING_WITH_REF = "TypeSpecimenStringWithRef";
177
    protected static final String TYPE_CACHE_WITH_REF = "TypeStatementsStringWithRef";
178

    
179
    //NomenclaturalAuthor
180
    protected static final String AUTHOR_ID = "PersonOrTeam_ID";
181
    protected static final String ABBREV_AUTHOR = "AbbrevNames";
182
    protected static final String AUTHOR_TITLE = "FullNames";
183
    protected static final String AUTHOR_GIVEN_NAME = "PersonOtherNames";
184
    protected static final String AUTHOR_FAMILY_NAME = "PersonFamiliyNames";
185
    protected static final String AUTHOR_PREFIX = "PersonPrefix";
186
    protected static final String AUTHOR_SUFFIX = "PersonSuffix";
187

    
188
  //Nomenclatural Author AuthorTeam Relations
189

    
190
    protected static final String AUTHOR_FK = "Author_Fk";
191
    protected static final String AUTHOR_TEAM_FK = "AuthorTeam_Fk";
192
    protected static final String AUTHOR_TEAM_SEQ_NUMBER = "SequenceNumber";
193

    
194
    //TypeDesignations
195
    protected static final String TYPE_ID="Type_ID";
196
    protected static final String SPECIMEN_FK = "Specimen_Fk";
197
    protected static final String TYPIFIED_NAME_FK = "TypifiedName_Fk";
198
    protected static final String TYPE_VERBATIM_CITATION = "TypeVerbatimCitation";
199
    protected static final String TYPE_STATUS = "TypeStatus";
200
    protected static final String TYPE_INFORMATION_REF_STRING = "TypeInformationSource";
201
    protected static final String TYPE_INFORMATION_REF_FK = "TypeInfoSourcePreferred_Fk";
202
    protected static final String TYPE_DESIGNATED_BY_REF_FK = "TypeDesignatedBy_Fk";
203

    
204
    //Type_Name_Rel
205
    protected static final String TYPE_FK="Type_Fk";
206

    
207

    
208
    //Specimen
209
    protected static final String SPECIMEN_ID = "Specimen_ID";
210
    protected static final String SPECIMEN_CITATION = "SpecimenCitation";
211
    protected static final String FIELDUNIT_CITATION = "FieldUnitCitation";
212
    protected static final String LOCALITY= "Locality";
213
    protected static final String COUNTRY = "Country";
214
    protected static final String AREA_CATEGORY1 = "AreaCategory1";
215
    protected static final String AREA_NAME1 = "AreaName1";
216
    protected static final String AREA_CATEGORY2 = "AreaCategory2";
217
    protected static final String AREA_NAME2 = "AreaName2";
218
    protected static final String AREA_CATEGORY3 = "AreaCategory3";
219
    protected static final String AREA_NAME3 = "AreaName3";
220
    protected static final String FURTHER_AREAS = "FurtherAreas";
221
    protected static final String COLLECTOR_STRING = "CollectorString";
222
    protected static final String COLLECTOR_NUMBER = "CollectorNumber";
223
    protected static final String COLLECTION_DATE = "CollectionDate";
224
    protected static final String SPECIMEN_IMAGE_URIS = "SpecimenImageURIs";
225
    protected static final String HERBARIUM_ABBREV = "HerbariumAbbrev";
226
    protected static final String MEDIA_SPECIMEN_URL = "MediaSpecimenURI";
227
    protected static final String PREFERREDSTABLE_ID = "PreferredStableId";
228
    protected static final String BARCODE = "Barcode";
229
    protected static final String ACCESSION_NUMBER = "AccessionNumber";
230
    protected static final String CATALOGUE_NUMBER = "CatalogueNumber ";
231
    //other specimen attributes
232

    
233
    //SimpleFacts
234
    protected static final String FACT_ID = "Fact_ID";
235
    protected static final String FACT_TEXT = "FactText";
236
    protected static final String LANGUAGE = "Language";
237
    protected static final String MEDIA_URI = "MediaURI";
238
    protected static final String FACT_CATEGORY = "FactCategory";
239

    
240
    // Specimen Facts
241
    protected static final String SPECIMEN_NOTES = "SpecimenNotes";
242
    protected static final String SPECIMEN_DESCRIPTION = "SpecimenDescription";
243

    
244
    // TaxonInteraction Facts
245
    protected static final String TAXON2_FK = "Taxon2_FK";
246
    protected static final String DESCRIPTION = "Description";
247

    
248
    //Geographic Area Facts
249
    protected static final String AREA_LABEL = "AreaLabel";
250
    protected static final String STATUS_LABEL = "StatusLabel";
251

    
252
    //FactSources
253
    protected static final String FACT_FK = "Fact_Fk";
254
    protected static final String REFERENCE_FK = "Reference_Fk";
255
    protected static final String NAME_IN_SOURCE_FK = "NameInSource_Fk";
256
    protected static final String FACT_TYPE = "FactType";
257

    
258
    //Annotations
259

    
260

    
261
    //Identifiers
262
    protected static final String EXTERNAL_NAME_IDENTIFIER = "ExternalIdentifier";
263
    protected static final String IDENTIFIER_TYPE = "IdentifierType";
264
    protected static final String FK = "ForeignKey";
265
    protected static final String REF_TABLE = "ReferencedTable";
266

    
267
    final static String[] homotypicGroupColumns(){
268
        return new String[]{HOMOTYPIC_GROUP_ID, HOMOTYPIC_GROUP_STRING, TYPE_STRING, TYPE_CACHE, HOMOTYPIC_GROUP_WITH_SEC_STRING, HOMOTYPIC_GROUP_WITHOUT_ACCEPTED, HOMOTYPIC_GROUP_WITHOUT_ACCEPTEDWITHSEC, SORT_INDEX, HOMOTYPIC_GROUP_TYPE_STATEMENT_REFERENCE};
269

    
270
    }
271

    
272
//    private static String[] compressedDistributionFactColumns() {
273
//        return new String[]{FACT_ID, TAXON_FK, FACT_TEXT};
274
//    }
275

    
276
    private Object usageFactColumns() {
277
        return new String[]{FACT_ID, TAXON_FK, FACT_TEXT, LANGUAGE, MEDIA_URI, FACT_CATEGORY};
278
    }
279

    
280
    final static String[] nameFactColumns() {
281
        return new String[]{FACT_ID, NAME_FK, FACT_TEXT, LANGUAGE, MEDIA_URI, FACT_CATEGORY};
282
    }
283
    final static String[] taxonInteractionFactsColumns(){
284
        return new String[]{FACT_ID, TAXON_FK, TAXON2_FK, DESCRIPTION};
285
    }
286

    
287
    final static String[] identifierColumns() {
288
        return new String[]{ FK, REF_TABLE, EXTERNAL_NAME_IDENTIFIER, IDENTIFIER_TYPE};
289
    }
290

    
291
    final static String[] mediaColumns() {
292
        return new String[]{ FACT_ID, TAXON_FK, NAME_FK, MEDIA_URI};
293
    }
294

    
295
    final static String[]  factSourcesColumns() {
296
        return new String[]{FACT_FK, REFERENCE_FK, NAME_IN_SOURCE_FK, FACT_TYPE};
297
    }
298

    
299
    final static String[] specimenFactsColumns() {
300
        return new String[]{FACT_ID, TAXON_FK, SPECIMEN_FK, SPECIMEN_DESCRIPTION, SPECIMEN_NOTES};
301
    }
302

    
303
    final static String[] commonNameFactsColumns() {
304
        return new String[]{FACT_ID, TAXON_FK, FACT_TEXT, LANGUAGE, AREA_LABEL};
305

    
306
    }
307
    final static String[] geographicAreaFactsColumns() {
308
        return new String[]{FACT_ID, TAXON_FK, AREA_LABEL, STATUS_LABEL};
309
    }
310

    
311
    final static String[] simpleFactsColumns() {
312
        return new String[]{FACT_ID, TAXON_FK, FACT_TEXT, LANGUAGE, MEDIA_URI, FACT_CATEGORY};
313
    }
314

    
315
    final static String[] nomenclaturalAuthorColumns() {
316
        return new String[]{AUTHOR_ID, ABBREV_AUTHOR, AUTHOR_TITLE, AUTHOR_GIVEN_NAME, AUTHOR_FAMILY_NAME, AUTHOR_PREFIX, AUTHOR_SUFFIX};
317
    }
318

    
319
    final static String[] nomenclaturalAuthorTeamRelColumns() {
320
        return new String[]{AUTHOR_TEAM_FK, AUTHOR_FK, AUTHOR_TEAM_SEQ_NUMBER};
321
    }
322

    
323
    final static String[] metaDataColumns(){
324
        return new String[]{INSTANCE_ID, INSTANCE_NAME, DATASET_TITLE, DATASET_CONTRIBUTOR, DATASET_CREATOR, DATASET_DESCRIPTION,
325
                DATASET_DOWNLOAD_LINK, DATASET_BASE_URL, DATASET_KEYWORDS, DATASET_LANDINGPAGE, DATASET_LANGUAGE, DATASET_LICENCE,
326
                DATASET_LOCATION, DATASET_RECOMMENDED_CITATTION};
327
    }
328

    
329
    final static String[] nameRelationColumns(){
330
        return new String[]{NAME1_FK, NAME2_FK, NAME_REL_TYPE};
331
    }
332

    
333
    final static String[] nameColumns(){
334
        return new String[]{NAME_ID, LSID, RANK, RANK_SEQUENCE,
335
                FULL_NAME_WITH_AUTHORS, FULL_NAME_NO_AUTHORS, GENUS_UNINOMIAL,
336
                INFRAGENERIC_RANK, INFRAGENERIC_EPITHET, SPECIFIC_EPITHET,
337
                INFRASPECIFIC_RANK, INFRASPECIFIC_EPITHET,
338
                BAS_EX_AUTHORTEAM_FK, BAS_AUTHORTEAM_FK, COMB_EX_AUTHORTEAM_FK, COMB_AUTHORTEAM_FK,
339
                AUTHOR_TEAM_STRING, REFERENCE_FK, PUBLICATION_TYPE, ABBREV_TITLE, FULL_TITLE,
340
                ABBREV_REF_AUTHOR, FULL_REF_AUTHOR, COLLATION, VOLUME_ISSUE,
341
                DETAIL, DATE_PUBLISHED, YEAR_PUBLISHED, VERBATIM_DATE, PROTOLOGUE_URI,
342
                NOM_STATUS, NOM_STATUS_ABBREV, HOMOTYPIC_GROUP_FK,
343
                HOMOTYPIC_GROUP_SEQ, PROTOLOGUE_TYPE_STATEMENT, TYPE_SPECIMEN, TYPE_STATEMENT, FULL_NAME_WITH_REF, NAME_USED_IN_SOURCE_FK, APPENDED_PHRASE
344
        };
345
    }
346

    
347
    final static String[] taxonColumns(){
348
        return new String[]{TAXON_ID, CLASSIFICATION_ID, CLASSIFICATION_TITLE, NAME_FK, PARENT_FK, SEC_REFERENCE_FK, SEC_REFERENCE, SEC_SUBNAME_FK, SEC_SUBNAME, SEC_SUBNAME_AUTHORS, SORT_INDEX, EXCLUDED, STATUS_NOTES, PUBLISHED, UNPLACED, DOUBTFUL, APPENDED_PHRASE};
349
    }
350

    
351
    final static String[] synonymColumns(){
352
        return new String[]{SYNONYM_ID, TAXON_FK, NAME_FK, SYN_SEC_REFERENCE_FK, SYN_SEC_REFERENCE, SEC_REFERENCE_FK, SEC_REFERENCE,
353
                IS_PRO_PARTE, IS_PARTIAL, IS_MISAPPLIED, PUBLISHED, SORT_INDEX, APPENDED_PHRASE};
354
    }
355

    
356
    final static String[] referenceColumns(){
357
        return new String[]{REFERENCE_ID, BIBLIO_SHORT_CITATION, REF_TITLE,ABBREV_REF_TITLE, DATE_PUBLISHED, EDITION, EDITOR, ISBN,ISSN, ORGANISATION, PAGES, PLACE_PUBLISHED, PUBLISHER,
358
                REF_ABSTRACT, SERIES_PART, VOLUME, YEAR, AUTHORSHIP_TITLE, AUTHOR_FK, IN_REFERENCE, INSTITUTION, LSID, SCHOOL, REF_TYPE, URI};
359
    }
360

    
361
    final static String[] typeDesignationColumns(){
362
        return new String[]{TYPE_ID, TYPIFIED_NAME_FK, SPECIMEN_FK, //TYPE_VERBATIM_CITATION,
363
                TYPE_STATUS, TYPE_DESIGNATED_BY_REF_FK, TYPE_INFORMATION_REF_STRING, TYPE_INFORMATION_REF_FK};
364

    
365
    }
366

    
367
    final static String[] typeDesignationNameColumns(){
368
        return new String[]{TYPE_FK, NAME_FK};
369
    }
370

    
371

    
372
    final static String[] specimenColumns() {
373
        return new String[]{SPECIMEN_ID, SPECIMEN_CITATION, FIELDUNIT_CITATION, LOCALITY, COUNTRY, AREA_CATEGORY1, AREA_NAME1, AREA_CATEGORY2, AREA_NAME2, AREA_CATEGORY3, AREA_NAME3,
374
                FURTHER_AREAS, COLLECTOR_STRING, COLLECTOR_NUMBER, COLLECTION_DATE, SPECIMEN_IMAGE_URIS, HERBARIUM_ABBREV, MEDIA_SPECIMEN_URL, PREFERREDSTABLE_ID, BARCODE, CATALOGUE_NUMBER, ACCESSION_NUMBER};
375
    }
376

    
377
    private String tableName;
378
    private String[] columnNames;
379

    
380
// ************** CONSTRUCTOR *******************/
381

    
382
    private CdmLightExportTable(String tableName, String[] columnNames){
383
        this.tableName = tableName;
384
        this.columnNames = columnNames;
385
    }
386

    
387
// ****************** GETTER / SETTER *************/
388

    
389
    public String getTableName() {return tableName;}
390

    
391
    public int getSize(){ return columnNames.length;}
392

    
393
    public String[] getColumnNames(){return columnNames;}
394

    
395
    public int getIndex(String columnName) {
396
        int index= 0;
397
        for(String column : getColumnNames()){
398
            if (column.equals(columnName)){
399
                return index;
400
            }
401
            index++;
402
        }
403
        return -1;
404
    }
405
}
(5-5/6)