congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AtlasEntity$AtlasEntitiesWithExtInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
AtlasEntity$AtlasEntitiesWithExtInfo
in
org.apache.atlas.model.instance

Best Java code snippets using org.apache.atlas.model.instance.AtlasEntity$AtlasEntitiesWithExtInfo (Showing top 20 results out of 315)

origin: apache/nifi

final AtlasEntity.AtlasEntitiesWithExtInfo atlasEntities = new AtlasEntity.AtlasEntitiesWithExtInfo(createdEntities);
final EntityMutationResponse mutationResponse = atlasClient.createEntities(atlasEntities);
logger.debug("Created DataSet entities mutation response={}", mutationResponse);
final AtlasEntity.AtlasEntitiesWithExtInfo atlasEntities = new AtlasEntity.AtlasEntitiesWithExtInfo(updatedEntities);
final EntityMutationResponse mutationResponse = atlasClient.updateEntities(atlasEntities);
logger.debug("Updated DataSet entities mutation response={}", mutationResponse);
origin: apache/atlas

entities.getEntities().get(0).setGuid(guid);
origin: org.apache.atlas/atlas-repository

@Test(dependsOnMethods = "testCreate")
public void testUpdateEntityWithMap() throws Exception {
  AtlasEntity              tableEntity  = new AtlasEntity(tblEntity.getEntity());
  AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEntity);
  Map<String, AtlasStruct> partsMap     = new HashMap<>();
  partsMap.put("part0", new AtlasStruct(TestUtilsV2.PARTITION_STRUCT_TYPE, TestUtilsV2.NAME, "test"));
  entitiesInfo.addReferredEntity(col0);
  entitiesInfo.addReferredEntity(col1);
  init();
  response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false);
origin: apache/atlas

@Test(dependsOnMethods = "testCreate")
public void testUpdateEntityWithMap() throws Exception {
  AtlasEntity              tableEntity  = new AtlasEntity(tblEntity.getEntity());
  AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEntity);
  Map<String, AtlasStruct> partsMap     = new HashMap<>();
  partsMap.put("part0", new AtlasStruct(TestUtilsV2.PARTITION_STRUCT_TYPE, TestUtilsV2.NAME, "test"));
  entitiesInfo.addReferredEntity(col0);
  entitiesInfo.addReferredEntity(col1);
  init();
  response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false);
origin: org.apache.atlas/atlas-intg

public static AtlasEntitiesWithExtInfo getDepartmentEmployeeInstances() {
  AtlasEntitiesWithExtInfo ret = new AtlasEntitiesWithExtInfo();
    mike.setAttribute("approximationOfPi", new BigDecimal("3.14159"));
  ret.addEntity(hrDept);
  ret.addEntity(jane);
  ret.addEntity(julius);
  ret.addEntity(max);
  ret.addEntity(john);
  ret.addEntity(mike);
origin: org.apache.atlas/atlas-repository

dbEntity.setAttribute("colo", "10001");
EntityStream           dbStream        = new AtlasEntityStream(new AtlasEntitiesWithExtInfo(dbEntity));
EntityMutationResponse response        = entityStore.createOrUpdate(dbStream, false);
AtlasEntityHeader      dbHeader        = response.getFirstEntityCreated();
dbEntity.setAttribute("isReplicated", true);       // optional attr
dbStream = new AtlasEntityStream(new AtlasEntitiesWithExtInfo(dbEntity));
AtlasEntitiesWithExtInfo tableEntityInfo = new AtlasEntitiesWithExtInfo(tblEntity);
tableEntityInfo.addReferredEntity(col1.getGuid(), col1);
tableEntityInfo.addReferredEntity(col2.getGuid(), col2);
tblEntity.setAttribute(TestUtilsV2.COLUMNS_ATTR_NAME, columns);
tableEntityInfo = new AtlasEntitiesWithExtInfo(tblEntity);
tableEntityInfo.addReferredEntity(col3.getGuid(), col3);
tableEntityInfo.addReferredEntity(col4.getGuid(), col4);
origin: apache/atlas

dbEntity.setAttribute("colo", "10001");
EntityStream           dbStream        = new AtlasEntityStream(new AtlasEntitiesWithExtInfo(dbEntity));
EntityMutationResponse response        = entityStore.createOrUpdate(dbStream, false);
AtlasEntityHeader      dbHeader        = response.getFirstEntityCreated();
dbEntity.setAttribute("isReplicated", true);       // optional attr
dbStream = new AtlasEntityStream(new AtlasEntitiesWithExtInfo(dbEntity));
AtlasEntitiesWithExtInfo tableEntityInfo = new AtlasEntitiesWithExtInfo(tblEntity);
tableEntityInfo.addReferredEntity(col1.getGuid(), col1);
tableEntityInfo.addReferredEntity(col2.getGuid(), col2);
tblEntity.setAttribute(TestUtilsV2.COLUMNS_ATTR_NAME, columns);
tableEntityInfo = new AtlasEntitiesWithExtInfo(tblEntity);
tableEntityInfo.addReferredEntity(col3.getGuid(), col3);
tableEntityInfo.addReferredEntity(col4.getGuid(), col4);
origin: org.apache.atlas/atlas-intg

public static AtlasEntitiesWithExtInfo createDeptEg2() {
  AtlasEntitiesWithExtInfo entitiesWithExtInfo = new AtlasEntitiesWithExtInfo();
  hrDept.setAttribute("employees", Arrays.asList(janeId, juliusId, maxId, johnId));
  entitiesWithExtInfo.addEntity(hrDept);
  entitiesWithExtInfo.addEntity(jane);
  entitiesWithExtInfo.addEntity(julius);
  entitiesWithExtInfo.addEntity(max);
  entitiesWithExtInfo.addEntity(john);
origin: apache/atlas

init();
AtlasEntity              complexEntity       = getEntityFromStore(complexCollectionAttrEntity.getEntity().getGuid());
AtlasEntitiesWithExtInfo complexEntitiesInfo = new AtlasEntitiesWithExtInfo(complexEntity);
                                   put("key22", getAtlasObjectId(e2MapValue)); }};
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e0MapValue);
complexEntitiesInfo.addReferredEntity(e1MapValue);
complexEntitiesInfo.addReferredEntity(e2MapValue);
entityMap.put("key33", getAtlasObjectId(e3MapValue));
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e3MapValue);
entityMap.remove("key00");
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e3MapValue);
entityMap.put("key33", getAtlasObjectId(e3MapValue));
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e1MapValueEdit);
entityMap.put("key33", getAtlasObjectId(e3MapValue));
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e3MapValue);
entityMap.clear();
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e3MapValue);
origin: apache/atlas

