Project

General

Profile

Download (1.92 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2019 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.term;
10

    
11
import java.util.Set;
12

    
13
import javax.persistence.Entity;
14
import javax.xml.bind.annotation.XmlAccessType;
15
import javax.xml.bind.annotation.XmlAccessorType;
16
import javax.xml.bind.annotation.XmlType;
17

    
18
import org.apache.log4j.Logger;
19
import org.hibernate.envers.Audited;
20

    
21
/**
22
 * @author a.mueller
23
 * @since 07.03.2019
24
 */
25
@XmlAccessorType(XmlAccessType.FIELD)
26
@XmlType(name = "TermGraph", propOrder = {
27
})
28
@Entity
29
@Audited
30
public abstract class TermGraphBase<TERM extends DefinedTermBase, REL extends TermRelationBase> //<TERM, REL, TermGraphBase>
31
            extends TermCollection<TERM, REL>
32
            implements ITermGraph<TERM, REL>{
33

    
34
    private static final long serialVersionUID = -704169783744494023L;
35

    
36
    @SuppressWarnings("unused")
37
    private static final Logger logger = Logger.getLogger(TermGraphBase.class);
38

    
39
 // ******************** CONSTRUCTOR *************************************/
40

    
41
    @Deprecated
42
    protected TermGraphBase(){}
43

    
44
    protected TermGraphBase(TermType termType) {
45
        super(termType);
46
    }
47

    
48
    @Override
49
    public Set<REL> getTermRelations() {
50
        return super.termRelations();
51

    
52
    }
53
    /**
54
     * For now protected to avoid type checking etc. Might become
55
     * public in future
56
     * @param termRelations
57
     */
58
//    @Override  //not yet public
59
    protected void setTermRelations(Set<REL> termRelations) {
60
        super.termRelations(termRelations);
61
    }
62

    
63
    public abstract Set<TERM> getDistinctTerms();
64

    
65
    @Override
66
    public TermGraphBase<TERM, REL> clone() throws CloneNotSupportedException {
67
        TermGraphBase<TERM, REL> result = (TermGraphBase<TERM, REL>)super.clone();
68
        return result;
69
    }
70
}
(22-22/33)