-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66478/#review200563
-----------------------------------------------------------




addons/models/0000-Area0/0010-base_model.json
Lines 542 (patched)
<https://reviews.apache.org/r/66478/#comment281294>

    For consistency with other relationship types defined here, use prefix 
'__Atlas' for type names.



addons/models/0300-Area3-SubjectArea/0330-Terms.json
Line 71 (original), 71 (patched)
<https://reviews.apache.org/r/66478/#comment281295>

    Models under 0300-Area3-SubjectArea are being removed in Mandy's patch 
https://reviews.apache.org/r/66375/. Please revert changes to files deleted by 
Mandy's patch.



intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossary.java
Lines 47 (patched)
<https://reviews.apache.org/r/66478/#comment281296>

    Comment to be removed?



intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossary.java
Lines 144 (patched)
<https://reviews.apache.org/r/66478/#comment281297>

    why create a new HashSet, instead of adding to exiting one?
    
      Set<AtlasRelatedTermId> terms = this.terms;
    
      if (terms == null) {
        terms = new HashSet<>();
    
        this.terms = terms;
      }
    
      terms.add(relatedTermId);
    
    Same for categories and classifications.



intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryCategory.java
Lines 37 (patched)
<https://reviews.apache.org/r/66478/#comment281298>

    Consider moving the following attributes to AtlasGlossaryBaseObject (and 
remove from AtlasGlossary, AtlasGlossaryCategory, AtlasGlossaryTerm:
     - displayName
     - shortDescription
     - longDescription
     - classifications



intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java
Lines 312 (patched)
<https://reviews.apache.org/r/66478/#comment281299>

    'examples' attribute is not handled by setAttribute()?



intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java
Lines 367 (patched)
<https://reviews.apache.org/r/66478/#comment281300>

    "RelatedTerm" ==> "seeAlso"



intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java
Lines 383 (patched)
<https://reviews.apache.org/r/66478/#comment281301>

    "preferredTerm" ==> "preferredToTerm"



intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java
Lines 391 (patched)
<https://reviews.apache.org/r/66478/#comment281304>

    ReplacementTerm ==> replacedBy



intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java
Lines 407 (patched)
<https://reviews.apache.org/r/66478/#comment281303>

    IsARelationship ==> classifies



intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java
Lines 415 (patched)
<https://reviews.apache.org/r/66478/#comment281302>

    validValue ==> validValueFor



intg/src/main/java/org/apache/atlas/model/glossary/relations/AtlasRelatedCategoryId.java
Lines 30 (patched)
<https://reviews.apache.org/r/66478/#comment281306>

    Is AtlasRelatedCategoryId only used in 'term to category' relationship?
    
    If not, AtlasTermRelationshipStatus doesn't seem to be intutive. Please 
review.



intg/src/main/java/org/apache/atlas/model/glossary/relations/AtlasRelatedCategoryId.java
Lines 36 (patched)
<https://reviews.apache.org/r/66478/#comment281305>

    is this the guid for: relationship or category? Consider renaming to 
categoryGuid or relationshipGuid.



intg/src/main/java/org/apache/atlas/model/glossary/relations/AtlasRelatedTermId.java
Lines 39 (patched)
<https://reviews.apache.org/r/66478/#comment281307>

    is this the guid for: relationship or term? Consider renaming to termGuid 
or relationshipGuid.



intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java
Lines 87 (patched)
<https://reviews.apache.org/r/66478/#comment281308>

    Instead of using AtlasGlossaryTerm (which has references to all entities 
the term is assigned to, all terms the term is related to), consider using 
AtlasRelatedTermId (or an equivalent).



repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AtlasGlossaryDTO.java
Lines 120 (patched)
<https://reviews.apache.org/r/66478/#comment281325>

    not handling relationship attributes here? from() method above handles 
relationship attributes.



repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AtlasGlossaryDTO.java
Lines 135 (patched)
<https://reviews.apache.org/r/66478/#comment281324>

    Shouldn't extInfo not include all entities referenced by relationship 
attributes?



repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AtlasGlossaryTermDTO.java
Lines 97 (patched)
<https://reviews.apache.org/r/66478/#comment281321>

    Consider adding toRelatedTermIdsSet() method and replace lines #96-#250 
with:
      
ret.setSeeAlso(toRelatedTermIdsSet(entity.getRelationshipAttribute("seeAlso")));
      
ret.setSynonyms(toRelatedTermIdsSet(entity.getRelationshipAttribute("synonyms")));
      
ret.setAntonyms(toRelatedTermIdsSet(entity.getRelationshipAttribute("antonyms")));
      
ret.setPreferredTerms(toRelatedTermIdsSet(entity.getRelationshipAttribute("preferredTerms")));
      
ret.setPreferredToTerms(toRelatedTermIdsSet(entity.getRelationshipAttribute("preferredToTerms")));
      
ret.setReplacementTerms(toRelatedTermIdsSet(entity.getRelationshipAttribute("replacementTerms")));
      
ret.setReplacedBy(toRelatedTermIdsSet(entity.getRelationshipAttribute("replacedBy")));
      
ret.setTranslationTerms(toRelatedTermIdsSet(entity.getRelationshipAttribute("translationTerms")));
      
ret.setTranslatedTerms(toRelatedTermIdsSet(entity.getRelationshipAttribute("translatedTerms")));
      ret.setIsA(toRelatedTermIdsSet(entity.getRelationshipAttribute("isA")));
      
ret.setClassify(toRelatedTermIdsSet(entity.getRelationshipAttribute("classify")));
      
ret.setValidValues(toRelatedTermIdsSet(entity.getRelationshipAttribute("validValues")));
      
ret.setValidValuesFor(toRelatedTermIdsSet(entity.getRelationshipAttribute("validValuesFor")));
    
    Set<AtlasRelatedTermId> toRelatedTermIdsSet(Object obj) {
      Set<AtlasRelatedTermId> ret = null;
    
      if (obj instanceof Collection) {
        ret = new HashSet<>();
    
        for (Object elem : (Collection) obj) {
          if (elem instanceof AtlasRelatedObjectId) {
            ret.add(toRelatedTermId((AtlasRelatedObjectId) elem);
          }
        }
      }
      
      return ret;
    }



repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AtlasGlossaryTermDTO.java
Lines 286 (patched)
<https://reviews.apache.org/r/66478/#comment281323>

    not handling relationship attributes here?



repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AtlasGlossaryTermDTO.java
Lines 302 (patched)
<https://reviews.apache.org/r/66478/#comment281322>

    Shouldn't extInfo not include all entities referenced by relationship 
attributes?



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java
Lines 71 (patched)
<https://reviews.apache.org/r/66478/#comment281317>

    Consider using Constants.QUALIFIED_NAME, instead of introducing a new const.


- Madhan Neethiraj


On April 5, 2018, 8:10 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66478/
> -----------------------------------------------------------
> 
> (Updated April 5, 2018, 8:10 p.m.)
> 
> 
> Review request for atlas, keval bhatt, Madhan Neethiraj, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-2534
>     https://issues.apache.org/jira/browse/ATLAS-2534
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Glossary implementation, no UI
> 
> 
> Diffs
> -----
> 
>   addons/models/0000-Area0/0010-base_model.json aebe955db 
>   addons/models/0300-Area3-SubjectArea/0330-Terms.json f492ddfdf 
>   addons/models/0300-Area3-SubjectArea/0350-RelatedTerms.json d88f57c20 
>   
> graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphQuery.java
>  7bdbeabf0 
>   
> graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/NativeTinkerpopGraphQuery.java
>  75665592e 
>   
> graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
>  96b9705fa 
>   
> graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/expr/OrderByPredicate.java
>  PRE-CREATION 
>   
> graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java
>  6820a93c2 
>   
> graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/query/NativeJanusGraphQuery.java
>  d3c976df5 
>   
> graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/query/NativeTitan0GraphQuery.java
>  2903ae228 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 997ac68fb 
>   intg/src/main/java/org/apache/atlas/model/AtlasBaseModelObject.java 
> 688f6f4d2 
>   intg/src/main/java/org/apache/atlas/model/annotation/AtlasJSON.java 
> PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossary.java 
> PRE-CREATION 
>   
> intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryBaseObject.java
>  PRE-CREATION 
>   
> intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryCategory.java 
> PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java 
> PRE-CREATION 
>   
> intg/src/main/java/org/apache/atlas/model/glossary/enums/AtlasTermAssignmentStatus.java
>  PRE-CREATION 
>   
> intg/src/main/java/org/apache/atlas/model/glossary/enums/AtlasTermRelationshipStatus.java
>  PRE-CREATION 
>   
> intg/src/main/java/org/apache/atlas/model/glossary/relations/AtlasGlossaryId.java
>  PRE-CREATION 
>   
> intg/src/main/java/org/apache/atlas/model/glossary/relations/AtlasRelatedCategoryId.java
>  PRE-CREATION 
>   
> intg/src/main/java/org/apache/atlas/model/glossary/relations/AtlasRelatedTermId.java
>  PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 
> 395431922 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasRelationship.java 
> 576847f6e 
>   intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java 
> 61168f63f 
>   repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java 
> PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/repository/ogm/AbstractDataTransferObject.java
>  f1a8bc91d 
>   
> repository/src/main/java/org/apache/atlas/repository/ogm/AtlasSavedSearchDTO.java
>  a1a8f598d 
>   
> repository/src/main/java/org/apache/atlas/repository/ogm/AtlasUserProfileDTO.java
>  bcf2b9d27 
>   repository/src/main/java/org/apache/atlas/repository/ogm/DTORegistry.java 
> 818960d96 
>   repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java 
> c99d2f836 
>   
> repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AbstractGlossaryDTO.java
>  PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AtlasGlossaryCategoryDTO.java
>  PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AtlasGlossaryDTO.java
>  PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AtlasGlossaryTermDTO.java
>  PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java
>  b9945d4fc 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java
>  13ee2a6df 
>   
> repository/src/main/java/org/apache/atlas/repository/userprofile/UserProfileService.java
>  a428b92ee 
>   repository/src/test/java/org/apache/atlas/TestModules.java c901e891c 
>   repository/src/test/java/org/apache/atlas/glossary/GlossaryServiceTest.java 
> PRE-CREATION 
>   
> repository/src/test/java/org/apache/atlas/glossary/PaginationHelperTest.java 
> PRE-CREATION 
>   
> repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java
>  d8e916d77 
>   
> webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java
>  01a95cf80 
>   webapp/src/main/java/org/apache/atlas/web/rest/GlossaryREST.java 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/66478/diff/2/
> 
> 
> Testing
> -------
> 
> Added test GlossaryServiceTest, runs successfully.
> 
> mvn clean package executes successfully.
> 
> PreCommit: 
> https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/235/
>  (in-progress)
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>

Reply via email to