Project

General

Profile

Revision dd49afb6

IDdd49afb6cab0650a1cbe540a55d10cccb5db3de0
Parent 3d4b3223
Child 165e1209

Added by Andreas Müller 11 months ago

ref #6794 TermTreeNode-> TermNode in cdmlib-apps

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/AlgaTerraActivator.java
29 29
import eu.etaxonomy.cdm.io.common.Source;
30 30
import eu.etaxonomy.cdm.model.description.Feature;
31 31
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
32
import eu.etaxonomy.cdm.model.term.FeatureNode;
33
import eu.etaxonomy.cdm.model.term.FeatureTree;
32
import eu.etaxonomy.cdm.model.term.TermNode;
33
import eu.etaxonomy.cdm.model.term.TermTree;
34 34

  
35 35

  
36 36
/**
......
208 208
	 * @param app
209 209
	 */
210 210
	private void makeTaxonFeatureTree(AlgaTerraImportConfigurator config, ICdmRepository app) {
211
		FeatureTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
211
	    TermTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
212 212
		tree.setTitleCache("AlgaTerra Taxon Feature Tree", true);
213 213

  
214 214
		tree.getRoot().addChild(Feature.HABITAT());
......
236 236
	 */
237 237
	private void makeSpecimenFeatureTree(AlgaTerraImportConfigurator config, ICdmRepository app) {
238 238
		ITermService termService = app.getTermService();
239
		FeatureTree<Feature> specimenTree = FeatureTree.NewInstance(specimenFeatureTreeUuid);
239
		TermTree<Feature> specimenTree = TermTree.NewFeatureInstance(specimenFeatureTreeUuid);
240 240
//		FeatureTree specimenTree = TreeCreator.flatTree(specimenFeatureTreeUuid, config.getFeatureMap(), featureKeyList);
241 241
		specimenTree.setTitleCache("AlgaTerra Specimen Feature Tree", true);
242
		FeatureNode<Feature> root = specimenTree.getRoot();
242
		TermNode<Feature> root = specimenTree.getRoot();
243 243

  
244 244

  
245 245
		root.addChild(Feature.IMAGE());
......
256 256
		addFeatureNodeByUuid(root, termService, AlgaTerraImportTransformer.uuidFeatureConductivity);
257 257
		addFeatureNodeByUuid(root, termService, AlgaTerraImportTransformer.uuidFeatureWaterTemperature);
258 258
		addFeatureNodeByUuid(root, termService, AlgaTerraImportTransformer.uuidFeatureSilica);
259
		FeatureNode nitrogenNode = makeNitrogenNode(root, termService);
259
		TermNode<Feature> nitrogenNode = makeNitrogenNode(root, termService);
260 260
		addFeatureNodeByUuid(nitrogenNode, termService, AlgaTerraImportTransformer.uuidFeatureNitrate);
261 261
		addFeatureNodeByUuid(nitrogenNode, termService, AlgaTerraImportTransformer.uuidFeatureNitrite);
262 262
		addFeatureNodeByUuid(nitrogenNode, termService, AlgaTerraImportTransformer.uuidFeatureAmmonium);
......
272 272
		app.getFeatureTreeService().saveOrUpdate(specimenTree);
273 273
	}
274 274

  
275
	private FeatureNode<Feature> makeNitrogenNode(FeatureNode<Feature> root, ITermService termService) {
275
	private TermNode<Feature> makeNitrogenNode(TermNode<Feature> root, ITermService termService) {
276 276
		Feature nFeature = Feature.NewInstance("Supra feature for all Nitrogen related subfeatures", "Nitrogen", "N");
277 277
		termService.save(nFeature);
278
		FeatureNode<Feature> nNode = root.addChild(nFeature);
278
		TermNode<Feature> nNode = root.addChild(nFeature);
279 279
		return nNode;
280 280
	}
281 281

  
......
295 295
	 * @param termService
296 296
	 * @param featureUuid
297 297
	 */
298
	private void addFeatureNodeByUuid(FeatureNode<Feature> root, ITermService termService, UUID featureUuid) {
298
	private void addFeatureNodeByUuid(TermNode<Feature> root, ITermService termService, UUID featureUuid) {
299 299
		Feature feature = (Feature)termService.find(featureUuid);
300 300
		if (feature != null){
301 301
			root.addChild(feature);
app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/CampanulaceaeActivator.java
26 26
import eu.etaxonomy.cdm.io.common.Source;
27 27
import eu.etaxonomy.cdm.model.description.Feature;
28 28
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
29
import eu.etaxonomy.cdm.model.term.FeatureTree;
29
import eu.etaxonomy.cdm.model.term.TermTree;
30 30

  
31 31

  
32 32
/**
......
175 175
			ICdmRepository app = bmImport.getCdmAppController();
176 176

  
177 177
			//make feature tree
178
			FeatureTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, bmImportConfigurator.getFeatureMap(), featureKeyList);
178
			TermTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, bmImportConfigurator.getFeatureMap(), featureKeyList);
179 179
			tree.getRoot().addChild(Feature.DISTRIBUTION(), 1);
180 180
			app.getFeatureTreeService().saveOrUpdate(tree);
181 181
		}
app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/CaucasusEuroMedActivator.java
58 58
import eu.etaxonomy.cdm.model.taxon.Taxon;
59 59
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
60 60
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
61
import eu.etaxonomy.cdm.model.term.FeatureTree;
62 61
import eu.etaxonomy.cdm.model.term.Representation;
62
import eu.etaxonomy.cdm.model.term.TermTree;
63 63
import eu.etaxonomy.cdm.persistence.hibernate.permission.Role;
64 64
import eu.etaxonomy.cdm.persistence.query.MatchMode;
65 65
import eu.etaxonomy.cdm.persistence.query.OrderHint;
......
399 399
                TransactionStatus tx = app.startTransaction();
400 400

  
401 401
                //make feature tree
402
                FeatureTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
402
                TermTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
403 403
                tree.setTitleCache("Euro+Med Feature Tree", true);
404 404
                tree.getRoot().addChild(Feature.IMAGE());
405 405
                tree.getRoot().addChild(Feature.DISTRIBUTION(), 1);
app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/EuroMedActivator.java
58 58
import eu.etaxonomy.cdm.model.taxon.Taxon;
59 59
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
60 60
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
61
import eu.etaxonomy.cdm.model.term.FeatureTree;
62 61
import eu.etaxonomy.cdm.model.term.Representation;
62
import eu.etaxonomy.cdm.model.term.TermTree;
63 63
import eu.etaxonomy.cdm.persistence.hibernate.permission.Role;
64 64
import eu.etaxonomy.cdm.persistence.query.MatchMode;
65 65
import eu.etaxonomy.cdm.persistence.query.OrderHint;
......
403 403
                TransactionStatus tx = app.startTransaction();
404 404

  
405 405
                //make feature tree
406
                FeatureTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
406
                TermTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
407 407
                tree.setTitleCache("Euro+Med Feature Tree", true);
408 408
                tree.getRoot().addChild(Feature.IMAGE());
409 409
                tree.getRoot().addChild(Feature.DISTRIBUTION(), 1);
app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/IldisActivator.java
25 25
import eu.etaxonomy.cdm.io.common.Source;
26 26
import eu.etaxonomy.cdm.model.description.Feature;
27 27
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
28
import eu.etaxonomy.cdm.model.term.FeatureTree;
28
import eu.etaxonomy.cdm.model.term.TermTree;
29 29

  
30 30
/**
31 31
 * @author a.mueller
......
157 157
			ICdmRepository app = bmImport.getCdmAppController();
158 158

  
159 159
			//make feature tree
160
			FeatureTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, bmImportConfigurator.getFeatureMap(), featureKeyList);
160
			TermTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, bmImportConfigurator.getFeatureMap(), featureKeyList);
161 161
			tree.getRoot().addChild(Feature.IMAGE());
162 162
			tree.getRoot().addChild(Feature.DISTRIBUTION(), 2);
163 163
			app.getFeatureTreeService().saveOrUpdate(tree);
app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/MTStandardlisteActivator.java
24 24
import eu.etaxonomy.cdm.io.common.Source;
25 25
import eu.etaxonomy.cdm.model.description.Feature;
26 26
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
27
import eu.etaxonomy.cdm.model.term.FeatureTree;
27
import eu.etaxonomy.cdm.model.term.TermTree;
28 28

  
29 29
public class MTStandardlisteActivator {
30 30

  
......
152 152
				ICdmRepository app = bmImport.getCdmAppController();
153 153

  
154 154
				//make feature tree
155
				FeatureTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
155
				TermTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
156 156
				tree.getRoot().addChild(Feature.IMAGE());
157 157
				tree.getRoot().addChild(Feature.DISTRIBUTION(), 2);
158 158
				app.getFeatureTreeService().saveOrUpdate(tree);
app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/TreeCreator.java
16 16
import org.apache.log4j.Logger;
17 17

  
18 18
import eu.etaxonomy.cdm.model.description.Feature;
19
import eu.etaxonomy.cdm.model.term.FeatureNode;
20
import eu.etaxonomy.cdm.model.term.FeatureTree;
19
import eu.etaxonomy.cdm.model.term.TermNode;
20
import eu.etaxonomy.cdm.model.term.TermTree;
21 21

  
22 22
/**
23 23
 * @author a.mueller
......
27 27
	@SuppressWarnings("unused")
28 28
	private static final Logger logger = Logger.getLogger(TreeCreator.class);
29 29

  
30
	public static FeatureTree<Feature> flatTree(UUID featureTreeUuid, Map<Integer, Feature> featureMap, Object[] featureKeyList){
31
		FeatureTree<Feature> result = FeatureTree.NewInstance(featureTreeUuid);
32
		FeatureNode<Feature> root = result.getRoot();
30
	public static TermTree<Feature> flatTree(UUID featureTreeUuid, Map<Integer, Feature> featureMap, Object[] featureKeyList){
31
	    TermTree<Feature> result = TermTree.NewFeatureInstance(featureTreeUuid);
32
	    TermNode<Feature> root = result.getRoot();
33 33

  
34 34
		for (Object featureKey : featureKeyList){
35 35
			Feature feature = featureMap.get(featureKey);
......
51 51

  
52 52
		Object[] strFeatureList = new Integer[]{1,2};
53 53

  
54
		FeatureTree<Feature> tree = TreeCreator.flatTree(UUID.randomUUID(), map, strFeatureList);
54
		TermTree<Feature> tree = TreeCreator.flatTree(UUID.randomUUID(), map, strFeatureList);
55 55
		System.out.println(tree.getRootChildren());
56 56
	}
57 57
}
app-import/src/main/java/eu/etaxonomy/cdm/app/cuba/CubaActivator.java
28 28
import eu.etaxonomy.cdm.model.description.Feature;
29 29
import eu.etaxonomy.cdm.model.reference.Reference;
30 30
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
31
import eu.etaxonomy.cdm.model.term.FeatureNode;
32
import eu.etaxonomy.cdm.model.term.FeatureTree;
31
import eu.etaxonomy.cdm.model.term.TermNode;
32
import eu.etaxonomy.cdm.model.term.TermTree;
33 33

  
34 34
/**
35 35
 * @author a.mueller
......
210 210
        myImport.invoke(config);
211 211

  
212 212
        if (doVocabularies){
213
            FeatureTree tree = makeFeatureNodes(myImport.getCdmAppController().getTermService());
213
            TermTree<Feature> tree = makeFeatureNodes(myImport.getCdmAppController().getTermService());
214 214
            myImport.getCdmAppController().getFeatureTreeService().saveOrUpdate(tree);
215 215
            this.doVocabularies = false;
216 216
        }
......
226 226
		return result;
227 227
	}
228 228

  
229
	private FeatureTree<Feature> makeFeatureNodes(ITermService service){
229
	private TermTree<Feature> makeFeatureNodes(ITermService service){
230 230
//		CyprusTransformer transformer = new CyprusTransformer();
231 231

  
232
		FeatureTree<Feature> result = FeatureTree.NewInstance(featureTreeUuid);
232
	    TermTree<Feature> result = TermTree.NewFeatureInstance(featureTreeUuid);
233 233
		result.setTitleCache("Cuba Feature Tree", true);
234
		FeatureNode<Feature> root = result.getRoot();
234
		TermNode<Feature> root = result.getRoot();
235 235

  
236 236
		root.addChild(Feature.DISTRIBUTION());
237 237

  
app-import/src/main/java/eu/etaxonomy/cdm/app/cyprus/CyprusActivator.java
30 30
import eu.etaxonomy.cdm.model.description.Feature;
31 31
import eu.etaxonomy.cdm.model.reference.Reference;
32 32
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
33
import eu.etaxonomy.cdm.model.term.FeatureNode;
34
import eu.etaxonomy.cdm.model.term.FeatureTree;
33
import eu.etaxonomy.cdm.model.term.TermNode;
34
import eu.etaxonomy.cdm.model.term.TermTree;
35 35

  
36 36
/**
37 37
 * @author a.mueller
......
87 87
			config.setSourceReference(getSourceReference(config.getSourceReferenceTitle()));
88 88
			myImport.invoke(config);
89 89
			if (doTaxa){
90
				FeatureTree tree = makeFeatureNodes(myImport.getCdmAppController().getTermService());
90
				TermTree<Feature> tree = makeFeatureNodes(myImport.getCdmAppController().getTermService());
91 91
				myImport.getCdmAppController().getFeatureTreeService().saveOrUpdate(tree);
92 92
			}
93 93

  
......
115 115
		return result;
116 116
	}
117 117

  
118
	private FeatureTree<Feature> makeFeatureNodes(ITermService service){
118
	private TermTree<Feature> makeFeatureNodes(ITermService service){
119 119
		CyprusTransformer transformer = new CyprusTransformer();
120 120

  
121
		FeatureTree<Feature> result = FeatureTree.NewInstance(featureTreeUuid);
121
		TermTree<Feature> result = TermTree.NewFeatureInstance(featureTreeUuid);
122 122
		result.setTitleCache("Cyprus Feature Tree", true);
123
		FeatureNode<Feature> root = result.getRoot();
123
		TermNode<Feature> root = result.getRoot();
124 124

  
125 125
		root.addChild(Feature.STATUS());
126 126

  
......
159 159
		}
160 160
	}
161 161

  
162
	public void addFeataureNodesByStringList(String[] featureStringList, FeatureNode<Feature> root, IInputTransformer transformer, ITermService termService){
162
	public void addFeataureNodesByStringList(String[] featureStringList, TermNode<Feature> root, IInputTransformer transformer, ITermService termService){
163 163
		try {
164 164
			for (String featureString : featureStringList){
165 165
			UUID featureUuid;
app-import/src/main/java/eu/etaxonomy/cdm/app/edaphobase/EdaphobaseActivator.java
22 22
import eu.etaxonomy.cdm.io.common.Source;
23 23
import eu.etaxonomy.cdm.io.edaphobase.EdaphobaseImportConfigurator;
24 24
import eu.etaxonomy.cdm.model.description.Feature;
25
import eu.etaxonomy.cdm.model.term.FeatureNode;
26
import eu.etaxonomy.cdm.model.term.FeatureTree;
25
import eu.etaxonomy.cdm.model.term.TermNode;
26
import eu.etaxonomy.cdm.model.term.TermTree;
27 27

  
28 28
/**
29 29
 * @author a.mueller
......
92 92
        CdmDefaultImport<EdaphobaseImportConfigurator> myImport = new CdmDefaultImport<>();
93 93
        myImport.invoke(config);
94 94

  
95
        FeatureTree<Feature> tree = makeFeatureNodes(myImport.getCdmAppController().getTermService());
95
        TermTree<Feature> tree = makeFeatureNodes(myImport.getCdmAppController().getTermService());
96 96
        myImport.getCdmAppController().getFeatureTreeService().saveOrUpdate(tree);
97 97
    }
98 98

  
99
    private FeatureTree<Feature> makeFeatureNodes(ITermService service){
99
    private TermTree<Feature> makeFeatureNodes(ITermService service){
100 100

  
101
        FeatureTree<Feature> result = FeatureTree.NewInstance(featureTreeUuid);
101
        TermTree<Feature> result = TermTree.NewFeatureInstance(featureTreeUuid);
102 102
        result.setTitleCache(featureTreeTitle, true);
103
        FeatureNode<Feature> root = result.getRoot();
103
        TermNode<Feature> root = result.getRoot();
104 104

  
105 105
        Feature distributionFeature = (Feature)service.find(Feature.DISTRIBUTION().getUuid());
106 106
        root.addChild(distributionFeature);
app-import/src/main/java/eu/etaxonomy/cdm/app/mexico/MexicoConabioActivator.java
28 28
import eu.etaxonomy.cdm.model.description.Feature;
29 29
import eu.etaxonomy.cdm.model.reference.Reference;
30 30
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
31
import eu.etaxonomy.cdm.model.term.FeatureNode;
32
import eu.etaxonomy.cdm.model.term.FeatureTree;
33 31
import eu.etaxonomy.cdm.model.term.Representation;
32
import eu.etaxonomy.cdm.model.term.TermNode;
33
import eu.etaxonomy.cdm.model.term.TermTree;
34 34
import eu.etaxonomy.cdm.strategy.parser.TimePeriodParser;
35 35

  
36 36
/**
......
91 91
        myImport.invoke(config);
92 92

  
93 93
        if (true){
94
            FeatureTree<Feature> tree = makeFeatureNodes(myImport.getCdmAppController());
94
            TermTree<Feature> tree = makeFeatureNodes(myImport.getCdmAppController());
95 95
            myImport.getCdmAppController().getFeatureTreeService().saveOrUpdate(tree);
96 96
        }
97 97

  
......
127 127
        return result;
128 128
    }
129 129

  
130
    private FeatureTree<Feature> makeFeatureNodes(ICdmRepository app){
130
    private TermTree<Feature> makeFeatureNodes(ICdmRepository app){
131 131

  
132
        FeatureTree<Feature> result = FeatureTree.NewInstance(featureTreeUuid);
132
        TermTree<Feature> result = TermTree.NewFeatureInstance(featureTreeUuid);
133 133
        result.setTitleCache("Mexico Rubiaceae Feature Tree", true);
134
        FeatureNode<Feature> root = result.getRoot();
134
        TermNode<Feature> root = result.getRoot();
135 135

  
136 136
        Feature distribution = Feature.DISTRIBUTION();
137 137
        Representation rep = Representation.NewInstance("Distribución", "Distribución", null, Language.SPANISH_CASTILIAN());
app-import/src/main/java/eu/etaxonomy/cdm/app/vibrant/EuroMedActivatorVibrant.java
32 32
import eu.etaxonomy.cdm.model.description.Feature;
33 33
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
34 34
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
35
import eu.etaxonomy.cdm.model.term.FeatureTree;
35
import eu.etaxonomy.cdm.model.term.TermTree;
36 36

  
37 37

  
38 38
/**
......
233 233
			ICdmRepository app = bmImport.getCdmAppController();
234 234

  
235 235
			//make feature tree
236
			FeatureTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
236
			TermTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
237 237
			tree.getRoot().addChild(Feature.IMAGE());
238 238
			tree.getRoot().addChild(Feature.DISTRIBUTION(), 2);
239 239
			app.getFeatureTreeService().saveOrUpdate(tree);
app-import/src/main/java/eu/etaxonomy/cdm/app/vibrant/EuroMedVibrantActivator.java
32 32
import eu.etaxonomy.cdm.model.description.Feature;
33 33
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
34 34
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
35
import eu.etaxonomy.cdm.model.term.FeatureTree;
35
import eu.etaxonomy.cdm.model.term.TermTree;
36 36

  
37 37

  
38 38
/**
......
233 233
			ICdmRepository app = bmImport.getCdmAppController();
234 234

  
235 235
			//make feature tree
236
			FeatureTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
236
			TermTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, config.getFeatureMap(), featureKeyList);
237 237
			tree.getRoot().addChild(Feature.IMAGE());
238 238
			tree.getRoot().addChild(Feature.DISTRIBUTION(), 2);
239 239
			app.getFeatureTreeService().saveOrUpdate(tree);
app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/cichorieae/CichorieaeActivator.java
36 36
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
37 37
import eu.etaxonomy.cdm.model.name.TaxonName;
38 38
import eu.etaxonomy.cdm.model.reference.ISourceable;
39
import eu.etaxonomy.cdm.model.term.FeatureTree;
39
import eu.etaxonomy.cdm.model.term.TermTree;
40 40

  
41 41

  
42 42
/**
......
223 223
			logger.info(obj);
224 224

  
225 225
			//make feature tree
226
			FeatureTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, bmImportConfigurator.getFeatureMap(), featureKeyList);
226
			TermTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, bmImportConfigurator.getFeatureMap(), featureKeyList);
227 227
			tree.getRoot().addChild(Feature.IMAGE());
228 228
			tree.getRoot().addChild(Feature.DISTRIBUTION(), 2);
229 229
			app.getFeatureTreeService().saveOrUpdate(tree);
app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/diptera/DipteraActivator.java
32 32
import eu.etaxonomy.cdm.model.description.Feature;
33 33
import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
34 34
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
35
import eu.etaxonomy.cdm.model.term.FeatureTree;
35
import eu.etaxonomy.cdm.model.term.TermTree;
36 36

  
37 37

  
38 38
/**
......
194 194
			}
195 195
			//make feature tree
196 196
			app = bmImport.getCdmAppController();
197
			FeatureTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, bmImportConfigurator.getFeatureMap(), featureKeyList);
197
			TermTree<Feature> tree = TreeCreator.flatTree(featureTreeUuid, bmImportConfigurator.getFeatureMap(), featureKeyList);
198 198
			// add image
199 199
			tree.getRoot().addChild(Feature.IMAGE());
200 200
			// add distribution
app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/palmae/PalmaeActivator.java
32 32
import eu.etaxonomy.cdm.io.common.ImportResult;
33 33
import eu.etaxonomy.cdm.io.tcsrdf.TcsRdfImportConfigurator;
34 34
import eu.etaxonomy.cdm.model.description.Feature;
35
import eu.etaxonomy.cdm.model.term.FeatureNode;
36
import eu.etaxonomy.cdm.model.term.FeatureTree;
35
import eu.etaxonomy.cdm.model.term.TermNode;
36
import eu.etaxonomy.cdm.model.term.TermTree;
37 37

  
38 38
/**
39 39
 * @author a.mueller
......
122 122
			logger.info("Make feature tree");
123 123
			ICdmRepository app = tcsImport.getCdmAppController();
124 124

  
125
			FeatureTree<Feature> tree = getFeatureTree();
125
			TermTree<Feature> tree = getFeatureTree();
126 126
			app.getFeatureTreeService().saveOrUpdate(tree);
127 127
			System.out.println("End import from TCS ("+ source.toString() + ")...");
128 128

  
......
136 136
	}
137 137

  
138 138

  
139
	private FeatureTree<Feature> getFeatureTree(){
139
	private TermTree<Feature> getFeatureTree(){
140 140

  
141
		FeatureTree<Feature> result = FeatureTree.NewInstance(featureTreeUuid);
142
		FeatureNode<Feature> root = result.getRoot();
141
	    TermTree<Feature> result = TermTree.NewFeatureInstance(featureTreeUuid);
142
		TermNode<Feature> root = result.getRoot();
143 143

  
144 144
		root.addChild(Feature.INTRODUCTION());
145 145
		root.addChild(Feature.DISTRIBUTION());
app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/palmae/PalmaePostImportUpdater.java
30 30
import eu.etaxonomy.cdm.model.taxon.Synonym;
31 31
import eu.etaxonomy.cdm.model.taxon.Taxon;
32 32
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
33
import eu.etaxonomy.cdm.model.term.FeatureNode;
34
import eu.etaxonomy.cdm.model.term.FeatureTree;
33
import eu.etaxonomy.cdm.model.term.TermNode;
34
import eu.etaxonomy.cdm.model.term.TermTree;
35 35

  
36 36
/**
37 37
 * @author a.mueller
......
55 55

  
56 56
			TransactionStatus tx = cdmApp.startTransaction();
57 57

  
58
			FeatureTree<Feature> tree = cdmApp.getFeatureTreeService().find(featureTreeUuid);
59
			FeatureNode<Feature> root = tree.getRoot();
58
			TermTree<Feature> tree = cdmApp.getFeatureTreeService().find(featureTreeUuid);
59
			TermNode<Feature> root = tree.getRoot();
60 60

  
61 61
			List<Feature> featureList = cdmApp.getTermService().list(Feature.class, null, null, null, null);
62 62
			for (Feature feature : featureList){
......
128 128
			}
129 129
			//add citation feature to feature tree
130 130
			UUID featureTreeUuid = PalmaeActivator.featureTreeUuid;
131
			FeatureTree<Feature> tree = cdmApp.getFeatureTreeService().find(featureTreeUuid);
132
			FeatureNode<Feature> root = tree.getRoot();
131
			TermTree<Feature> tree = cdmApp.getFeatureTreeService().find(featureTreeUuid);
132
			TermNode<Feature> root = tree.getRoot();
133 133
			List<Feature> featureList = cdmApp.getTermService().list(Feature.class, null, null, null, null);
134 134
			count = 0;
135 135
			for (Feature feature : featureList){
app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/palmae/UseImport.java
65 65
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
66 66
import eu.etaxonomy.cdm.model.term.DefinedTerm;
67 67
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
68
import eu.etaxonomy.cdm.model.term.FeatureTree;
68
import eu.etaxonomy.cdm.model.term.TermTree;
69 69
import eu.etaxonomy.cdm.model.term.TermType;
70 70
import eu.etaxonomy.cdm.model.term.TermVocabulary;
71 71

  
......
763 763
		}
764 764
		if(featureUseRecord == null|| featureUseSummary == null) {
765 765
			TermVocabulary<Feature> featureVocabulary = vocabularyService.find((UUID.fromString("b187d555-f06f-4d65-9e53-da7c93f8eaa8")));
766
			FeatureTree<Feature> palmWebFeatureTree = featureTreeService.find(UUID.fromString("72ccce05-7cc8-4dab-8e47-bf3f5fd848a0"));
766
			TermTree<Feature> palmWebFeatureTree = featureTreeService.find(UUID.fromString("72ccce05-7cc8-4dab-8e47-bf3f5fd848a0"));
767 767
			//List<FeatureTree> featureTrees = CdmStore.getService(IFeatureTreeService.class).list(FeatureTree.class, null, null, null, null);
768 768

  
769 769
			if (featureUseRecord == null ) {
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelFactsImport.java
70 70
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
71 71
import eu.etaxonomy.cdm.model.taxon.Taxon;
72 72
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
73
import eu.etaxonomy.cdm.model.term.FeatureTree;
74 73
import eu.etaxonomy.cdm.model.term.Representation;
75 74
import eu.etaxonomy.cdm.model.term.TermBase;
75
import eu.etaxonomy.cdm.model.term.TermTree;
76 76
import eu.etaxonomy.cdm.model.term.TermType;
77 77
import eu.etaxonomy.cdm.model.term.TermVocabulary;
78 78
import eu.etaxonomy.cdm.strategy.exceptions.UnknownCdmTypeException;
......
117 117
		Source source = state.getConfig().getSource();
118 118
        boolean createFeatureTree = state.getConfig().isSalvador();  //for some reason feature tree creation does not work for salavdor
119 119

  
120
        FeatureTree featureTree = (!createFeatureTree) ? null : FeatureTree.NewInstance(state.getConfig().getFeatureTreeUuid());
120
        TermTree<Feature> featureTree = (!createFeatureTree) ? null : TermTree.NewFeatureInstance(state.getConfig().getFeatureTreeUuid());
121 121
        if (featureTree!= null && createFeatureTree){
122 122
            featureTree.setTitleCache(state.getConfig().getFeatureTreeTitle(), true);
123 123
        }
app-import/src/main/java/eu/etaxonomy/cdm/io/greece/FloraHellenicaTermImport.java
26 26
import eu.etaxonomy.cdm.model.description.State;
27 27
import eu.etaxonomy.cdm.model.location.NamedArea;
28 28
import eu.etaxonomy.cdm.model.location.NamedAreaType;
29
import eu.etaxonomy.cdm.model.term.FeatureNode;
30
import eu.etaxonomy.cdm.model.term.FeatureTree;
31 29
import eu.etaxonomy.cdm.model.term.OrderedTermBase;
32 30
import eu.etaxonomy.cdm.model.term.OrderedTermVocabulary;
31
import eu.etaxonomy.cdm.model.term.TermNode;
32
import eu.etaxonomy.cdm.model.term.TermTree;
33 33
import eu.etaxonomy.cdm.model.term.TermType;
34 34
import eu.etaxonomy.cdm.model.term.TermVocabulary;
35 35

  
......
435 435
            hasFeatureTree = true;
436 436
            return;
437 437
        }
438
        FeatureTree<Feature> result = FeatureTree.NewInstance(state.getConfig().getUuidFeatureTree());
438
        TermTree<Feature> result = TermTree.NewFeatureInstance(state.getConfig().getUuidFeatureTree());
439 439
        result.setTitleCache(state.getConfig().getFeatureTreeTitle(), true);
440
        FeatureNode<Feature> root = result.getRoot();
440
        TermNode<Feature> root = result.getRoot();
441 441
        ITermService service = getTermService();
442 442

  
443 443
        UUID uuid = FloraHellenicaTransformer.uuidFloraHellenicaTaxonInfoFeature;
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/in/BfnXmlImportFeature.java
28 28
import eu.etaxonomy.cdm.model.description.Feature;
29 29
import eu.etaxonomy.cdm.model.description.State;
30 30
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
31
import eu.etaxonomy.cdm.model.term.FeatureTree;
32 31
import eu.etaxonomy.cdm.model.term.OrderedTermVocabulary;
32
import eu.etaxonomy.cdm.model.term.TermTree;
33 33
import eu.etaxonomy.cdm.model.term.TermType;
34 34
import eu.etaxonomy.cdm.model.term.TermVocabulary;
35 35
import eu.etaxonomy.cdm.strategy.exceptions.UnknownCdmTypeException;
......
148 148
	}
149 149

  
150 150
	private void createFeatureTree(List<Feature> featureList) {
151
		FeatureTree featureTree = FeatureTree.NewInstance(featureList);
151
	    TermTree<Feature> featureTree = TermTree.NewInstance(featureList);
152 152
		String featureTreeName = "RedListFeatureTree";
153 153
		featureTree.setTitleCache(featureTreeName, true);
154 154
		getFeatureTreeService().save(featureTree);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)