Project

General

Profile

Download (3.66 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 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

    
10
package eu.etaxonomy.cdm.model.common;
11

    
12
import java.util.List;
13
import java.util.Set;
14

    
15
import eu.etaxonomy.cdm.model.media.Rights;
16

    
17
public interface IIdentifiableEntity extends ISourceable<IdentifiableSource>, IAnnotatableEntity{
18

    
19
    public LSID getLsid();
20

    
21
    public void setLsid(LSID lsid);
22

    
23
    public String generateTitle();
24

    
25
    public String getTitleCache();
26

    
27
    /**
28
     * Sets the title cache without changing the <code>protectCache</code> flag.<BR><BR>
29
     * NOTE: Use with care. If this flag is <code>false</code> the <code>titleCache</code> may be
30
     * recomputed with the next call of {@link #getTitleCache()}, which is automatically the case when
31
     * the object is persisted.
32
     * @see #setTitleCache(String, boolean)
33
     * @see #getTitleCache()
34
     * @param titleCache
35
     * @deprecated this method only exists to be in line with the Java Beans Specification (JSR 220 or JSR 273) .
36
     * As it will set the {@link #isProtectedTitleCache() protected} flag to false the title cache value
37
     * may be automatically recomputed later. There are only very rare use cases were a programmer may
38
     * want to use this method directly.
39
     * Better use {@link #setTitleCache(String, boolean)} with second parameter <code>protectCache</code>
40
     * set to <code>true</code>.
41
     */
42
    @Deprecated
43
    public void setTitleCache(String titleCache);
44

    
45
    /**
46
     * Sets the title cache.<BR>
47
     * NOTE: In most cases the <code>protectCache</code> argument should be set to <code>true</code>.
48
     * See comments at {@link #setTitleCache(String)}
49
     *
50
     * @param titleCache the new title cache
51
     * @param protectCache the protect flag, <b>should in most cases be set to <code>true</code></b>
52
     */
53
    public void setTitleCache(String titleCache, boolean protectCache);
54

    
55
    public boolean isProtectedTitleCache();
56

    
57
    public void setProtectedTitleCache(boolean protectedTitleCache);
58

    
59
    public Set<Rights> getRights();
60

    
61
    public void addRights(Rights right);
62

    
63
    public void removeRights(Rights right);
64

    
65
    public List<Credit> getCredits();
66

    
67
    public Credit getCredits(Integer index);
68

    
69
    public void addCredit(Credit credig);
70

    
71
    public void addCredit(Credit credit, int index);
72

    
73
    public void removeCredit(Credit credit);
74

    
75
    public void removeCredit(int index);
76

    
77
    public Set<Extension> getExtensions();
78

    
79
    public void addExtension(Extension extension);
80

    
81
    public void removeExtension(Extension extension);
82

    
83
//    public Set<Identifier> getIdentifiers();
84
//
85
//    public void addIdentifier(Identifier identifier);
86
//
87
//    public void removeIdentifier(Identifier identifier);
88

    
89

    
90
    /**
91
     * Overrides {@link eu.etaxonomy.cdm.model.common.CdmBase#toString()}.
92
     * This returns an String that identifies the object well without beeing necessarily unique.
93
     * Specification: This method should never call other object' methods so it can be well used for debugging
94
     * without problems like lazy loading, unreal states etc.
95
     * Note: If overriding this method's javadoc always copy or link the above requirement.
96
     * If not overwritten by a subclass method returns the class, id and uuid as a string for any CDM object.
97
     * For example: Taxon#13<b5938a98-c1de-4dda-b040-d5cc5bfb3bc0>
98
     * @see java.lang.Object#toString()
99
     */
100
    @Override
101
    public String toString();
102

    
103
    public byte[] getData();
104

    
105
}
(20-20/69)