Project

General

Profile

« Previous | Next » 

Revision 32563

new locators, increased major version

View differences:

DataTransformerFactory.java
7 7
import eu.dnetlib.data.collective.transformation.utils.TransformationRulesImportTool;
8 8
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpDocumentNotFoundException;
9 9
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException;
10
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService;
11
import eu.dnetlib.enabling.tools.ServiceLocator;
12 10

  
13 11
public class DataTransformerFactory {
14 12

  
15
	@Resource(name = "lookupLocator")
16
	private ServiceLocator<ISLookUpService> lookupLocator;
17

  
18 13
	@Resource(name = "vocabularyRegistry")
19 14
	private VocabularyRegistry vocabularyRegistry;
20
	
15

  
21 16
	@Resource(name = "transformationTemplate")
22 17
	private org.springframework.core.io.Resource transformationTemplate;
23
	
18

  
24 19
	@Resource(name = "defaultSchema")
25 20
	private org.springframework.core.io.Resource defaultSchema;
26
	
21

  
27 22
	@Resource(name = "transformationRuleProfileUtil")
28 23
	private TransformationRulesImportTool transformationRuleProfileUtil;
29
	
24

  
30 25
	@Resource(name = "resourceDao")
31 26
	private ResourceDao resourceDao;
32
	
33
	public SimpleDataTransformer createTransformer(String ruleid) throws ISLookUpDocumentNotFoundException, ISLookUpException {
34
		//String profile = lookupLocator.getService().getResourceProfile(ruleid); 
27

  
28
	public SimpleDataTransformer createTransformer(final String ruleid) throws ISLookUpDocumentNotFoundException, ISLookUpException {
29
		// String profile = lookupLocator.getService().getResourceProfile(ruleid);
35 30
		SimpleDataTransformer transformer = new SimpleDataTransformer(ruleid);
36 31
		try {
37 32
			transformer.setupEngine(vocabularyRegistry, transformationTemplate, defaultSchema, transformationRuleProfileUtil, resourceDao);
......
39 34
			throw new IllegalStateException(e);
40 35
		}
41 36
		return transformer;
42
	}	
37
	}
43 38
}

Also available in: Unified diff