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.description;
|
11
|
|
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.XmlRootElement;
|
17
|
import javax.xml.bind.annotation.XmlType;
|
18
|
|
19
|
import org.apache.log4j.Logger;
|
20
|
import org.hibernate.envers.Audited;
|
21
|
|
22
|
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
23
|
import eu.etaxonomy.cdm.model.common.TermVocabulary;
|
24
|
|
25
|
/**
|
26
|
* The class representing kinds of formats used for structuring text
|
27
|
* (like "xml schema namespace", "rdf", or any other format).
|
28
|
*
|
29
|
* @author m.doering
|
30
|
* @version 1.0
|
31
|
* @created 08-Nov-2007 13:06:59
|
32
|
*/
|
33
|
@XmlAccessorType(XmlAccessType.FIELD)
|
34
|
@XmlType(name = "TextFormat")
|
35
|
@XmlRootElement(name = "TextFormat")
|
36
|
@Entity
|
37
|
@Audited
|
38
|
public class TextFormat extends DefinedTermBase<TextFormat> {
|
39
|
private static final long serialVersionUID = 2063382669537212917L;
|
40
|
@SuppressWarnings("unused")
|
41
|
private static final Logger logger = Logger.getLogger(TextFormat.class);
|
42
|
|
43
|
// ************* CONSTRUCTORS *************/
|
44
|
/**
|
45
|
* Class constructor: creates a new empty text format instance.
|
46
|
*
|
47
|
* @see #TextFormat(String, String, String, boolean, boolean)
|
48
|
*/
|
49
|
protected TextFormat() {
|
50
|
super();
|
51
|
}
|
52
|
|
53
|
/**
|
54
|
* Class constructor: creates a new text format instance with a description,
|
55
|
* a label and a label abbreviation.
|
56
|
*
|
57
|
* @param term the string (in the default language) describing the
|
58
|
* new text format to be created
|
59
|
* @param label the string identifying the new text format to be created
|
60
|
* @param labelAbbrev the string identifying (in abbreviated form) the
|
61
|
* new text format to be created
|
62
|
* @see #TextFormat()
|
63
|
*/
|
64
|
public TextFormat(String term, String label, String labelAbbrev) {
|
65
|
super(term, label, labelAbbrev);
|
66
|
}
|
67
|
|
68
|
//********* METHODS **************************************/
|
69
|
/**
|
70
|
* Creates a new empty text format instance.
|
71
|
*
|
72
|
* @see #NewInstance(String, String, String, boolean, boolean)
|
73
|
*/
|
74
|
public static TextFormat NewInstance(){
|
75
|
return new TextFormat();
|
76
|
}
|
77
|
/**
|
78
|
* Creates a new text format instance with a description, a label
|
79
|
* and a label abbreviation.
|
80
|
*
|
81
|
* @param term the string (in the default language) describing the
|
82
|
* new text format to be created
|
83
|
* @param label the string identifying the new text format to be created
|
84
|
* @param labelAbbrev the string identifying (in abbreviated form) the
|
85
|
* new text format to be created
|
86
|
* @see #NewInstance()
|
87
|
*/
|
88
|
public static TextFormat NewInstance(String term, String label, String labelAbbrev){
|
89
|
return new TextFormat(term, label, labelAbbrev);
|
90
|
}
|
91
|
|
92
|
@Override
|
93
|
protected void setDefaultTerms(TermVocabulary<TextFormat> termVocabulary) {
|
94
|
// TODO Auto-generated method stub
|
95
|
|
96
|
}
|
97
|
}
|