本文整理汇总了Java中org.apache.atlas.model.typedef.AtlasEntityDef.getName方法的典型用法代码示例。如果您正苦于以下问题:Java AtlasEntityDef.getName方法的具体用法?Java AtlasEntityDef.getName怎么用?Java AtlasEntityDef.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.atlas.model.typedef.AtlasEntityDef
的用法示例。
在下文中一共展示了AtlasEntityDef.getName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: preCreate
import org.apache.atlas.model.typedef.AtlasEntityDef; //导入方法依赖的package包/类
@Override
public AtlasVertex preCreate(AtlasEntityDef entityDef) throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> AtlasEntityDefStoreV1.preCreate({})", entityDef);
}
validateType(entityDef);
AtlasType type = typeRegistry.getType(entityDef.getName());
if (type.getTypeCategory() != org.apache.atlas.model.TypeCategory.ENTITY) {
throw new AtlasBaseException(AtlasErrorCode.TYPE_MATCH_FAILED, entityDef.getName(), TypeCategory.CLASS.name());
}
AtlasVertex ret = typeDefStore.findTypeVertexByName(entityDef.getName());
if (ret != null) {
throw new AtlasBaseException(AtlasErrorCode.TYPE_ALREADY_EXISTS, entityDef.getName());
}
ret = typeDefStore.createTypeVertex(entityDef);
updateVertexPreCreate(entityDef, (AtlasEntityType)type, ret);
if (LOG.isDebugEnabled()) {
LOG.debug("<== AtlasEntityDefStoreV1.preCreate({}): {}", entityDef, ret);
}
return ret;
}
示例2: updateByName
import org.apache.atlas.model.typedef.AtlasEntityDef; //导入方法依赖的package包/类
@Override
public AtlasEntityDef updateByName(String name, AtlasEntityDef entityDef) throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> AtlasEntityDefStoreV1.updateByName({}, {})", name, entityDef);
}
validateType(entityDef);
AtlasType type = typeRegistry.getType(entityDef.getName());
if (type.getTypeCategory() != org.apache.atlas.model.TypeCategory.ENTITY) {
throw new AtlasBaseException(AtlasErrorCode.TYPE_MATCH_FAILED, entityDef.getName(), TypeCategory.CLASS.name());
}
AtlasVertex vertex = typeDefStore.findTypeVertexByNameAndCategory(name, TypeCategory.CLASS);
if (vertex == null) {
throw new AtlasBaseException(AtlasErrorCode.TYPE_NAME_NOT_FOUND, name);
}
updateVertexPreUpdate(entityDef, (AtlasEntityType)type, vertex);
updateVertexAddReferences(entityDef, vertex);
AtlasEntityDef ret = toEntityDef(vertex);
if (LOG.isDebugEnabled()) {
LOG.debug("<== AtlasEntityDefStoreV1.updateByName({}, {}): {}", name, entityDef, ret);
}
return ret;
}
示例3: updateByGuid
import org.apache.atlas.model.typedef.AtlasEntityDef; //导入方法依赖的package包/类
@Override
public AtlasEntityDef updateByGuid(String guid, AtlasEntityDef entityDef) throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> AtlasEntityDefStoreV1.updateByGuid({})", guid);
}
validateType(entityDef);
AtlasType type = typeRegistry.getTypeByGuid(guid);
if (type.getTypeCategory() != org.apache.atlas.model.TypeCategory.ENTITY) {
throw new AtlasBaseException(AtlasErrorCode.TYPE_MATCH_FAILED, entityDef.getName(), TypeCategory.CLASS.name());
}
AtlasVertex vertex = typeDefStore.findTypeVertexByGuidAndCategory(guid, TypeCategory.CLASS);
if (vertex == null) {
throw new AtlasBaseException(AtlasErrorCode.TYPE_GUID_NOT_FOUND, guid);
}
updateVertexPreUpdate(entityDef, (AtlasEntityType)type, vertex);
updateVertexAddReferences(entityDef, vertex);
AtlasEntityDef ret = toEntityDef(vertex);
if (LOG.isDebugEnabled()) {
LOG.debug("<== AtlasEntityDefStoreV1.updateByGuid({}): {}", guid, ret);
}
return ret;
}
示例4: AtlasEntity
import org.apache.atlas.model.typedef.AtlasEntityDef; //导入方法依赖的package包/类
public AtlasEntity(AtlasEntityDef entityDef) {
this(entityDef != null ? entityDef.getName() : null, null);
}
示例5: AtlasEntityHeader
import org.apache.atlas.model.typedef.AtlasEntityDef; //导入方法依赖的package包/类
public AtlasEntityHeader(AtlasEntityDef entityDef) {
this(entityDef != null ? entityDef.getName() : null, null);
}