use of org.apache.atlas.catalog.exception.CatalogRuntimeException in project incubator-atlas by apache.
the class DefaultPropertyMapper method toFullyQualifiedName.
@Override
public String toFullyQualifiedName(String propName, String type) {
HierarchicalType dataType = getDataType(type);
String replacement = m_cleanToQualifiedMap.get(propName);
if (replacement == null && dataType != null) {
FieldMapping fieldMap = dataType.fieldMapping();
if (fieldMap.fields.containsKey(propName)) {
try {
replacement = dataType.getQualifiedName(propName);
} catch (AtlasException e) {
throw new CatalogRuntimeException(String.format("Unable to resolve fully qualified property name for type '%s': %s", type, e), e);
}
}
}
if (replacement == null) {
replacement = propName;
}
return replacement;
}
use of org.apache.atlas.catalog.exception.CatalogRuntimeException in project incubator-atlas by apache.
the class BaseResourceDefinition method registerProperty.
protected void registerProperty(AttributeDefinition propertyDefinition) {
try {
propertyDefs.put(propertyDefinition.name, propertyDefinition);
properties.put(propertyDefinition.name, new AttributeInfo(typeSystem, propertyDefinition, null));
} catch (AtlasException e) {
throw new CatalogRuntimeException("Unable to create attribute: " + propertyDefinition.name, e);
}
}
Aggregations