Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
9b6a1e6c
Commit
9b6a1e6c
authored
6 years ago
by
Diego Marino Monetti
Committed by
Madhan Neethiraj
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3097: added ctors for serviceType in AtlasRelationshipDef
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
ee418912
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
4 deletions
+72
-4
AtlasRelationshipDef.java
.../org/apache/atlas/model/typedef/AtlasRelationshipDef.java
+72
-4
No files found.
intg/src/main/java/org/apache/atlas/model/typedef/AtlasRelationshipDef.java
View file @
9b6a1e6c
...
@@ -52,7 +52,7 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_
...
@@ -52,7 +52,7 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_
* The way EntityDefs and RelationshipDefs are intended to be used is that EntityDefs will define AttributeDefs these AttributeDefs
* The way EntityDefs and RelationshipDefs are intended to be used is that EntityDefs will define AttributeDefs these AttributeDefs
* will not specify an EntityDef type name as their types.
* will not specify an EntityDef type name as their types.
* <p>
* <p>
* RelationshipDefs introduce new atributes to the entity instances. For example
* RelationshipDefs introduce new at
t
ributes to the entity instances. For example
* <p>
* <p>
* EntityDef A might have attributes attr1,attr2,attr3 <br>
* EntityDef A might have attributes attr1,attr2,attr3 <br>
* EntityDef B might have attributes attr4,attr5,attr6 <br>
* EntityDef B might have attributes attr4,attr5,attr6 <br>
...
@@ -163,6 +163,42 @@ public class AtlasRelationshipDef extends AtlasStructDef implements java.io.Seri
...
@@ -163,6 +163,42 @@ public class AtlasRelationshipDef extends AtlasStructDef implements java.io.Seri
}
}
/**
/**
* Create a relationshipDef without attributeDefs
* @param name
* - the name of the relationship type
* @param description
* - an optional description
* @param typeVersion
* - version - that defaults to 1.0
* @param serviceType
* - the serviceType
* @param relationshipCategory
* - there are 3 sorts of relationship category ASSOCIATION, COMPOSITION
* and AGGREGATION
* @param propagatetags
* -
* @param endDef1
* - first end. An end specifies an entity type and an attribute name. the attribute name then appears in
* the relationship instance
* @param endDef2
* - second end. An end specifies an entity type and an attribute name. the attribute name then appears in
* the relationship instance
*
* The ends are defined as 1 and 2 to avoid implying a direction. So we do not use to and from.
*
* @throws AtlasBaseException
*/
public
AtlasRelationshipDef
(
String
name
,
String
description
,
String
typeVersion
,
String
serviceType
,
RelationshipCategory
relationshipCategory
,
PropagateTags
propagatetags
,
AtlasRelationshipEndDef
endDef1
,
AtlasRelationshipEndDef
endDef2
)
throws
AtlasBaseException
{
this
(
name
,
description
,
typeVersion
,
relationshipCategory
,
propagatetags
,
endDef1
,
endDef2
,
new
ArrayList
<
AtlasAttributeDef
>());
}
/**
* Create a relationshipDef with attributeDefs
* Create a relationshipDef with attributeDefs
* @param name
* @param name
* - the name of the relationship type
* - the name of the relationship type
...
@@ -189,9 +225,41 @@ public class AtlasRelationshipDef extends AtlasStructDef implements java.io.Seri
...
@@ -189,9 +225,41 @@ public class AtlasRelationshipDef extends AtlasStructDef implements java.io.Seri
public
AtlasRelationshipDef
(
String
name
,
String
description
,
String
typeVersion
,
public
AtlasRelationshipDef
(
String
name
,
String
description
,
String
typeVersion
,
RelationshipCategory
relationshipCategory
,
RelationshipCategory
relationshipCategory
,
PropagateTags
propagatetags
,
AtlasRelationshipEndDef
endDef1
,
PropagateTags
propagatetags
,
AtlasRelationshipEndDef
endDef1
,
AtlasRelationshipEndDef
endDef2
,
List
<
AtlasAttributeDef
>
attributeDefs
)
AtlasRelationshipEndDef
endDef2
,
List
<
AtlasAttributeDef
>
attributeDefs
)
{
{
this
(
name
,
description
,
typeVersion
,
null
,
relationshipCategory
,
propagatetags
,
endDef1
,
endDef2
,
attributeDefs
);
super
(
TypeCategory
.
RELATIONSHIP
,
name
,
description
,
typeVersion
,
attributeDefs
,
null
);
}
/**
* Create a relationshipDef with attributeDefs
* @param name
* - the name of the relationship type
* @param description
* - an optional description
* @param typeVersion
* - version - that defaults to 1.0
* @param serviceType
* - the serviceType
* @param relationshipCategory
* - there are 3 sorts of relationship category ASSOCIATION, COMPOSITION
* and AGGREGATION
* @param propagatetags
* -
* @param endDef1
* - First end. As end specifies an entity
* type and an attribute name. the attribute name then appears in
* the relationship instance
* @param endDef2
* - Second end. The ends are defined as 1
* ad 2 to avoid implying a direction. So we do not use to and
* from.
* @param attributeDefs
* - these are the attributes on the relationship itself.
*/
public
AtlasRelationshipDef
(
String
name
,
String
description
,
String
typeVersion
,
String
serviceType
,
RelationshipCategory
relationshipCategory
,
PropagateTags
propagatetags
,
AtlasRelationshipEndDef
endDef1
,
AtlasRelationshipEndDef
endDef2
,
List
<
AtlasAttributeDef
>
attributeDefs
)
{
super
(
TypeCategory
.
RELATIONSHIP
,
name
,
description
,
typeVersion
,
attributeDefs
,
serviceType
,
null
);
setRelationshipCategory
(
relationshipCategory
);
setRelationshipCategory
(
relationshipCategory
);
setRelationshipLabel
(
null
);
setRelationshipLabel
(
null
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment