Revision c19a7b2e
Added by Andreas Müller about 15 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/berlinModel/out/BerlinModelReferenceExport.java | ||
---|---|---|
25 | 25 |
import eu.etaxonomy.cdm.io.berlinModel.out.mapper.DbTimePeriodMapper; |
26 | 26 |
import eu.etaxonomy.cdm.io.berlinModel.out.mapper.IdMapper; |
27 | 27 |
import eu.etaxonomy.cdm.io.berlinModel.out.mapper.MethodMapper; |
28 |
import eu.etaxonomy.cdm.io.common.IExportConfigurator; |
|
29 | 28 |
import eu.etaxonomy.cdm.io.common.Source; |
30 | 29 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator.DO_REFERENCES; |
31 | 30 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
... | ... | |
35 | 34 |
import eu.etaxonomy.cdm.model.reference.PrintedUnitBase; |
36 | 35 |
import eu.etaxonomy.cdm.model.reference.ReferenceBase; |
37 | 36 |
import eu.etaxonomy.cdm.model.reference.StrictReferenceBase; |
37 |
import eu.etaxonomy.cdm.model.reference.Thesis; |
|
38 | 38 |
|
39 | 39 |
|
40 | 40 |
/** |
... | ... | |
61 | 61 |
@Override |
62 | 62 |
protected boolean doCheck(BerlinModelExportState state){ |
63 | 63 |
boolean result = true; |
64 |
logger.warn("Checking for Authors not yet implemented");
|
|
64 |
logger.warn("Checking for References not yet implemented");
|
|
65 | 65 |
//result &= checkArticlesWithoutJournal(bmiConfig); |
66 | 66 |
//result &= checkPartOfJournal(bmiConfig); |
67 | 67 |
|
... | ... | |
81 | 81 |
mapping.addMapper(MethodMapper.NewInstance("RefAuthorString", this)); |
82 | 82 |
|
83 | 83 |
mapping.addMapper(DbStringMapper.NewInstance("title", "Title")); |
84 |
mapping.addMapper(DbStringMapper.NewInstance("title", "NomTitleAbbrev")); |
|
84 |
// mapping.addMapper(MethodMapper.NewInstance("Title", this)); |
|
85 |
|
|
86 |
// mapping.addMapper(DbStringMapper.NewInstance("title", "NomTitleAbbrev")); |
|
87 |
mapping.addMapper(MethodMapper.NewInstance("NomTitleAbbrev", this)); |
|
88 |
|
|
89 |
|
|
85 | 90 |
|
86 | 91 |
mapping.addMapper(DbStringMapper.NewFacultativeInstance("edition", "Edition")); |
87 | 92 |
mapping.addMapper(DbStringMapper.NewFacultativeInstance("volume", "Volume")); |
... | ... | |
89 | 94 |
mapping.addMapper(DbStringMapper.NewFacultativeInstance("pages", "PageString")); |
90 | 95 |
mapping.addMapper(DbStringMapper.NewFacultativeInstance("isbn", "ISBN")); |
91 | 96 |
mapping.addMapper(DbStringMapper.NewFacultativeInstance("issn", "ISSN")); |
97 |
mapping.addMapper(DbStringMapper.NewFacultativeInstance("publisher", "Publisher")); |
|
98 |
mapping.addMapper(DbStringMapper.NewFacultativeInstance("placePublished", "PublicationTown")); |
|
92 | 99 |
mapping.addMapper(DbTimePeriodMapper.NewInstance("datePublished", "RefYear")); |
100 |
mapping.addMapper(MethodMapper.NewInstance("ThesisFlag", this)); |
|
93 | 101 |
|
94 | 102 |
mapping.addMapper(CreatedAndNotesMapper.NewInstance()); |
95 | 103 |
|
96 | 104 |
// ,[Series] ?? |
97 |
// ,[DateString] |
|
98 | 105 |
// ,[URL] |
99 | 106 |
// ,[ExportDate] |
100 |
// ,[PublicationTown] |
|
101 |
// ,[Publisher] |
|
102 |
// ,[ThesisFlag] |
|
103 |
// ,[RefDepositedAt] |
|
104 | 107 |
// ,[InformalRefCategory] |
105 | 108 |
// ,[IsPaper] |
106 | 109 |
// ,[RefSourceFk] |
107 |
// ,[IdInSource] |
|
108 |
// ,[NomStandard] |
|
110 |
// ,[IdInSource] |
|
109 | 111 |
|
110 | 112 |
|
111 | 113 |
return mapping; |
... | ... | |
246 | 248 |
return null; |
247 | 249 |
} |
248 | 250 |
} |
251 |
|
|
252 |
// //called by MethodMapper |
|
253 |
// @SuppressWarnings("unused") |
|
254 |
// private static String getTtile(StrictReferenceBase<?> ref){ |
|
255 |
//// if (ref.isProtectedTitleCache()){ |
|
256 |
//// return ref.getTitleCache(); |
|
257 |
//// }else{ |
|
258 |
//// return null; |
|
259 |
//// } |
|
260 |
// } |
|
261 |
|
|
262 |
//called by MethodMapper |
|
263 |
@SuppressWarnings("unused") |
|
264 |
private static String getNomRefTitle(StrictReferenceBase<?> ref){ |
|
265 |
if (ref.isNomenclaturallyRelevant()){ |
|
266 |
return ref.getTitle(); |
|
267 |
}else{ |
|
268 |
return null; |
|
269 |
} |
|
270 |
} |
|
271 |
|
|
272 |
|
|
249 | 273 |
|
250 | 274 |
//called by MethodMapper |
251 | 275 |
@SuppressWarnings("unused") |
... | ... | |
267 | 291 |
return false; |
268 | 292 |
} |
269 | 293 |
} |
270 |
|
|
294 |
|
|
295 |
//called by MethodMapper |
|
296 |
@SuppressWarnings("unused") |
|
297 |
private static Boolean getThesisFlag(StrictReferenceBase<?> ref){ |
|
298 |
if (ref.isInstanceOf(Thesis.class)){ |
|
299 |
return true; |
|
300 |
}else{ |
|
301 |
return false; |
|
302 |
} |
|
303 |
} |
|
271 | 304 |
|
272 | 305 |
|
273 | 306 |
/* (non-Javadoc) |
Also available in: Unified diff
BerlinModel ReferenceExport improvements