Project

General

Profile

Cdm Defined Terms » History » Revision 4

Revision 3 (Andreas Müller, 02/12/2009 12:02 PM) → Revision 4/32 (Andreas Müller, 02/12/2009 12:08 PM)

{{>toc}} 


 _Discussion how to handle defined terms in the CDM Library_ 




 ## Existing Terms 


 || Class|count|user-defined|ordered|multiple|needed in model|needed where| 
 |1| Language|485|2|0||DEFAULT is needed|| 
 |2| Continent|9|1|0||0|| 
 |3| Rank|62|1|1|0|1|| 
 |4| TypeDesignationStatus|16|1|1||0|| 
 |5| NomenclaturalStatusType|24|1|1||?|needed in getStatusByAbbrev etc. -> needed by Formatter/CacheStrategy| 
 |6| SynonymRelationshipType|3|0|1|0|1|| 
 |7| HybridRelationshipType|4|1|1|0|?|| 
 |8| NameRelationshipType|10|1-2|1||1|equals and addBasionym();| 
 |9| TaxonRelationshipType|27|1|1|0|1|| 
 |10| MarkerType|4|2|0||0|| 
 |11| AnnotationType|2|1|0|0|0|| 
 |12| NamedAreaType|2|1|0||?|only in TdwgArea.addTdwgArea(NamedArea)| 
 |13| NamedAreaLevel|9|1|0||?|only in TdwgArea.addTdwgArea(NamedArea)| 
 |14| NomenclaturalCode|5|0|0||1|| 
 |15| Feature|26|3|0||1|in constructor of some DescriptionElementBase classes| 
 |16| TdwgArea|1040|1|1|1|0|| 
 |17| NamedArea|0|3|1|2|1|| 
 |18| WaterbodyOrCountry|250|2|0||0|| 
 |19| PresenceTerm|18|2|1||0|| 
 |20| AbsenceTerm|1|2|1||0|| 
 |21| Sex|2|1|1||0|| 
 |22| DerivationEventType|8|2|0||0|| 
 |23| PreservationMethod|0|2|0||0|| 
 |24| DeterminationModifier|0|3|0||0|| 
 |25| StatisticalMeasure|8|1|0|0|0|| 
 |26| RightsTerm|3|?|0||0|| 
 |27| BibtexEntryType|0|?|0|0|0|| 
 |28| ExtensionType|0|?|0||0|| 
 |29| InstitutionType|0|?|0||0|| 
 |30| MeasurementUnit|0|2|0|0|0|| 
 |32| ReferenceSystem|0|2|0|0|0|| 
 |33| TextFormat|0|2|0||0|| 
 |34| Keyword|0|3|1||0|| 
 |35| Modifier|0|3|1||0|| 
 |36| State|0|3|1||0|| 
 |40| Scope|0|2|1||0|| 
 |41| Stage|0|2|1||0|| 

  **count: **     Number of existing terms in csv files 


  **user-defined: **     necessity to have user defined instances (0: never; 1: very seldom, 2: sometimes, 3: often) 


  **who: **     who may add a new term (list may be incomplete)  


  **ordered: **     The vocabulary is ordered 


  **multiple: **     multiple vocabularies should be allowed (e.g. different NamedArea vocabularies): 0: same vocabulary in all applications; 1: one vocabulary per application; 2: multiple vocabularies per application 


  **needed in model: **     1 if the 'static' methods are used in other methods in the model, 0 otherwise  


  **needed where: **     description of how the 'static' methods are used 





 ## Solutions 



 ### 1. Mixed Model 


 * Make those terms that need to be updated often and that are not used in the model ordinary classes (saving via @Cascade). No _static_ methods are available for these classes. Instances of the classes may be received via the service layer. 

 * Make those terms that do not need to be updated or need to be updated very seldom and that are used in the model an _enum_. Extension is only possible via changing the code. _enum_ 

   * List of enums:  

     * NomenclaturalCode 

     * SynonymRelationshipType 

     * HybridRelationshipType 

     * TaxonRelationshipType 

   * List of unclear classes 

     * Rank (tendency: make it an enum and think later about possibilities to extend it) 

     a  

     * NomenclaturalStatusType () 

     * NameRelationshipType (tendency: make it an enum as all other relationships are also enum) 

   * List of ordinary classes 

     * _all other classes_ 


 * Define an interface _IDefinedTerm_ that both implement 

 

 * Problems to be solved: Representations for the _enum_s