Skip to content

Commit

Permalink
Merge pull request #3371 from atlanhq/beta-DG-1720-helper
Browse files Browse the repository at this point in the history
Improved Code visuals etc.
  • Loading branch information
hr2904 authored Jul 30, 2024
2 parents 4f3bdc6 + 53f8576 commit 0b51ebb
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public class LineageListRequest {
private Boolean excludeMeanings;
private Boolean excludeClassifications;


private String lineageType = "DatasetProcessLineage";

public enum LineageDirection {INPUT, OUTPUT}

public LineageListRequest() {
Expand Down Expand Up @@ -78,6 +81,13 @@ public Integer getDepth() {
public void setDepth(Integer depth) {
this.depth = depth;
}
public String getLineageType() {
return lineageType;
}

public void setLineageType(String lineageType) {
this.lineageType = lineageType;
}

public LineageDirection getDirection() {
return direction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class LineageOnDemandRequest {
private Set<String> attributes;
private Set<String> relationAttributes;
private LineageOnDemandBaseParams defaultParams;
private String lineageType = "DatasetProcessLineage";

public LineageOnDemandRequest() {
this.attributes = new HashSet<>();
Expand Down Expand Up @@ -64,6 +65,13 @@ public void setRelationshipTraversalFilters(SearchParameters.FilterCriteria rela
this.relationshipTraversalFilters = relationshipTraversalFilters;
}

public String getLineageType() {
return lineageType;
}

public void setLineageType(String lineageType) {
this.lineageType = lineageType;
}
public Set<String> getAttributes() {
return attributes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public final class AtlasLineageListContext {
private int currentEntityCounter;
private boolean depthLimitReached;
private boolean hasMoreUpdated;
private String lineageType = "DatasetProcessLineage";

public AtlasLineageListContext(LineageListRequest lineageListRequest, AtlasTypeRegistry typeRegistry) {
this.guid = lineageListRequest.getGuid();
Expand All @@ -33,6 +34,7 @@ public AtlasLineageListContext(LineageListRequest lineageListRequest, AtlasTypeR
this.vertexTraversalPredicate = constructInMemoryPredicate(typeRegistry, lineageListRequest.getEntityTraversalFilters());
this.edgeTraversalPredicate = constructInMemoryPredicate(typeRegistry, lineageListRequest.getRelationshipTraversalFilters());
this.attributes = lineageListRequest.getAttributes();
this.lineageType = lineageListRequest.getLineageType();
}

public String getGuid() {
Expand Down Expand Up @@ -119,6 +121,14 @@ public void setCurrentFromCounter(int currentFromCounter) {
this.currentFromCounter = currentFromCounter;
}

public String getLineageType() {
return lineageType;
}

public void setLineageType(String lineageType) {
this.lineageType = lineageType;
}

public int getCurrentEntityCounter() {
return currentEntityCounter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ public class AtlasLineageOnDemandContext {
private Set<String> relationAttributes;
private LineageOnDemandBaseParams defaultParams;


private String lineageType = "DatasetProcessLineage";

public AtlasLineageOnDemandContext(LineageOnDemandRequest lineageOnDemandRequest, AtlasTypeRegistry typeRegistry) {
this.constraints = lineageOnDemandRequest.getConstraints();
this.attributes = lineageOnDemandRequest.getAttributes();
this.relationAttributes = lineageOnDemandRequest.getRelationAttributes();
this.defaultParams = lineageOnDemandRequest.getDefaultParams();
this.vertexPredicate = constructInMemoryPredicate(typeRegistry, lineageOnDemandRequest.getEntityTraversalFilters());
this.edgePredicate = constructInMemoryPredicate(typeRegistry, lineageOnDemandRequest.getRelationshipTraversalFilters());
this.lineageType = lineageOnDemandRequest.getLineageType();
}

public Map<String, LineageOnDemandConstraints> getConstraints() {
Expand All @@ -56,6 +60,13 @@ public Predicate getEdgePredicate() {
public void setEdgePredicate(Predicate edgePredicate) {
this.edgePredicate = edgePredicate;
}
public String getLineageType() {
return lineageType;
}

public void setLineageType(String lineageType) {
this.lineageType = lineageType;
}

public Set<String> getAttributes() {
return attributes;
Expand Down
Loading

0 comments on commit 0b51ebb

Please sign in to comment.