public Collection<AtlasClassificationDef> getAllClassificationDefs() { return registryData.classificationDefs.getAll(); }
public Collection<String> getAllEntityDefNames() { return registryData.entityDefs.getAllNames(); } public Collection<AtlasEntityType> getAllEntityTypes() { return registryData.entityDefs.getAllTypes(); }
/** * @return relationshipTypes */ public Collection<AtlasRelationshipType> getAllRelationshipTypes() { return registryData.relationshipDefs.getAllTypes(); }
AtlasBaseTypeDef getTypeDefByGuid(String guid) { AtlasBaseTypeDef ret = null; if (guid != null) { for (TypeDefCache typeDefCache : allDefCaches) { ret = typeDefCache.getTypeDefByGuid(guid); if (ret != null) { break; } } } return ret; }
AtlasBaseTypeDef getTypeDefByName(String name) { AtlasBaseTypeDef ret = null; if (name != null) { for (TypeDefCache typeDefCache : allDefCaches) { ret = typeDefCache.getTypeDefByName(name); if (ret != null) { break; } } } return ret; }
public AtlasClassificationType getClassificationTypeByName(String name) { return registryData.classificationDefs.getTypeByName(name); }
AtlasEnumDef enumDef = (AtlasEnumDef) typeDef; registryData.enumDefs.removeTypeDefByGuid(guid); registryData.enumDefs.addType(enumDef, new AtlasEnumType(enumDef)); } else if (typeDef.getClass().equals(AtlasStructDef.class)) { AtlasStructDef structDef = (AtlasStructDef) typeDef; registryData.structDefs.removeTypeDefByGuid(guid); registryData.structDefs.addType(structDef, new AtlasStructType(structDef)); } else if (typeDef.getClass().equals(AtlasClassificationDef.class)) { AtlasClassificationDef classificationDef = (AtlasClassificationDef) typeDef; registryData.classificationDefs.removeTypeDefByGuid(guid); registryData.classificationDefs.addType(classificationDef, new AtlasClassificationType(classificationDef)); } else if (typeDef.getClass().equals(AtlasEntityDef.class)) { AtlasEntityDef entityDef = (AtlasEntityDef) typeDef; registryData.entityDefs.removeTypeDefByGuid(guid); registryData.entityDefs.addType(entityDef, new AtlasEntityType(entityDef)); } else if (typeDef.getClass().equals(AtlasRelationshipDef.class)) { AtlasRelationshipDef relationshipDef = (AtlasRelationshipDef) typeDef; registryData.relationshipDefs.removeTypeDefByGuid(guid); registryData.relationshipDefs.addType(relationshipDef, new AtlasRelationshipType(relationshipDef));
AtlasEnumDef enumDef = (AtlasEnumDef) typeDef; registryData.enumDefs.removeTypeDefByName(name); registryData.enumDefs.addType(enumDef, new AtlasEnumType(enumDef)); } else if (typeDef.getClass().equals(AtlasStructDef.class)) { AtlasStructDef structDef = (AtlasStructDef) typeDef; registryData.structDefs.removeTypeDefByName(name); registryData.structDefs.addType(structDef, new AtlasStructType(structDef)); } else if (typeDef.getClass().equals(AtlasClassificationDef.class)) { AtlasClassificationDef classificationDef = (AtlasClassificationDef) typeDef; registryData.classificationDefs.removeTypeDefByName(name); registryData.classificationDefs.addType(classificationDef, new AtlasClassificationType(classificationDef)); } else if (typeDef.getClass().equals(AtlasEntityDef.class)) { AtlasEntityDef entityDef = (AtlasEntityDef) typeDef; registryData.entityDefs.removeTypeDefByName(name); registryData.entityDefs.addType(entityDef, new AtlasEntityType(entityDef)); } else if (typeDef.getClass().equals(AtlasRelationshipDef.class)) { AtlasRelationshipDef relationshipDef = (AtlasRelationshipDef) typeDef; registryData.relationshipDefs.removeTypeDefByName(name); registryData.relationshipDefs.addType(relationshipDef, new AtlasRelationshipType(relationshipDef));
void removeByGuid(String guid) { if (guid != null) { enumDefs.removeTypeDefByGuid(guid); structDefs.removeTypeDefByGuid(guid); classificationDefs.removeTypeDefByGuid(guid); entityDefs.removeTypeDefByGuid(guid); relationshipDefs.removeTypeDefByGuid(guid); } }
RegistryData() { allTypes = new TypeCache(); enumDefs = new TypeDefCache<>(allTypes); structDefs = new TypeDefCache<>(allTypes); classificationDefs = new TypeDefCache<>(allTypes); entityDefs = new TypeDefCache<>(allTypes); relationshipDefs = new TypeDefCache<>(allTypes); allDefCaches = new TypeDefCache[] { enumDefs, structDefs, classificationDefs, entityDefs, relationshipDefs }; init(); }
AtlasEnumDef enumDef = (AtlasEnumDef) typeDef; registryData.enumDefs.addType(enumDef, new AtlasEnumType(enumDef)); } else if (typeDef.getClass().equals(AtlasStructDef.class)) { AtlasStructDef structDef = (AtlasStructDef) typeDef; registryData.structDefs.addType(structDef, new AtlasStructType(structDef)); } else if (typeDef.getClass().equals(AtlasClassificationDef.class)) { AtlasClassificationDef classificationDef = (AtlasClassificationDef) typeDef; registryData.classificationDefs.addType(classificationDef, new AtlasClassificationType(classificationDef)); } else if (typeDef.getClass().equals(AtlasEntityDef.class)) { AtlasEntityDef entityDef = (AtlasEntityDef) typeDef; registryData.entityDefs.addType(entityDef, new AtlasEntityType(entityDef)); } else if (typeDef.getClass().equals(AtlasRelationshipDef.class)) { AtlasRelationshipDef relationshipDef = (AtlasRelationshipDef) typeDef; registryData.relationshipDefs.addType(relationshipDef, new AtlasRelationshipType(relationshipDef));
AtlasBaseTypeDef getTypeDefByGuid(String guid) { AtlasBaseTypeDef ret = null; if (guid != null) { for (TypeDefCache typeDefCache : allDefCaches) { ret = typeDefCache.getTypeDefByGuid(guid); if (ret != null) { break; } } } return ret; }
public AtlasRelationshipDef getRelationshipDefByName(String name) { return registryData.relationshipDefs.getTypeDefByName(name); } public AtlasRelationshipType getRelationshipTypeByName(String name) { return registryData.relationshipDefs.getTypeByName(name); }
public AtlasClassificationType getClassificationTypeByName(String name) { return registryData.classificationDefs.getTypeByName(name); }
AtlasEnumDef enumDef = (AtlasEnumDef) typeDef; registryData.enumDefs.removeTypeDefByGuid(guid); registryData.enumDefs.addType(enumDef, new AtlasEnumType(enumDef)); } else if (typeDef.getClass().equals(AtlasStructDef.class)) { AtlasStructDef structDef = (AtlasStructDef) typeDef; registryData.structDefs.removeTypeDefByGuid(guid); registryData.structDefs.addType(structDef, new AtlasStructType(structDef)); } else if (typeDef.getClass().equals(AtlasClassificationDef.class)) { AtlasClassificationDef classificationDef = (AtlasClassificationDef) typeDef; registryData.classificationDefs.removeTypeDefByGuid(guid); registryData.classificationDefs.addType(classificationDef, new AtlasClassificationType(classificationDef)); } else if (typeDef.getClass().equals(AtlasEntityDef.class)) { AtlasEntityDef entityDef = (AtlasEntityDef) typeDef; registryData.entityDefs.removeTypeDefByGuid(guid); registryData.entityDefs.addType(entityDef, new AtlasEntityType(entityDef)); } else if (typeDef.getClass().equals(AtlasRelationshipDef.class)) { AtlasRelationshipDef relationshipDef = (AtlasRelationshipDef) typeDef; registryData.relationshipDefs.removeTypeDefByGuid(guid); registryData.relationshipDefs.addType(relationshipDef, new AtlasRelationshipType(relationshipDef));
AtlasEnumDef enumDef = (AtlasEnumDef) typeDef; registryData.enumDefs.removeTypeDefByName(name); registryData.enumDefs.addType(enumDef, new AtlasEnumType(enumDef)); } else if (typeDef.getClass().equals(AtlasStructDef.class)) { AtlasStructDef structDef = (AtlasStructDef) typeDef; registryData.structDefs.removeTypeDefByName(name); registryData.structDefs.addType(structDef, new AtlasStructType(structDef)); } else if (typeDef.getClass().equals(AtlasClassificationDef.class)) { AtlasClassificationDef classificationDef = (AtlasClassificationDef) typeDef; registryData.classificationDefs.removeTypeDefByName(name); registryData.classificationDefs.addType(classificationDef, new AtlasClassificationType(classificationDef)); } else if (typeDef.getClass().equals(AtlasEntityDef.class)) { AtlasEntityDef entityDef = (AtlasEntityDef) typeDef; registryData.entityDefs.removeTypeDefByName(name); registryData.entityDefs.addType(entityDef, new AtlasEntityType(entityDef)); } else if (typeDef.getClass().equals(AtlasRelationshipDef.class)) { AtlasRelationshipDef relationshipDef = (AtlasRelationshipDef) typeDef; registryData.relationshipDefs.removeTypeDefByName(name); registryData.relationshipDefs.addType(relationshipDef, new AtlasRelationshipType(relationshipDef));
void removeByGuid(String guid) { if (guid != null) { enumDefs.removeTypeDefByGuid(guid); structDefs.removeTypeDefByGuid(guid); classificationDefs.removeTypeDefByGuid(guid); entityDefs.removeTypeDefByGuid(guid); relationshipDefs.removeTypeDefByGuid(guid); } }
RegistryData() { allTypes = new TypeCache(); enumDefs = new TypeDefCache<>(allTypes); structDefs = new TypeDefCache<>(allTypes); classificationDefs = new TypeDefCache<>(allTypes); entityDefs = new TypeDefCache<>(allTypes); relationshipDefs = new TypeDefCache<>(allTypes); allDefCaches = new TypeDefCache[] { enumDefs, structDefs, classificationDefs, entityDefs, relationshipDefs }; init(); }