[
https://issues.apache.org/jira/browse/ATLAS-3219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16859242#comment-16859242
]
Diego Marino Monetti commented on ATLAS-3219:
---------------------------------------------
I'm not sure I understood your question. There are no changes we have made to
this API.
We have only changed the FilterUtil and with this we do everything except the
delete, of course.
If instead you refer to my last comment, the improvement of FilterUtil of 3219
compared to that of 3189 is
{code:java}
private static Predicate getServiceTypePredicate(final String serviceType) {
return new Predicate() {
+ private boolean isClassificationType(Object o) {
+ return o instanceof AtlasClassificationType;
+ }
private boolean isAtlasType(Object o) {
return o instanceof AtlasType;
}
@Override
public boolean evaluate(Object o) {
- return o != null && isAtlasType(o) && Objects.equals(((AtlasType)
o).getServiceType(), serviceType);
+ return o != null && isAtlasType(o) && !isClassificationType(o) &&
Objects.equals(((AtlasType) o).getServiceType(), serviceType);
}
};
}
{code}
Because ClassificationTypes haven't serviceType attribute.
> Implemented new serviceType Rest API
> ------------------------------------
>
> Key: ATLAS-3219
> URL: https://issues.apache.org/jira/browse/ATLAS-3219
> Project: Atlas
> Issue Type: Bug
> Components: atlas-core, atlas-intg
> Affects Versions: 2.0.0
> Environment: all
> Reporter: Diego Marino Monetti
> Priority: Major
> Fix For: trunk
>
> Time Spent: 3h
> Remaining Estimate: 0h
>
> This pull request supersedes the pull request ATLAS-3180.
> The new basic attribute serviceType, introduced by Atlas Team, has no use if
> it is not searchable ina any way. This pull request solves this problem by
> adding the following REST APIs.
> GET / typedef / servicetype / \{servicetype}
> GET / typedefs / headers? Servicetype = \{serviceType}
> GET / typedefs? Servicetype = \{servicetype}
> GET / enumdef / servicetype / \{servicetype}
> GET / entitydef / servicetype / \{servicetype}
> GET / structdef / servicetype / \{servicetype}
> GET / relationshipdef / servicetype / \{servicetype}
> DELETE / typedef / servicetype / \{servicetype}
> The APIs were tested on ATLAS 2.0 and on the new SNAPSHOT 3.0
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)