AtlasEntity maxEntity = updatedEntities.getEntity(maxId.getGuid());
verifyRelationshipAttributeValue(maxEntity, "manager", juliusId.getGuid());
AtlasEntity juliusEntity = updatedEntities.getEntity(juliusId.getGuid());
verifyRelationshipAttributeList(juliusEntity, "subordinates", ImmutableList.of(maxId, mikeId));
AtlasEntity janeEntity = updatedEntities.getEntity(janeId.getGuid());
maxEntity    = updatedEntities.getEntity(maxId.getGuid());
juliusEntity = updatedEntities.getEntity(juliusId.getGuid());
AtlasEntity mikeEntity = updatedEntities.getEntity(mikeId.getGuid());
AtlasEntity johnEntity = updatedEntities.getEntity(johnId.getGuid());
juliusEntity = updatedEntities.getEntity(juliusId.getGuid());
janeEntity   = updatedEntities.getEntity(janeId.getGuid());
mikeEntity   = updatedEntities.getEntity(mikeId.getGuid());
origin: apache/atlas

init();
AtlasEntity              complexEntity       = getEntityFromStore(complexCollectionAttrEntity.getEntity().getGuid());
AtlasEntitiesWithExtInfo complexEntitiesInfo = new AtlasEntitiesWithExtInfo(complexEntity);
AtlasEntityType          entityType          = typeRegistry.getEntityTypeByName(ENTITY_TYPE);
complexEntitiesInfo.addReferredEntity(e0Array);
complexEntitiesInfo.addReferredEntity(e1Array);
complexEntitiesInfo.addReferredEntity(e2Array);
complexEntitiesInfo.getReferredEntities().clear();
complexEntitiesInfo.addReferredEntity(e3Array);
entityList = new ArrayList<>(Arrays.asList(getAtlasObjectId(e1Array), getAtlasObjectId(e2Array), getAtlasObjectId(e3Array)));
complexEntity.setAttribute("listOfEntities", entityList);
complexEntitiesInfo.getReferredEntities().clear();
entityList.add(getAtlasObjectId(e3Array_duplicate));
complexEntity.setAttribute("listOfEntities", entityList);
complexEntitiesInfo.getReferredEntities().clear();
complexEntitiesInfo.addReferredEntity(e3Array_duplicate);
entityList.clear();
complexEntity.setAttribute("listOfEntities", entityList);
complexEntitiesInfo.getReferredEntities().clear();
origin: org.apache.atlas/atlas-repository

