当前位置: 首页>>代码示例>>Java>>正文


Java AtlasEntityDef.getName方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:incubator-atlas,代码行数:31,代码来源:AtlasEntityDefStoreV1.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-atlas,代码行数:32,代码来源:AtlasEntityDefStoreV1.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-atlas,代码行数:32,代码来源:AtlasEntityDefStoreV1.java

示例4: AtlasEntity

import org.apache.atlas.model.typedef.AtlasEntityDef; //导入方法依赖的package包/类
public AtlasEntity(AtlasEntityDef entityDef) {
    this(entityDef != null ? entityDef.getName() : null, null);
}
 
开发者ID:apache,项目名称:incubator-atlas,代码行数:4,代码来源:AtlasEntity.java

示例5: AtlasEntityHeader

import org.apache.atlas.model.typedef.AtlasEntityDef; //导入方法依赖的package包/类
public AtlasEntityHeader(AtlasEntityDef entityDef) {
    this(entityDef != null ? entityDef.getName() : null, null);
}
 
开发者ID:apache,项目名称:incubator-atlas,代码行数:4,代码来源:AtlasEntityHeader.java


注:本文中的org.apache.atlas.model.typedef.AtlasEntityDef.getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。