Project

General

Profile

« Previous | Next » 

Revision 7691ed2a

Added by Andreas Müller almost 5 years ago

ref #8257 remove factory method for term node creation in app-import

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/palmae/PalmaePostImportUpdater.java
55 55

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

  
58
			FeatureTree tree = cdmApp.getFeatureTreeService().find(featureTreeUuid);
59
			FeatureNode root = tree.getRoot();
58
			FeatureTree<Feature> tree = cdmApp.getFeatureTreeService().find(featureTreeUuid);
59
			FeatureNode<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){
63 63
				String label = feature.getLabel();
64 64
				if (relationships.equals(label)){
65
					FeatureNode newNode = FeatureNode.NewInstance(feature);
66
					root.addChild(newNode);
65
					root.addChild(feature);
67 66
					count++;
68 67
				}else if(taxonomicAccounts.equals(label)){
69
					FeatureNode newNode = FeatureNode.NewInstance(feature);
70
					root.addChild(newNode);
68
					root.addChild(feature);
71 69
					count++;
72 70
				}else if(fossilRecord.equals(label)){
73
					FeatureNode newNode = FeatureNode.NewInstance(feature);
74
					root.addChild(newNode);
71
					root.addChild(feature);
75 72
					count++;
76 73
				}
77 74
			}
......
131 128
			}
132 129
			//add citation feature to feature tree
133 130
			UUID featureTreeUuid = PalmaeActivator.featureTreeUuid;
134
			FeatureTree tree = cdmApp.getFeatureTreeService().find(featureTreeUuid);
135
			FeatureNode root = tree.getRoot();
131
			FeatureTree<Feature> tree = cdmApp.getFeatureTreeService().find(featureTreeUuid);
132
			FeatureNode<Feature> root = tree.getRoot();
136 133
			List<Feature> featureList = cdmApp.getTermService().list(Feature.class, null, null, null, null);
137 134
			count = 0;
138 135
			for (Feature feature : featureList){
139 136
				if (feature.equals(Feature.CITATION())){
140
					FeatureNode newNode = FeatureNode.NewInstance(feature);
141
					root.addChild(newNode);
137
					root.addChild(feature);
142 138
					count++;
143 139
				}
144 140
			}

Also available in: Unified diff