Project

General

Profile

« Previous | Next » 

Revision 36812

BaseResource interface

View differences:

TransformationRule.java
1 1
package eu.dnetlib.enabling.datastructures;
2 2

  
3
import org.springframework.core.io.Resource;
4

  
3 5
import eu.dnetlib.enabling.annotations.DnetResource;
4 6
import eu.dnetlib.rmi.objects.is.DnetResourceFormat;
5 7
import eu.dnetlib.rmi.objects.is.DnetResourceKind;
6 8

  
7 9
@DnetResource(type = "TransformationRule", kind = DnetResourceKind.CONFIGURATION, format = DnetResourceFormat.TEXT)
8
public class TransformationRule {
10
public class TransformationRule extends AbstractTextResource {
9 11

  
10
	private String code;
11

  
12
	public TransformationRule() {}
13

  
14
	public TransformationRule(final String code) {
15
		this.code = code;
12
	public TransformationRule(final Resource resource) {
13
		super(resource);
16 14
	}
17 15

  
18
	public String getCode() {
19
		return code;
20
	}
21

  
22
	public void setCode(final String code) {
23
		this.code = code;
24
	}
25

  
26
	@Override
27
	public String toString() {
28
		return getCode();
29
	}
30

  
31 16
}

Also available in: Unified diff