Project

General

Profile

Revision 2ac55f2d

ID2ac55f2d9a3bf44f11c3c53fb6e5d5b997de02d6
Parent 3bbff684
Child 82e317b8

Added by Patrick Plitzner over 2 years ago

ref #8248, #6774 Improve import/export performance

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/descriptive/owl/in/OwlImportUtil.java
19 19

  
20 20
import eu.etaxonomy.cdm.api.service.ITermService;
21 21
import eu.etaxonomy.cdm.common.CdmUtils;
22
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
23 22
import eu.etaxonomy.cdm.io.descriptive.owl.OwlUtil;
24 23
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
25 24
import eu.etaxonomy.cdm.model.common.Language;
......
137 136

  
138 137
        String languageLabel = repsentationResource.getProperty(OwlUtil.propLanguage).getString();
139 138
        UUID languageUuid = UUID.fromString(repsentationResource.getProperty(OwlUtil.propLanguageUuid).getString());
140
        DefinedTermBase termBase = termService.load(languageUuid);
141
        Language language = null;
142
        if(termBase.isInstanceOf(Language.class)){
143
            language = HibernateProxyHelper.deproxy(termBase, Language.class);
144
        }
139
        Language language = Language.getLanguageFromUuid(languageUuid);
145 140
        if(language==null){
146 141
            language = termService.getLanguageByLabel(languageLabel);
147 142
        }
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/descriptive/owl/in/StructureTreeOwlImport.java
85 85

  
86 86
        // import term
87 87
        UUID termUuid = UUID.fromString(termResource.getProperty(OwlUtil.propUuid).getString());
88
        DefinedTermBase term = getTermService().load(termUuid);
88
        DefinedTermBase term = getTermService().find(termUuid);
89 89
        if(term==null){
90 90
            term = OwlImportUtil.createTerm(termResource, getTermService(), model, state);
91 91
            getTermService().save(term);
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/descriptive/owl/in/TermVocabularyOwlImport.java
92 92
        Resource termResource = model.createResource(termStatement.getObject().toString());
93 93

  
94 94
        UUID termUuid = UUID.fromString(termResource.getProperty(OwlUtil.propUuid).getString());
95
        DefinedTermBase term = getTermService().load(termUuid);
95
        DefinedTermBase term = getTermService().find(termUuid);
96 96
        if(term!=null){
97 97
            return term;
98 98
        }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)