init();
AtlasEntity              complexEntity       = getEntityFromStore(complexCollectionAttrEntity.getEntity().getGuid());
AtlasEntitiesWithExtInfo complexEntitiesInfo = new AtlasEntitiesWithExtInfo(complexEntity);
                                   put("key22", getAtlasObjectId(e2MapValue)); }};
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e0MapValue);
complexEntitiesInfo.addReferredEntity(e1MapValue);
complexEntitiesInfo.addReferredEntity(e2MapValue);
entityMap.put("key33", getAtlasObjectId(e3MapValue));
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e3MapValue);
entityMap.remove("key00");
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e3MapValue);
entityMap.put("key33", getAtlasObjectId(e3MapValue));
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e1MapValueEdit);
entityMap.put("key33", getAtlasObjectId(e3MapValue));
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e3MapValue);
entityMap.clear();
complexEntity.setAttribute("mapOfEntities", entityMap);
complexEntitiesInfo.addReferredEntity(e3MapValue);
origin: org.apache.atlas/atlas-repository

AtlasEntity maxEntity = updatedEntities.getEntity(maxId.getGuid());
verifyRelationshipAttributeValue(maxEntity, "manager", juliusId.getGuid());
AtlasEntity juliusEntity = updatedEntities.getEntity(juliusId.getGuid());
verifyRelationshipAttributeList(juliusEntity, "subordinates", ImmutableList.of(maxId, mikeId));
AtlasEntity janeEntity = updatedEntities.getEntity(janeId.getGuid());
maxEntity    = updatedEntities.getEntity(maxId.getGuid());
juliusEntity = updatedEntities.getEntity(juliusId.getGuid());
AtlasEntity mikeEntity = updatedEntities.getEntity(mikeId.getGuid());
AtlasEntity johnEntity = updatedEntities.getEntity(johnId.getGuid());
juliusEntity = updatedEntities.getEntity(juliusId.getGuid());
janeEntity   = updatedEntities.getEntity(janeId.getGuid());
mikeEntity   = updatedEntities.getEntity(mikeId.getGuid());
origin: org.apache.atlas/atlas-repository

init();
AtlasEntity              complexEntity       = getEntityFromStore(complexCollectionAttrEntity.getEntity().getGuid());
AtlasEntitiesWithExtInfo complexEntitiesInfo = new AtlasEntitiesWithExtInfo(complexEntity);
complexEntitiesInfo.addReferredEntity(e0Array);
complexEntitiesInfo.addReferredEntity(e1Array);
complexEntitiesInfo.addReferredEntity(e2Array);
entityList.add(getAtlasObjectId(e3Array));
complexEntity.setAttribute("listOfEntities", entityList);
complexEntitiesInfo.addReferredEntity(e3Array);
entityList.add(getAtlasObjectId(e3Array_duplicate));
complexEntity.setAttribute("listOfEntities", entityList);
complexEntitiesInfo.addReferredEntity(e3Array_duplicate);
origin: org.apache.atlas/atlas-repository

AtlasEntitiesWithExtInfo entitiesInfo     = new AtlasEntitiesWithExtInfo(tableEntity);
entitiesInfo.addReferredEntity(columnEntity1);
entitiesInfo.addReferredEntity(columnEntity2);
entitiesInfo.addReferredEntity(columnEntity3);
    AtlasTypeUtil.getAtlasObjectId(col2),
    AtlasTypeUtil.getAtlasObjectId(col3)));
AtlasEntitiesWithExtInfo tableInfo = new AtlasEntitiesWithExtInfo(tableEntity1);
tableInfo.addReferredEntity(col1.getGuid(), col1);
tableInfo.addReferredEntity(col2.getGuid(), col2);
tableInfo.addReferredEntity(col3.getGuid(), col3);
origin: org.apache.atlas/atlas-repository

AtlasEntity b3 = new AtlasEntity("B");
b3.setAttribute(NAME, TestUtilsV2.randomString());
AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo();
atlasEntitiesWithExtInfo.addEntity(a1);
atlasEntitiesWithExtInfo.addEntity(b1);
atlasEntitiesWithExtInfo.addEntity(b2);
atlasEntitiesWithExtInfo.addEntity(b3);
AtlasEntityStream entityStream = new AtlasEntityStream(atlasEntitiesWithExtInfo);
EntityMutationResponse response = entityStore.createOrUpdate(entityStream , false);
AtlasEntity storedEntity = storedEntities.getEntity(a1.getGuid());
Object value = storedEntity.getAttribute("mapToB");
assertTrue(value instanceof Map);
referencedEntityId = refMap.get("b2");
assertEquals(referencedEntityId, AtlasTypeUtil.getAtlasObjectId(b2));
storedEntity = storedEntities.getEntity(b1.getGuid());
verifyReferenceValue(storedEntity, "mappedFromA", a1.getGuid());
storedEntity = storedEntities.getEntity(b2.getGuid());
verifyReferenceValue(storedEntity, "mappedFromA", a1.getGuid());
AtlasEntity storedB3 = storedEntities.getEntity(b3.getGuid());
verifyReferenceValue(storedB3, "mappedFromA", a1.getGuid());
verify_testInverseReferenceAutoUpdate_Map(storedEntities.getEntity(a1.getGuid()), storedEntities.getEntity(b1.getGuid()), storedEntities.getEntity(b2.getGuid()), storedB3);
origin: apache/atlas

