Project

General

Profile

Download (3.51 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 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.model.reference;
10

    
11
import java.beans.Transient;
12

    
13
import eu.etaxonomy.cdm.common.URI;
14
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
15
import eu.etaxonomy.cdm.model.common.IParsable;
16
import eu.etaxonomy.cdm.strategy.cache.reference.IReferenceCacheStrategy;
17
import eu.etaxonomy.cdm.strategy.match.IMatchable;
18
import eu.etaxonomy.cdm.strategy.merge.IMergable;
19

    
20
/**
21
 * The upmost interface for references (information sources).
22
 * <P>
23
 * This class corresponds to: <ul>
24
 * <li> PublicationCitation according to the TDWG ontology
25
 * <li> Publication according to the TCS
26
 * <li> Reference according to the ABCD schema
27
 * </ul>
28
 */
29
public interface IReference
30
            extends IIdentifiableEntity,
31
                   IParsable, IMergable, IMatchable, Cloneable {
32

    
33
	/**
34
	 * Returns the reference type
35
	 */
36
	public ReferenceType getType() ;
37

    
38
	/**
39
	 * Sets the reference type
40
	 * @param type
41
	 */
42
	public void setType(ReferenceType type) ;
43

    
44
	/**
45
	 * Returns true if the type of the reference is the same as the passed parameter
46
	 * @param type
47
	 * @return boolean
48
	 */
49
	public boolean isOfType(ReferenceType type);
50

    
51
	/**
52
	 * Returns the references title
53
	 */
54
	public String getTitle();
55

    
56
	/**
57
	 * Sets the references title
58
	 * @param title
59
	 */
60
	public void setTitle(String title);
61

    
62
    /**
63
     * The abbreviated title is the short form for the title. It is usually used
64
     * as a representation of the title of references used in a nomenclatural
65
     * context.
66
     * @return
67
     */
68
    public String getAbbrevTitle();
69

    
70
    /**
71
     * Sets the {@link #getAbbrevTitle() abbreviated title}.
72
     * @param abbrevTitle
73
     */
74
    public void setAbbrevTitle(String abbrevTitle);
75

    
76
	/**
77
	 * Returns the Uniform Resource Identifier (URI) corresponding to <i>this</i>
78
	 * reference. An URI is a string of characters used to identify a resource
79
	 * on the Internet.
80
	 *
81
	 * @return  the URI of <i>this</i> reference
82
	 */
83
	public URI getUri();
84
	/**
85
	 * @see #getUri()
86
	 */
87
	public void setUri(URI uri);
88

    
89
	/**
90
	 * Returns the references abstract which is a summary of the content
91
	 */
92
	public String getReferenceAbstract();
93

    
94
	/**
95
	 * Sets the references abstract which is a summary of the content
96
	 * @param referenceAbstract
97
	 */
98
	public void setReferenceAbstract(String referenceAbstract);
99

    
100
    /**
101
     * @param defaultStrategy
102
     */
103
    public void setCacheStrategy(IReferenceCacheStrategy defaultStrategy);
104

    
105
    public IReferenceCacheStrategy getCacheStrategy();
106

    
107
    /**
108
	 * @see Cloneable
109
	 * @return
110
	 */
111
	public Object clone();
112

    
113
    /**
114
     * Sets both caches and protects them.
115
     * This is a convenience method to avoid
116
     * references with only one cache protected
117
     * leading to strange results in case the other
118
     * cache is used.
119
     *
120
     * https://dev.e-taxonomy.eu/redmine/issues/6449
121
     *
122
     * @see #setTitleCache(String)
123
     * @see #setTitleCache(String, boolean)
124
     * @see #setProtectedTitleCache(boolean)
125
     * @see #setAbbrevTitleCache(String)
126
     * @see #setAbbrevTitleCache(String, boolean)
127
     * @see #setProtectedAbbrevTitleCache(boolean)
128
     */
129
	@Transient
130
	@javax.persistence.Transient
131
    void setTitleCaches(String cache);
132
}
(21-21/41)