Project

General

Profile

« Previous | Next » 

Revision 9b27ee38

Added by Andreas Müller over 13 years ago

reference.uri from String to java.net.Uri (#2150)

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/Reference.java
10 10
package eu.etaxonomy.cdm.model.reference;
11 11

  
12 12

  
13
import java.net.URI;
13 14
import java.util.List;
14 15

  
15 16
import javax.persistence.Column;
......
35 36
import org.hibernate.annotations.Cascade;
36 37
import org.hibernate.annotations.CascadeType;
37 38
import org.hibernate.annotations.Table;
39
import org.hibernate.annotations.Type;
38 40
import org.hibernate.envers.Audited;
39 41
import org.hibernate.search.annotations.Field;
40 42
import org.hibernate.search.annotations.Index;
......
264 266
	@NullOrNotEmpty
265 267
	@Length(max = 255)
266 268
	@Pattern(regexp = "^([a-z0-9+.-]+):(?://(?:((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9A-F]{2})*)@)?((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9A-F]{2})*)(?::(\\d*))?(/(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9A-F]{2})*)?|(/?(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9A-F]{2})+(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9A-F]{2})*)?)(?:\\?((?:[a-z0-9-._~!$&'()*+,;=:/?@]|%[0-9A-F]{2})*))?(?:#((?:[a-z0-9-._~!$&'()*+,;=:/?@]|%[0-9A-F]{2})*))?$", groups = Level2.class, message = "{eu.etaxonomy.cdm.model.reference.Reference.uri.message}") 
267
	private String uri;
269
	@Type(type="uriUserType")
270
	private URI uri;
268 271
	
269 272
	//flag to subselect only references that could be useful for nomenclatural citations. If a reference is used as a
270 273
	//nomenclatural reference in a name this flag should be automatically set
......
515 518
	 * 
516 519
	 * @return  the URI of <i>this</i> reference
517 520
	 */
518
	public String getUri(){
521
	public URI getUri(){
519 522
		return this.uri;
520 523
	}
521 524
	/**
522 525
	 * @see #getUri()
523 526
	 */
524
	public void setUri(String uri){
527
	public void setUri(URI uri){
525 528
		this.uri = uri;
526 529
	}
527 530
	

Also available in: Unified diff