Project

General

Profile

Revision 5ba6074a

ID5ba6074aa8a77678f77815ba16fa54fc48df2a6c
Parent faf90483
Child 66cc80d5

Added by Andreas Müller almost 6 years ago

minor changes, remove private methods

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/Annotation.java
106 106
    @ManyToOne(fetch = FetchType.LAZY)
107 107
	private AnnotationType annotationType;
108 108

  
109
	// for external annotations/comments the URL of these can be set.
109
	// for external annotations/comments the URI of these can be set.
110 110
	// should be useful to implement trackback, pingback or linkback:
111 111
	// http://en.wikipedia.org/wiki/Linkback
112 112
	@XmlElement(name = "LinkbackUri")
......
174 174
		this.linkbackUri = linkbackUri;
175 175
	}
176 176

  
177
	/**
178
	 * private get/set methods for Hibernate that allows us to save the URL as strings
179
	 * @return
180
	 */
181
	private String getLinkbackUriStr() {
182
		if (linkbackUri == null){
183
			return null;
184
		}
185
		return linkbackUri.toString();
186
	}
187
	private void setLinkbackUriStr(String linkbackUriString) {
188
		if (linkbackUriString == null){
189
			this.linkbackUri = null;
190
		}else{
191
			try {
192
				this.linkbackUri = new URI(linkbackUriString);
193
			} catch (URISyntaxException e) {
194
                // TODO Auto-generated catch block
195
                e.printStackTrace();
196
            }
197
		}
198
	}
199 177

  
200 178
// ***************************** TO STRING ***********************************
201 179

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/LSIDAuthority.java
17 17
import javax.persistence.Entity;
18 18
import javax.persistence.FetchType;
19 19
import javax.persistence.MapKeyColumn;
20
import javax.persistence.MapKeyJoinColumn;
21 20
import javax.persistence.Transient;
22 21
import javax.wsdl.Definition;
23 22
import javax.xml.bind.annotation.XmlAccessType;
......
50 49
@Entity
51 50
@TypeDefs(@TypeDef(name="wsdlDefinitionUserType", typeClass=WSDLDefinitionUserType.class))
52 51
public class LSIDAuthority extends CdmBase {
53

  
54
	/**
55
	 * 
56
	 */
57 52
	private static final long serialVersionUID = 9168994979216936689L;
58 53

  
59 54
	public static final String AUTHORITY_ID_PREFIX = "lsidauth:";
cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/common/AnnotationTest.java
126 126

  
127 127
	/**
128 128
	 * Test method for {@link eu.etaxonomy.cdm.model.common.Annotation#getLinkbackUri()}.
129
	 * Test method for {@link eu.etaxonomy.cdm.model.common.Annotation#setLinkbackUri(java.net.URL)}.
129
	 * Test method for {@link eu.etaxonomy.cdm.model.common.Annotation#setLinkbackUri(URI))}.
130 130
	 */
131 131
	@Test
132 132
	public void testGetSetLinkbackUri() {

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)