Revision f4a56b86
Added by Andreas Müller over 2 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/jaxb/CdmIDResolver.java | ||
---|---|---|
15 | 15 |
import eu.etaxonomy.cdm.api.service.IAgentService; |
16 | 16 |
import eu.etaxonomy.cdm.api.service.ICollectionService; |
17 | 17 |
import eu.etaxonomy.cdm.api.service.IDescriptionService; |
18 |
import eu.etaxonomy.cdm.api.service.IFeatureTreeService; |
|
19 | 18 |
import eu.etaxonomy.cdm.api.service.IMediaService; |
20 | 19 |
import eu.etaxonomy.cdm.api.service.INameService; |
21 | 20 |
import eu.etaxonomy.cdm.api.service.IOccurrenceService; |
... | ... | |
23 | 22 |
import eu.etaxonomy.cdm.api.service.IService; |
24 | 23 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
25 | 24 |
import eu.etaxonomy.cdm.api.service.ITermService; |
25 |
import eu.etaxonomy.cdm.api.service.ITermTreeService; |
|
26 | 26 |
import eu.etaxonomy.cdm.api.service.IUserService; |
27 | 27 |
import eu.etaxonomy.cdm.api.service.IVocabularyService; |
28 | 28 |
import eu.etaxonomy.cdm.jaxb.UUIDAdapter; |
... | ... | |
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
@Autowired |
97 |
public void setFeatureTreeService(IFeatureTreeService featureTreeService) {
|
|
98 |
this.featureTreeService = featureTreeService;
|
|
97 |
public void setTermTreeService(ITermTreeService termTreeService) {
|
|
98 |
this.termTreeService = termTreeService;
|
|
99 | 99 |
} |
100 | 100 |
|
101 | 101 |
@Autowired |
... | ... | |
169 | 169 |
} else if(DescriptionBase.class.isAssignableFrom(targetType)) { |
170 | 170 |
return resolveObject(uuid, targetType, descriptionService); |
171 | 171 |
} else if(TermTree.class.isAssignableFrom(targetType)) { |
172 |
return resolveObject(uuid, targetType, featureTreeService);
|
|
172 |
return resolveObject(uuid, targetType, termTreeService);
|
|
173 | 173 |
} else if(Media.class.isAssignableFrom(targetType)) { |
174 | 174 |
return resolveObject(uuid, targetType, mediaService); |
175 | 175 |
} else if(TaxonName.class.isAssignableFrom(targetType)) { |
cdmlib-io/src/test/java/eu/etaxonomy/cdm/io/owl/in/StructureTreeOwlImportTest.java | ||
---|---|---|
65 | 65 |
private ITermService termService; |
66 | 66 |
|
67 | 67 |
@SpringBeanByType |
68 |
private ITermTreeService featureTreeService;
|
|
68 |
private ITermTreeService termTreeServcie;
|
|
69 | 69 |
|
70 | 70 |
@SpringBeanByType |
71 | 71 |
private IVocabularyService vocabularyService; |
... | ... | |
93 | 93 |
this.endTransaction(); |
94 | 94 |
|
95 | 95 |
String treeLabel = "test_structures"; |
96 |
List<TermTree> trees = featureTreeService.listByTitle(TermTree.class, treeLabel, MatchMode.EXACT, null, null, null, null, null);
|
|
96 |
List<TermTree> trees = termTreeServcie.listByTitle(TermTree.class, treeLabel, MatchMode.EXACT, null, null, null, null, null);
|
|
97 | 97 |
List<String> nodeProperties = new ArrayList<>(); |
98 | 98 |
nodeProperties.add("term"); |
99 | 99 |
nodeProperties.add("term.media"); |
100 |
TermTree<Feature> tree = featureTreeService.loadWithNodes(trees.iterator().next().getUuid(), null, nodeProperties);
|
|
100 |
TermTree<Feature> tree = termTreeServcie.loadWithNodes(trees.iterator().next().getUuid(), null, nodeProperties);
|
|
101 | 101 |
assertNotNull("featureTree should not be null", tree); |
102 | 102 |
|
103 | 103 |
assertEquals("Tree has wrong term type", TermType.Structure, tree.getTermType()); |
... | ... | |
180 | 180 |
this.endTransaction(); |
181 | 181 |
|
182 | 182 |
String treeLabel = "properties 1.0"; |
183 |
List<TermTree> trees = featureTreeService.listByTitle(TermTree.class, treeLabel, MatchMode.EXACT, null, null, null, null, null);
|
|
183 |
List<TermTree> trees = termTreeServcie.listByTitle(TermTree.class, treeLabel, MatchMode.EXACT, null, null, null, null, null);
|
|
184 | 184 |
List<String> nodeProperties = new ArrayList<>(); |
185 | 185 |
nodeProperties.add("term"); |
186 |
TermTree tree = featureTreeService.loadWithNodes(trees.iterator().next().getUuid(), null, nodeProperties);
|
|
186 |
TermTree tree = termTreeServcie.loadWithNodes(trees.iterator().next().getUuid(), null, nodeProperties);
|
|
187 | 187 |
assertNotNull("featureTree should not be null", tree); |
188 | 188 |
|
189 | 189 |
assertEquals("Tree has wrong term type", TermType.Property, tree.getTermType()); |
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/application/CdmRepository.java | ||
---|---|---|
44 | 44 |
import eu.etaxonomy.cdm.api.service.IEntityConstraintViolationService; |
45 | 45 |
import eu.etaxonomy.cdm.api.service.IEntityValidationService; |
46 | 46 |
import eu.etaxonomy.cdm.api.service.IEventBaseService; |
47 |
import eu.etaxonomy.cdm.api.service.IFeatureNodeService; |
|
48 |
import eu.etaxonomy.cdm.api.service.IFeatureTreeService; |
|
49 | 47 |
import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService; |
50 | 48 |
import eu.etaxonomy.cdm.api.service.IGroupService; |
51 | 49 |
import eu.etaxonomy.cdm.api.service.IIdentificationKeyService; |
... | ... | |
166 | 164 |
@Autowired |
167 | 165 |
private ICollectionService collectionService; |
168 | 166 |
@Autowired |
169 |
private IFeatureTreeService featureTreeService; |
|
170 |
@Autowired |
|
171 |
private IFeatureNodeService featureNodeService; |
|
172 |
@Autowired |
|
173 | 167 |
private ITermTreeService termTreeService; |
174 | 168 |
@Autowired |
175 | 169 |
private ITermNodeService termNodeService; |
cdmlib-services/src/main/resources/eu/etaxonomy/cdm/httpInvokerServices.xml | ||
---|---|---|
103 | 103 |
<property name="remoteInvocationExecutor" ref="remoteInvocationExecutor" /> |
104 | 104 |
</bean> |
105 | 105 |
|
106 |
<bean id="httpFeatureNodeService" |
|
107 |
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> |
|
108 |
<property name="service"> |
|
109 |
<ref bean="featureNodeServiceImpl" /> |
|
110 |
</property> |
|
111 |
<property name="serviceInterface"> |
|
112 |
<value>eu.etaxonomy.cdm.api.service.IFeatureNodeService</value> |
|
113 |
</property> |
|
114 |
<property name="remoteInvocationExecutor" ref="remoteInvocationExecutor" /> |
|
115 |
</bean> |
|
116 |
|
|
117 | 106 |
<bean id="httpTermNodeService" |
118 | 107 |
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> |
119 | 108 |
<property name="service"> |
... | ... | |
125 | 114 |
<property name="remoteInvocationExecutor" ref="remoteInvocationExecutor" /> |
126 | 115 |
</bean> |
127 | 116 |
|
128 |
<bean id="httpFeatureTreeService" |
|
129 |
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> |
|
130 |
<property name="service"> |
|
131 |
<ref bean="featureTreeServiceImpl" /> |
|
132 |
</property> |
|
133 |
<property name="serviceInterface"> |
|
134 |
<value>eu.etaxonomy.cdm.api.service.IFeatureTreeService</value> |
|
135 |
</property> |
|
136 |
<property name="remoteInvocationExecutor" ref="remoteInvocationExecutor" /> |
|
137 |
</bean> |
|
138 |
|
|
139 | 117 |
<bean id="httpTermTreeService" |
140 | 118 |
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> |
141 | 119 |
<property name="service"> |
cdmlib-services/src/main/resources/eu/etaxonomy/cdm/remoting-services.xml | ||
---|---|---|
35 | 35 |
<prop key="/remoting/common.service">httpCommonService</prop> |
36 | 36 |
<prop key="/remoting/database.service">httpDatabaseService</prop> |
37 | 37 |
<prop key="/remoting/description.service">httpDescriptionService</prop> |
38 |
<prop key="/remoting/featurenode.service">httpFeatureNodeService</prop> |
|
39 | 38 |
<prop key="/remoting/termnode.service">httpTermNodeService</prop> |
40 |
<prop key="/remoting/featuretree.service">httpFeatureTreeService</prop> |
|
41 | 39 |
<prop key="/remoting/termtree.service">httpTermTreeService</prop> |
42 | 40 |
<prop key="/remoting/grantedauthority.service">httpGrantedAuthorityService</prop> |
43 | 41 |
<prop key="/remoting/group.service">httpGroupService</prop> |
cdmlib-services/src/test/java/eu/etaxonomy/cdm/test/function/TestScriptService.java | ||
---|---|---|
249 | 249 |
// TermTree<Feature> ft1 = TermTree.NewInstance(); |
250 | 250 |
// FeatureNode fn1 = TermNode.NewInstance((Feature)null); |
251 | 251 |
// ft1.getRoot().addChild(fn1); |
252 |
// appCtr.getFeatureNodeService().save(fn1);
|
|
252 |
// appCtr.getTermNodeService().save(fn1);
|
|
253 | 253 |
// |
254 | 254 |
// TermNode fn2 = TermNode.NewInstance((Feature)null); |
255 | 255 |
// fn1.addChild(fn2); |
... | ... | |
257 | 257 |
// TermNode fn3 = TermNode.NewInstance((Feature)null); |
258 | 258 |
// fn1.addChild(fn2, 0); |
259 | 259 |
// |
260 |
// appCtr.getFeatureNodeService().saveOrUpdate(fn1);
|
|
260 |
// appCtr.getTermNodeService().saveOrUpdate(fn1);
|
|
261 | 261 |
// |
262 | 262 |
// ft1.getRoot().addChild(fn3, 0); |
263 |
// appCtr.getFeatureNodeService().saveOrUpdate(fn3);
|
|
263 |
// appCtr.getTermNodeService().saveOrUpdate(fn3);
|
|
264 | 264 |
// appCtr.getTermTreeService().saveOrUpdate(ft1); |
265 | 265 |
// } |
266 | 266 |
|
Also available in: Unified diff
remove further featureTree and featureNodeService occurrences