Revision db727ae6
Added by Andreas Müller almost 6 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/sdd/in/SDDImport.java | ||
---|---|---|
59 | 59 |
import eu.etaxonomy.cdm.model.common.TermVocabulary; |
60 | 60 |
import eu.etaxonomy.cdm.model.common.VersionableEntity; |
61 | 61 |
import eu.etaxonomy.cdm.model.description.CategoricalData; |
62 |
import eu.etaxonomy.cdm.model.description.DescriptiveDataSet; |
|
62 | 63 |
import eu.etaxonomy.cdm.model.description.Feature; |
63 | 64 |
import eu.etaxonomy.cdm.model.description.FeatureNode; |
64 | 65 |
import eu.etaxonomy.cdm.model.description.FeatureTree; |
... | ... | |
70 | 71 |
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue; |
71 | 72 |
import eu.etaxonomy.cdm.model.description.TaxonDescription; |
72 | 73 |
import eu.etaxonomy.cdm.model.description.TextData; |
73 |
import eu.etaxonomy.cdm.model.description.WorkingSet; |
|
74 | 74 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
75 | 75 |
import eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity; |
76 | 76 |
import eu.etaxonomy.cdm.model.media.ImageFile; |
... | ... | |
132 | 132 |
private Reference sourceReference = null; |
133 | 133 |
|
134 | 134 |
private Language datasetLanguage = null; |
135 |
private WorkingSet workingSet = null;
|
|
135 |
private DescriptiveDataSet descriptiveDataSet = null;
|
|
136 | 136 |
|
137 | 137 |
private final Namespace xmlNamespace = Namespace.getNamespace("xml","http://www.w3.org/XML/1998/namespace"); |
138 | 138 |
|
... | ... | |
269 | 269 |
|
270 | 270 |
//new |
271 | 271 |
Representation representation = Representation.NewInstance(detail, label, null, datasetLanguage); |
272 |
workingSet.addRepresentation(representation);
|
|
272 |
descriptiveDataSet.addRepresentation(representation);
|
|
273 | 273 |
|
274 | 274 |
|
275 | 275 |
//old |
... | ... | |
569 | 569 |
// imports the complete dataset information |
570 | 570 |
protected void importDataset(Element elDataset, Namespace sddNamespace, SDDImportState state){ // <Dataset xml:lang="en-us"> |
571 | 571 |
|
572 |
workingSet = WorkingSet.NewInstance();
|
|
572 |
descriptiveDataSet = DescriptiveDataSet.NewInstance();
|
|
573 | 573 |
importDatasetLanguage(elDataset,state); |
574 | 574 |
importDatasetRepresentation(elDataset, sddNamespace); |
575 | 575 |
importRevisionData(elDataset, sddNamespace); |
... | ... | |
678 | 678 |
for (FeatureTree featureTree : featureTrees) { |
679 | 679 |
getFeatureTreeService().save(featureTree); |
680 | 680 |
} |
681 |
getWorkingSetService().save(workingSet);
|
|
681 |
getDescriptiveDataSetService().save(descriptiveDataSet);
|
|
682 | 682 |
for (Classification classification : classifications) { |
683 | 683 |
getClassificationService().save(classification); |
684 | 684 |
} |
... | ... | |
1198 | 1198 |
taxon.addDescription(taxonDescription); |
1199 | 1199 |
} |
1200 | 1200 |
// |
1201 |
workingSet.addDescription(taxonDescription);
|
|
1201 |
descriptiveDataSet.addDescription(taxonDescription);
|
|
1202 | 1202 |
|
1203 | 1203 |
//OLD taxonDescription.setDescriptiveSystem(featureSet); |
1204 | 1204 |
|
... | ... | |
1761 | 1761 |
handleCharacterNodes(sddNamespace, root, elNodes); |
1762 | 1762 |
} |
1763 | 1763 |
featureTrees.add(featureTree); |
1764 |
if (workingSet.getDescriptiveSystem() != null){
|
|
1764 |
if (descriptiveDataSet.getDescriptiveSystem() != null){
|
|
1765 | 1765 |
//TODO how to handle multiple |
1766 | 1766 |
logger.warn("Multiple feature trees not yet supported"); |
1767 | 1767 |
}else{ |
1768 |
workingSet.setDescriptiveSystem(featureTree);
|
|
1768 |
descriptiveDataSet.setDescriptiveSystem(featureTree);
|
|
1769 | 1769 |
} |
1770 | 1770 |
} |
1771 | 1771 |
|
Also available in: Unified diff
fix #7405 Rename WorkingSet to DescriptiveDataSet