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 eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
14
|
import eu.etaxonomy.cdm.model.name.NameRelationship;
|
15
|
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
|
16
|
|
17
|
|
18
|
import org.apache.log4j.Logger;
|
19
|
import javax.persistence.*;
|
20
|
import javax.xml.bind.annotation.XmlAccessType;
|
21
|
import javax.xml.bind.annotation.XmlAccessorType;
|
22
|
import javax.xml.bind.annotation.XmlRootElement;
|
23
|
import javax.xml.bind.annotation.XmlType;
|
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
|
public class TextFormat extends DefinedTermBase {
|
38
|
static Logger logger = Logger.getLogger(TextFormat.class);
|
39
|
|
40
|
// ************* CONSTRUCTORS *************/
|
41
|
/**
|
42
|
* Class constructor: creates a new empty text format instance.
|
43
|
*
|
44
|
* @see #TextFormat(String, String, String, boolean, boolean)
|
45
|
*/
|
46
|
protected TextFormat() {
|
47
|
super();
|
48
|
}
|
49
|
|
50
|
/**
|
51
|
* Class constructor: creates a new text format instance with a description,
|
52
|
* a label and a label abbreviation.
|
53
|
*
|
54
|
* @param term the string (in the default language) describing the
|
55
|
* new text format to be created
|
56
|
* @param label the string identifying the new text format to be created
|
57
|
* @param labelAbbrev the string identifying (in abbreviated form) the
|
58
|
* new text format to be created
|
59
|
* @see #TextFormat()
|
60
|
*/
|
61
|
public TextFormat(String term, String label, String labelAbbrev) {
|
62
|
super(term, label, labelAbbrev);
|
63
|
}
|
64
|
|
65
|
//********* METHODS **************************************/
|
66
|
/**
|
67
|
* Creates a new empty text format instance.
|
68
|
*
|
69
|
* @see #NewInstance(String, String, String, boolean, boolean)
|
70
|
*/
|
71
|
public static TextFormat NewInstance(){
|
72
|
return new TextFormat();
|
73
|
}
|
74
|
/**
|
75
|
* Creates a new text format instance with a description, a label
|
76
|
* and a label abbreviation.
|
77
|
*
|
78
|
* @param term the string (in the default language) describing the
|
79
|
* new text format to be created
|
80
|
* @param label the string identifying the new text format to be created
|
81
|
* @param labelAbbrev the string identifying (in abbreviated form) the
|
82
|
* new text format to be created
|
83
|
* @see #NewInstance()
|
84
|
*/
|
85
|
public static TextFormat NewInstance(String term, String label, String labelAbbrev){
|
86
|
return new TextFormat(term, label, labelAbbrev);
|
87
|
}
|
88
|
}
|