use of com.thinkbiganalytics.policy.rest.model.FieldStandardizationRuleBuilder in project kylo by Teradata.
the class AvailablePolicies method discoverStandardizationRules.
public static List<FieldStandardizationRule> discoverStandardizationRules() {
List<FieldStandardizationRule> rules = new ArrayList<>();
Set<Class<?>> standardizers = ReflectionPolicyAnnotationDiscoverer.getTypesAnnotatedWith(Standardizer.class);
for (Class c : standardizers) {
Standardizer standardizer = (Standardizer) c.getAnnotation(Standardizer.class);
List<FieldRuleProperty> properties = StandardizationAnnotationTransformer.instance().getUiProperties(c);
rules.add(new FieldStandardizationRuleBuilder(standardizer.name()).description(standardizer.description()).addProperties(properties).objectClassType(c).build());
}
return rules;
}
Aggregations