cleaning up @Field annotations
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / molecular / GenBankAccession.java
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.molecular;
11
12
13 import java.net.URI;
14
15 import javax.persistence.Entity;
16 import javax.xml.bind.annotation.XmlAccessType;
17 import javax.xml.bind.annotation.XmlAccessorType;
18 import javax.xml.bind.annotation.XmlElement;
19 import javax.xml.bind.annotation.XmlRootElement;
20 import javax.xml.bind.annotation.XmlType;
21
22 import org.apache.log4j.Logger;
23 import org.hibernate.annotations.Type;
24 import org.hibernate.envers.Audited;
25 import org.hibernate.search.annotations.Analyze;
26 import org.hibernate.search.annotations.Field;
27
28 import eu.etaxonomy.cdm.model.common.VersionableEntity;
29
30 /**
31 * @author m.doering
32 * @version 1.0
33 * @created 08-Nov-2007 13:06:25
34 */
35 @XmlAccessorType(XmlAccessType.FIELD)
36 @XmlType(name = "GenBankAccession", propOrder = {
37 "accessionNumber",
38 "uri"
39 })
40 @XmlRootElement(name = "GenBankAccession")
41 @Entity
42 @Audited
43 public class GenBankAccession extends VersionableEntity {
44 private static final long serialVersionUID = -8179493118062601585L;
45 private static final Logger logger = Logger.getLogger(GenBankAccession.class);
46
47 @XmlElement(name = "AccessionNumber")
48 private String accessionNumber;
49
50 @XmlElement(name = "URI")
51 @Field(analyze = Analyze.NO)
52 @Type(type="uriUserType")
53 private URI uri;
54
55 //*********************** FACTORY ****************************************************/
56
57 public static GenBankAccession NewInstance(String accessionNumber){
58 GenBankAccession result = new GenBankAccession();
59 result.setAccessionNumber(accessionNumber);
60 return result;
61 }
62
63 //*********************** CONSTRUCTOR ****************************************************/
64
65 private GenBankAccession() {
66
67 }
68
69 //*********************** GETTER / SETTER ****************************************************/
70
71
72 public String getAccessionNumber(){
73 logger.debug("getAccessionNumber");
74 return this.accessionNumber;
75 }
76
77 /**
78 *
79 * @param accessionNumber accessionNumber
80 */
81 public void setAccessionNumber(String accessionNumber){
82 this.accessionNumber = accessionNumber;
83 }
84
85 public URI getUri(){
86 return this.uri;
87 }
88
89 /**
90 *
91 * @param uri uri
92 */
93 public void setUri(URI uri){
94 this.uri = uri;
95 }
96
97 }