2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.model
.media
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.hibernate
.annotations
.Cascade
;
14 import org
.hibernate
.annotations
.CascadeType
;
15 import eu
.etaxonomy
.cdm
.model
.agent
.Agent
;
16 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
17 import eu
.etaxonomy
.cdm
.model
.common
.LanguageStringBase
;
19 import javax
.persistence
.*;
20 import javax
.xml
.bind
.annotation
.XmlAccessType
;
21 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
22 import javax
.xml
.bind
.annotation
.XmlElement
;
23 import javax
.xml
.bind
.annotation
.XmlIDREF
;
24 import javax
.xml
.bind
.annotation
.XmlRootElement
;
25 import javax
.xml
.bind
.annotation
.XmlSchemaType
;
26 import javax
.xml
.bind
.annotation
.XmlType
;
29 * Typically, rights information includes a statement about various property
30 * rights associated with the resource, including intellectual property rights.
31 * http://purl.org/dc/elements/1.1/rights http://dublincore.org/documents/dcmi-
35 * @created 08-Nov-2007 13:06:49
37 @XmlAccessorType(XmlAccessType
.FIELD
)
38 @XmlType(name
= "Rights", propOrder
= {
44 @XmlRootElement(name
= "Rights")
46 public class Rights
extends LanguageStringBase
{
47 private static final long serialVersionUID
= 4920749849951432284L;
48 private static final Logger logger
= Logger
.getLogger(Rights
.class);
50 //external location of copyright text
51 @XmlElement(name
= "URI")
54 @XmlElement(name
= "AbbreviatedText")
55 private String abbreviatedText
;
57 @XmlElement(name
= "Type")
59 @XmlSchemaType(name
= "IDREF")
60 private RightsTerm type
;
62 // owner etc as defined by the rightstype
63 @XmlElement(name
= "Agent")
65 @XmlSchemaType(name
= "IDREF")
73 public static Rights
NewInstance() {
74 logger
.debug("NewInstance");
82 public static Rights
NewInstance(String text
, Language language
) {
83 return new Rights(text
, language
);
96 protected Rights(String text
, Language language
) {
97 super(text
, language
);
101 @ManyToOne(fetch
= FetchType
.LAZY
)
102 @Cascade({CascadeType
.SAVE_UPDATE
})
103 public RightsTerm
getType(){
106 public void setType(RightsTerm type
){
111 public String
getUri(){
114 public void setUri(String uri
){
119 public String
getAbbreviatedText(){
120 return this.abbreviatedText
;
122 public void setAbbreviatedText(String abbreviatedStatement
){
123 this.abbreviatedText
= abbreviatedStatement
;
128 @Cascade({CascadeType
.SAVE_UPDATE
})
129 public Agent
getAgent() {
132 public void setAgent(Agent agent
) {