AtlasEntitiesWithExtInfo entitiesInfo     = new AtlasEntitiesWithExtInfo(tableEntity);
entitiesInfo.addReferredEntity(columnEntity1);
entitiesInfo.addReferredEntity(columnEntity2);
entitiesInfo.addReferredEntity(columnEntity3);
    AtlasTypeUtil.getAtlasObjectId(col2),
    AtlasTypeUtil.getAtlasObjectId(col3)));
AtlasEntitiesWithExtInfo tableInfo = new AtlasEntitiesWithExtInfo(tableEntity1);
tableInfo.addReferredEntity(col1.getGuid(), col1);
tableInfo.addReferredEntity(col2.getGuid(), col2);
tableInfo.addReferredEntity(col3.getGuid(), col3);
origin: apache/atlas

entities.addEntity(columnLineage);
origin: apache/atlas

AtlasEntity b3 = new AtlasEntity("B");
b3.setAttribute(NAME, TestUtilsV2.randomString());
AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo();
atlasEntitiesWithExtInfo.addEntity(a1);
atlasEntitiesWithExtInfo.addEntity(b1);
atlasEntitiesWithExtInfo.addEntity(b2);
atlasEntitiesWithExtInfo.addEntity(b3);
AtlasEntityStream entityStream = new AtlasEntityStream(atlasEntitiesWithExtInfo);
EntityMutationResponse response = entityStore.createOrUpdate(entityStream , false);
AtlasEntity storedEntity = storedEntities.getEntity(a1.getGuid());
Object value = storedEntity.getAttribute("mapToB");
assertTrue(value instanceof Map);
referencedEntityId = refMap.get("b2");
assertEquals(referencedEntityId, AtlasTypeUtil.getAtlasObjectId(b2));
storedEntity = storedEntities.getEntity(b1.getGuid());
verifyReferenceValue(storedEntity, "mappedFromA", a1.getGuid());
storedEntity = storedEntities.getEntity(b2.getGuid());
verifyReferenceValue(storedEntity, "mappedFromA", a1.getGuid());
AtlasEntity storedB3 = storedEntities.getEntity(b3.getGuid());
verifyReferenceValue(storedB3, "mappedFromA", a1.getGuid());
verify_testInverseReferenceAutoUpdate_Map(storedEntities.getEntity(a1.getGuid()), storedEntities.getEntity(b1.getGuid()), storedEntities.getEntity(b2.getGuid()), storedB3);
origin: org.apache.atlas/atlas-repository

b.setAttribute(NAME, "b_name");
AtlasEntitiesWithExtInfo entitiesWithExtInfo = new AtlasEntitiesWithExtInfo();
entitiesWithExtInfo.addEntity(a1);
entitiesWithExtInfo.addEntity(a2);
entitiesWithExtInfo.addEntity(a3);
entitiesWithExtInfo.addEntity(b);
entityStore.createOrUpdate(new AtlasEntityStream(entitiesWithExtInfo) , false);
AtlasEntitiesWithExtInfo updatedEntities = entityStore.getByIds(ImmutableList.of(a1.getGuid(), a2.getGuid(), b.getGuid()));
AtlasEntity a1Entity = updatedEntities.getEntity(a1.getGuid());
verifyRelationshipAttributeValue(a1Entity, "oneB", b.getGuid());
AtlasEntity a2Entity = updatedEntities.getEntity(a2.getGuid());
verifyRelationshipAttributeValue(a2Entity, "oneB", b.getGuid());
AtlasEntity bEntity = updatedEntities.getEntity(b.getGuid());
verifyRelationshipAttributeList(bEntity, "manyA", ImmutableList.of(getAtlasObjectId(a1), getAtlasObjectId(a2)));
a1Entity        = updatedEntities.getEntity(a1.getGuid());
a2Entity        = updatedEntities.getEntity(a2.getGuid());
bEntity         = updatedEntities.getEntity(b.getGuid());
AtlasEntity a3Entity = updatedEntities.getEntity(a3.getGuid());
verifyRelationshipAttributeValue(a3Entity, "oneB", b.getGuid());
org.apache.atlas.model.instanceAtlasEntity$AtlasEntitiesWithExtInfo

Most used methods

  • <init>
  • addReferredEntity
  • addEntity
  • getEntities
  • getEntity
  • getReferredEntities
  • compact
  • hasEntity
  • removeReferredEntity
  • toString

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ImageIO (javax.imageio)
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now