use of org.apache.atlas.type.AtlasStructType in project incubator-atlas by apache.
the class ModelTestUtil method newStruct.
public static AtlasStruct newStruct(AtlasStructDef structDef, AtlasTypeRegistry typesRegistry) {
AtlasStruct ret = null;
AtlasStructType structType = typesRegistry.getStructTypeByName(structDef.getName());
if (structType != null) {
ret = structType.createDefaultValue();
} else {
LOG.error("failed to get struct-type {}", structDef.getName());
}
return ret;
}
use of org.apache.atlas.type.AtlasStructType in project incubator-atlas by apache.
the class ExportService method addType.
private void addType(AtlasType type, ExportContext context) {
if (type.getTypeCategory() == TypeCategory.PRIMITIVE) {
return;
}
if (type instanceof AtlasArrayType) {
AtlasArrayType arrayType = (AtlasArrayType) type;
addType(arrayType.getElementType(), context);
} else if (type instanceof AtlasMapType) {
AtlasMapType mapType = (AtlasMapType) type;
addType(mapType.getKeyType(), context);
addType(mapType.getValueType(), context);
} else if (type instanceof AtlasEntityType) {
addEntityType((AtlasEntityType) type, context);
} else if (type instanceof AtlasClassificationType) {
addClassificationType((AtlasClassificationType) type, context);
} else if (type instanceof AtlasStructType) {
addStructType((AtlasStructType) type, context);
} else if (type instanceof AtlasEnumType) {
addEnumType((AtlasEnumType) type, context);
}
}
Aggregations