Project

General

Profile

Download (2.53 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2018 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.vaadin.ui;
10

    
11
import java.text.DecimalFormat;
12
import java.text.NumberFormat;
13
import java.util.Arrays;
14
import java.util.EnumSet;
15
import java.util.List;
16

    
17
import eu.etaxonomy.cdm.model.common.AnnotationType;
18
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
19
import eu.etaxonomy.cdm.model.reference.ReferenceType;
20
import eu.etaxonomy.cdm.persistence.hibernate.permission.Role;
21
import eu.etaxonomy.cdm.vaadin.permission.RolesAndPermissions;
22

    
23
/**
24
 * @author a.kohlbecker
25
 * @since Jan 12, 2018
26
 *
27
 */
28
public class RegistrationUIDefaults {
29

    
30
    public static final EnumSet<ReferenceType> PRINTPUB_REFERENCE_TYPES = EnumSet.of(
31
            ReferenceType.Article,
32
            ReferenceType.Book,
33
            ReferenceType.InProceedings,
34
            ReferenceType.Journal,
35
            ReferenceType.PrintSeries,
36
            ReferenceType.Proceedings,
37
            ReferenceType.BookSection,
38
            ReferenceType.Section,
39
            ReferenceType.Thesis);
40

    
41
    public static final EnumSet<ReferenceType> MEDIA_REFERENCE_TYPES = EnumSet.of(
42
            // same as for print
43
            ReferenceType.Article,
44
            ReferenceType.Book,
45
            ReferenceType.InProceedings,
46
            ReferenceType.Journal,
47
            ReferenceType.PrintSeries,
48
            ReferenceType.Proceedings,
49
            ReferenceType.Section,
50
            ReferenceType.Thesis,
51
            // additional
52
            ReferenceType.WebPage,
53
            ReferenceType.Database,
54
            ReferenceType.CdDvd,
55
            ReferenceType.Report
56
            );
57

    
58
    /**
59
     *  TODO make configurable as preset and in TaxonNameEditor
60
     */
61
    public static final NomenclaturalCode NOMENCLATURAL_CODE = NomenclaturalCode.ICNAFP;
62

    
63
    /**
64
     * should be configurable per UI
65
     */
66
    public static final AnnotationType[] EDITABLE_ANOTATION_TYPES = new AnnotationType[]{AnnotationType.EDITORIAL()};
67

    
68
    public static final String ERROR_CONTACT_MESSAGE_LINE = "Please contact <a href=\"mailto:editsupport@bgbm.org\">editsupport@bgbm.org</a> for support and more information.";
69

    
70
    public static final List<Role> COLLECTION_EDITOR_SUB_COLLECTION_VISIBILITY_RESTRICTION = Arrays.asList(Role.ROLE_ADMIN, RolesAndPermissions.ROLE_CURATION);
71

    
72
    public static NumberFormat NUMBER_FORMAT_OVERRIDE = new DecimalFormat("#");
73
}
(7-7/8)