private AtlasRelationship defineTermAssignment(String termGuid, AtlasRelatedObjectId relatedObjectId) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(TERM_ASSIGNMENT); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasObjectId end1 = new AtlasObjectId(termGuid); AtlasRelationship relationship = new AtlasRelationship(TERM_ASSIGNMENT, end1, relatedObjectId, defaultAttrs.getAttributes()); updateRelationshipAttributes(relationship, relatedObjectId); return relationship; }
private AtlasRelationship defineTermAssignment(String termGuid, AtlasRelatedObjectId relatedObjectId) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(TERM_ASSIGNMENT); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasObjectId end1 = new AtlasObjectId(termGuid); AtlasRelationship relationship = new AtlasRelationship(TERM_ASSIGNMENT, end1, relatedObjectId, defaultAttrs.getAttributes()); updateRelationshipAttributes(relationship, relatedObjectId); return relationship; }
private AtlasRelationship defineCategoryAnchorRelation(String glossaryGuid, String categoryGuid) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(CATEGORY_ANCHOR); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); return new AtlasRelationship(CATEGORY_ANCHOR, new AtlasObjectId(glossaryGuid), new AtlasObjectId(categoryGuid), defaultAttrs.getAttributes()); }
private AtlasRelationship defineTermAnchorRelation(String glossaryGuid, String termGuid) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(TERM_ANCHOR); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); return new AtlasRelationship(TERM_ANCHOR, new AtlasObjectId(glossaryGuid), new AtlasObjectId(termGuid), defaultAttrs.getAttributes()); }
private AtlasRelationship defineTermAnchorRelation(String glossaryGuid, String termGuid) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(TERM_ANCHOR); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); return new AtlasRelationship(TERM_ANCHOR, new AtlasObjectId(glossaryGuid), new AtlasObjectId(termGuid), defaultAttrs.getAttributes()); }
private AtlasRelationship defineCategoryAnchorRelation(String glossaryGuid, String categoryGuid) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(CATEGORY_ANCHOR); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); return new AtlasRelationship(CATEGORY_ANCHOR, new AtlasObjectId(glossaryGuid), new AtlasObjectId(categoryGuid), defaultAttrs.getAttributes()); }
private AtlasRelationship defineCategoryHierarchyLink(AtlasRelatedCategoryHeader parentCategory, String childGuid) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(CATEGORY_HIERARCHY); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasRelationship relationship = new AtlasRelationship(CATEGORY_HIERARCHY, new AtlasObjectId(parentCategory.getCategoryGuid()), new AtlasObjectId(childGuid), defaultAttrs.getAttributes()); updateRelationshipAttributes(relationship, parentCategory); return relationship; }
private AtlasRelationship defineCategoryHierarchyLink(String parentCategoryGuid, AtlasRelatedCategoryHeader childCategory) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(CATEGORY_HIERARCHY); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasRelationship relationship = new AtlasRelationship(CATEGORY_HIERARCHY, new AtlasObjectId(parentCategoryGuid), new AtlasObjectId(childCategory.getCategoryGuid()), defaultAttrs.getAttributes()); updateRelationshipAttributes(relationship, childCategory); return relationship; }
private AtlasRelationship defineCategorizedTerm(AtlasTermCategorizationHeader relatedCategoryId, String termId) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(TERM_CATEGORIZATION); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasRelationship relationship = new AtlasRelationship(TERM_CATEGORIZATION, new AtlasObjectId(relatedCategoryId.getCategoryGuid()), new AtlasObjectId(termId), defaultAttrs.getAttributes()); updateRelationshipAttributes(relationship, relatedCategoryId); return relationship; }
private AtlasRelationship defineCategoryHierarchyLink(String parentCategoryGuid, AtlasRelatedCategoryHeader childCategory) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(CATEGORY_HIERARCHY); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasRelationship relationship = new AtlasRelationship(CATEGORY_HIERARCHY, new AtlasObjectId(parentCategoryGuid), new AtlasObjectId(childCategory.getCategoryGuid()), defaultAttrs.getAttributes()); updateRelationshipAttributes(relationship, childCategory); return relationship; }
private AtlasRelationship defineCategoryHierarchyLink(AtlasRelatedCategoryHeader parentCategory, String childGuid) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(CATEGORY_HIERARCHY); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasRelationship relationship = new AtlasRelationship(CATEGORY_HIERARCHY, new AtlasObjectId(parentCategory.getCategoryGuid()), new AtlasObjectId(childGuid), defaultAttrs.getAttributes()); updateRelationshipAttributes(relationship, parentCategory); return relationship; }
private AtlasRelationship defineCategorizedTerm(String categoryGuid, AtlasRelatedTermHeader relatedTermId) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(TERM_CATEGORIZATION); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasRelationship relationship = new AtlasRelationship(TERM_CATEGORIZATION, new AtlasObjectId(categoryGuid), new AtlasObjectId(relatedTermId.getTermGuid()), defaultAttrs.getAttributes()); updateRelationshipAttributes(relationship, relatedTermId); return relationship; }
private AtlasRelationship defineCategorizedTerm(AtlasTermCategorizationHeader relatedCategoryId, String termId) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(TERM_CATEGORIZATION); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasRelationship relationship = new AtlasRelationship(TERM_CATEGORIZATION, new AtlasObjectId(relatedCategoryId.getCategoryGuid()), new AtlasObjectId(termId), defaultAttrs.getAttributes()); updateRelationshipAttributes(relationship, relatedCategoryId); return relationship; }
private AtlasRelationship defineCategorizedTerm(String categoryGuid, AtlasRelatedTermHeader relatedTermId) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(TERM_CATEGORIZATION); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasRelationship relationship = new AtlasRelationship(TERM_CATEGORIZATION, new AtlasObjectId(categoryGuid), new AtlasObjectId(relatedTermId.getTermGuid()), defaultAttrs.getAttributes()); updateRelationshipAttributes(relationship, relatedTermId); return relationship; }
private AtlasRelationship defineTermRelation(AtlasGlossaryTerm.Relation relation, String end1TermGuid, AtlasRelatedTermHeader end2RelatedTerm) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(relation.getName()); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasRelationship relationship; // End1 and End2 ObjectIds depend on the attribute if (relation.isEnd2Attr()) { relationship = new AtlasRelationship(relation.getName(), new AtlasObjectId(end2RelatedTerm.getTermGuid()), new AtlasObjectId(end1TermGuid), defaultAttrs.getAttributes()); } else { relationship = new AtlasRelationship(relation.getName(), new AtlasObjectId(end1TermGuid), new AtlasObjectId(end2RelatedTerm.getTermGuid()), defaultAttrs.getAttributes()); } updateRelationshipAttributes(relationship, end2RelatedTerm); return relationship; }
private AtlasRelationship defineTermRelation(AtlasGlossaryTerm.Relation relation, String end1TermGuid, AtlasRelatedTermHeader end2RelatedTerm) { AtlasRelationshipType relationshipType = typeRegistry.getRelationshipTypeByName(relation.getName()); AtlasStruct defaultAttrs = relationshipType.createDefaultValue(); AtlasRelationship relationship; // End1 and End2 ObjectIds depend on the attribute if (relation.isEnd2Attr()) { relationship = new AtlasRelationship(relation.getName(), new AtlasObjectId(end2RelatedTerm.getTermGuid()), new AtlasObjectId(end1TermGuid), defaultAttrs.getAttributes()); } else { relationship = new AtlasRelationship(relation.getName(), new AtlasObjectId(end1TermGuid), new AtlasObjectId(end2RelatedTerm.getTermGuid()), defaultAttrs.getAttributes()); } updateRelationshipAttributes(relationship, end2RelatedTerm); return relationship; }