Project

General

Profile

« Previous | Next » 

Revision f0989f41

Added by Anahit Babadshanjan about 16 years ago

JAXB annotations - first drop

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/ReferenceBase.java
13 13
import javax.persistence.Entity;
14 14
import javax.persistence.ManyToOne;
15 15
import javax.persistence.Transient;
16
import javax.xml.bind.annotation.XmlAccessType;
17
import javax.xml.bind.annotation.XmlAccessorType;
18
import javax.xml.bind.annotation.XmlAnyElement;
19
import javax.xml.bind.annotation.XmlAttribute;
20
import javax.xml.bind.annotation.XmlElement;
21
import javax.xml.bind.annotation.XmlRootElement;
22
import javax.xml.bind.annotation.XmlTransient;
23
import javax.xml.bind.annotation.XmlType;
16 24

  
17 25
import org.apache.log4j.Logger;
18 26
import org.hibernate.annotations.Cascade;
......
32 40
 * @version 1.0
33 41
 * @created 08-Nov-2007 13:06:47
34 42
 */
43
@XmlAccessorType(XmlAccessType.FIELD)
44
@XmlType(name = "ReferenceBase", propOrder = {
45
	"uri",
46
	"isNomenclaturallyRelevant",
47
    "authorTeam",
48
    "cacheStrategy"
49
})
50
@XmlRootElement(name = "RelationshipBase")
35 51
@Entity
36 52
@Table(appliesTo="ReferenceBase", indexes = { @Index(name = "ReferenceBaseTitleCacheIndex", columnNames = { "titleCache" }) })
37 53
public abstract class ReferenceBase extends IdentifyableMediaEntity implements IParsable{
54
	
38 55
	static Logger logger = Logger.getLogger(ReferenceBase.class);
56
	
39 57
	//URIs like DOIs, LSIDs or Handles for this reference
58
	@XmlElement(name = "URI")
40 59
	private String uri;
60
	
41 61
	//flag to subselect only references that could be useful for nomenclatural citations. If a reference is used as a
42 62
	//nomenclatural reference in a name this flag should be automatically set
63
	@XmlElement(name = "IsNomenclaturallyRelevant")
43 64
	private boolean isNomenclaturallyRelevant;
65
	
66
	@XmlElement(name = "AuthorTeam")
44 67
	private TeamOrPersonBase authorTeam;
68

  
45 69
	//this flag will be set to true if the parseName method was unable to successfully parse the name
70
	@XmlAttribute
46 71
	private boolean hasProblem = false;
47 72
	
73
	@XmlAnyElement
48 74
	protected IReferenceBaseCacheStrategy<ReferenceBase> cacheStrategy;
49 75
	
50 76
	@ManyToOne

Also available in: Unified diff