atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Madhan Neethiraj (Jira)" <j...@apache.org>
Subject [jira] [Resolved] (ATLAS-1082) In GET method, return type of the actual referenced entity, instead of the definined type
Date Mon, 18 May 2020 04:58:00 GMT

     [ https://issues.apache.org/jira/browse/ATLAS-1082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Madhan Neethiraj resolved ATLAS-1082.
-------------------------------------
    Resolution: Abandoned

> In GET method, return type of the actual referenced entity, instead of the definined
type
> -----------------------------------------------------------------------------------------
>
>                 Key: ATLAS-1082
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1082
>             Project: Atlas
>          Issue Type: Improvement
>            Reporter: Prasad  S Madugundu
>            Priority: Major
>
> If I GET an entity, the type name for the target of a reference is the defined type.
If the actual target instance is a subclass of the defined type, then I would prefer to get
the type of the sub-class, so that I can correctly process the referenced entity returned
by the GET method.
> For example:
> I have a class definitions as follows:
> {noformat}
> {
>     "typeName": "CommonObject",
>     "definition": {
>         "classTypes": [
>             {
>                 "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
>                 "typeName": "CommonObject",
>                 "attributeDefinitions": [
>                     {
>                         "name": "customProperties",
>                         "dataTypeName": "array<PropertyValue>",
>                         "multiplicity": "optional",
>                         "isComposite": true,
>                         "isUnique": false,
>                         "isIndexable": false,
>                         "reverseAttributeName": "fromObject"
>                     }
>                 ]
>             }
>         ]
>     },
> }
> {
>     "typeName": "PropertyValue",
>     "definition": {
>         "classTypes": [
>             {
>                 "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
>                 "typeName": "PropertyValue",
>                 "attributeDefinitions": [
>                     {
>                         "name": "definition",
>                         "dataTypeName": "PropertyDefinition",
>                         "multiplicity": "required",
>                         "isComposite": false,
>                         "isUnique": false,
>                         "isIndexable": false,
>                         "reverseAttributeName": null
>                     },
>                 ]
>             }
>         ]
>     },
> }
> {
>     "typeName": "CustomPropertyDefinition",
>     "definition": {
>         "classTypes": [
>             {
>                 "superTypes": [
>                     "PropertyDefinition"
>                 ],
>                 "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
>                 "typeName": "CustomPropertyDefinition",
>                 "attributeDefinitions": [
>                     {
> 						...
>                     }
>                 ]
>             }
>         ]
>     },
> }
> {noformat}
> If I GET an instance of subtype of CommonObject, I am getting the following :
> {noformat}
> {
>     "definition": {
>         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>         "id": {
>             "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>             "id": "2bd5992f-2107-4863-a28e-21e5d9da2e5b",
>             "version": 0,
>             "typeName": "DataSet",
>             "state": "ACTIVE"
>         },
>         "typeName": "DataSet",
>         "values": {
>             "customProperties": [
>                 {
>                     "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>                     "id": {
>                         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                         "id": "c2f05c57-17be-4db3-9cf5-941b74c077eb",
>                         "version": 0,
>                         "typeName": "PropertyValue",
>                         "state": "ACTIVE"
>                     },
>                     "typeName": "PropertyValue",
>                     "values": {
>                         "definition": {
>                             "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>                             "id": "cd3cc767-fa82-4c8b-a5a7-0910f124f594",
>                             "version": 0,
>                             "typeName": "PropertyDefinition",
>                             "state": "ACTIVE"
>                         },
>                     },
>                 }
>             ],
>         },
>     }
> }
> {noformat}
> Please note the type of cd3cc767-fa82-4c8b-a5a7-0910f124f594 in the above GET result
is PropertyDefinition.
> But, the actual type of cd3cc767-fa82-4c8b-a5a7-0910f124f594 is CustomPropertyDefinition:
> {noformat}
> {
>     "definition": {
>         "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>         "id": {
>             "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>             "id": "cd3cc767-fa82-4c8b-a5a7-0910f124f594",
>             "version": 0,
>             "typeName": "OMAS_OMRSCustomPropertyDefinition",
>             "state": "ACTIVE"
>         },
>         "typeName": "OMAS_OMRSCustomPropertyDefinition",
>         "values": {
>         },
>     }
> }
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message