Project

General

Profile

Actions

Cdm FAQ » History » Revision 15

« Previous | Revision 15/25 (diff) | Next »
Niels Hoffmann, 06/08/2009 07:02 PM


CDM FAQs

Where are basionym authorteams?

Year of publication and/or basionym authorteams of a scientific name might be known although the nomenclatural reference or the basionym itself is not known. A “dummy” reference and/or a “dummy” basionym will be created that keeps this data to enforce consistency. See #125

How can plain lists of literature references be attached to a taxon?

The recommended way is to create an empty Cdm:description:TaxonDescription for each literature resource and use the source property to hold the reference.

Taxon relations vs Name relations

The CdmLibrary logic does not cross the border between names and taxa. So if you create a new basionym relationship between two names NO homotypic synonym relationship is created automatically. On the contrary if a basionym relationship exists between two names, but no synonym relationship between 2 taxon concepts with the respective names, the 2 taxa are not considered synonyms!

Original Source ID

For importing data from an other source you have to add the an original source. E.g.:

IdentifiableEntity idEntity;
ReferenceBase ref;
int originalId;
OriginalSource originalSource = new OriginalSource();
originalSource.setIdInSource(String.valueOf(originalId));
originalSource.setCitation(ref);
idEntity.addSource(originalSource); 

What is the exact use for the class ReferencedEntityBase? And where are instances stored in the CDM database schema?

ReferencedEntityBase is an abstract super class for all classes that hold information about who is saying something. For example if you want to say that XYZ says that taxon A is a synonym for taxon B you will create a SynonymRelationship which is a subclass of ReferenceEntityBase and set the citation to XYZ. If you even know on which page the information about this relationship was published you will additionally set the micro-reference of the SynonymRelationship.

The same applies to all DescriptionElementBase classes like CategorialData, QuantitativeData etc. If you know in which publication this information is to be found you may add it to the DescriptionElementBase by using DescriptionElementBase.setCitation().

As it is a super class for other classes the instances are not stored directly in the schema but in the classes/tables that inherit from ReferencedEntityBase.

In your case you may find the information for example directly in the DescriptionElementBase table which has attributes like "citation_id", "originalNameString" or "microreference" that come from this class.

How can I configure logging in the editor

To get log4j to read your own configuration when developing the editor or anything that has to do with cdmLibrary eclipse plugin you have to tell log4j explicitly what configuration it should use. Otherwise it will scan the classpath and use the first log4j.xml/log4j.properties file it finds (which is mostly the log4j.properties in cdmlib-commons as it will be the first one it encounters).

Passing the following argument to the Virtual Machine however does the trick

-Dlog4j.configuration=file:///<path to your personal>/log4j.properties

If you run into trouble , you can debug log4j startup sequence by passing another argument to the VM

-Dlog4j.debug

How to create a new TermVocabulary

  1. Create a CSV file with at least the line for the vocabulary and store it along with the other terms (source:trunk/cdmlib/cdmlib-model/src/main/resources/terms)

  2. Create a class for the vocabulary (Example: source:trunk/cdmlib/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/Language.java)

  3. Add it to hibernate configuration source:trunk/cdmlib/cdmlib-persistence/src/main/resources/eu/etaxonomy/cdm/hibernate.cfg.xml

  4. Add it to source:trunk/cdmlib/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/VocabularyEnum.java

But! For the testsuite to work, the test data has to be updated as well. Open source:trunk/cdmlib/cdmlib-persistence/src/test/resources/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml. Searching for the string "TERMVOCABULARY" will get you to the right location in the file. Add a new line for your vocabulary. E.g.:

<TERMVOCABULARY DTYPE="$$[Ordered]TermVocabulary$$" ID="$$increment the highest TermVocabulary id$$" CREATED="$$date of creation$$" UUID="$$unique UUID of your term vocabulary$$" URI="" TERMSOURCEURI="$$URI of your class. E.g. eu.etaxonomy.cdm.model.common.Language$$"/>

Repeat for "TERMVOCABULARY_AUD" accordingly.

Updated by Niels Hoffmann about 15 years ago · 15 revisions