Project

General

Profile

Revision 66910558

ID66910558ad1af9eaee17751bc5e8933efae8b829
Parent e85bf0bc
Child 011c997b

Added by Patrick Plitzner about 1 year ago

ref #6774 Bidirectional linking of terms and vocabularies

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/descriptive/owl/out/StructureTreeOwlExport.java
90 90
            // create vocabulary resource
91 91
            Resource vocabularyResource = OwlExportUtil.createVocabularyResource(child.getTerm().getVocabulary(), state);
92 92
            // add vocabulary to term
93
            nodeResource.addProperty(StructureTreeOwlExportState.propHasVocabulary, vocabularyResource);
93
            termResource.addProperty(StructureTreeOwlExportState.propHasVocabulary, vocabularyResource);
94
            // add term to vocabulary
95
            vocabularyResource.addProperty(StructureTreeOwlExportState.propHasTerm, termResource);
94 96

  
95 97
            addChildNode(child, nodeResource, state);
96 98
        }
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/descriptive/owl/out/TermVocabularyOwlExport.java
68 68
        Resource termResource = OwlExportUtil.createTermResource(term, state);
69 69

  
70 70
        vocabularyResource.addProperty(StructureTreeOwlExportState.propHasTerm, termResource);
71
        termResource.addProperty(StructureTreeOwlExportState.propHasVocabulary, vocabularyResource);
72

  
71 73
        Set<DefinedTerm> generalizationOf = term.getGeneralizationOf();
72 74
        for (DefinedTerm kindOf : generalizationOf) {
73 75
            termResource.addProperty(StructureTreeOwlExportState.propTermIsGeneralizationOf, OwlExportUtil.createTermResource(kindOf, state));

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)