use of org.kie.workbench.common.services.datamodeller.driver.AnnotationDriver in project kie-wb-common by kiegroup.
the class DataModelOracleModelDriver method createAnnotation.
private org.kie.workbench.common.services.datamodeller.core.Annotation createAnnotation(Annotation annotationToken) throws ModelDriverException {
AnnotationDefinition annotationDefinition = getConfiguredAnnotation(annotationToken.getQualifiedTypeName());
org.kie.workbench.common.services.datamodeller.core.Annotation annotation = null;
if (annotationDefinition != null) {
AnnotationDriver annotationDriver = getAnnotationDriver(annotationDefinition.getClassName());
if (annotationDriver != null) {
annotation = annotationDriver.buildAnnotation(annotationDefinition, annotationToken);
} else {
logger.warn("AnnotationDriver for annotation: " + annotationToken.getQualifiedTypeName() + " is not configured for this driver");
}
} else {
logger.warn("Annotation: " + annotationToken.getQualifiedTypeName() + " is not configured for this driver.");
}
return annotation;
}
use of org.kie.workbench.common.services.datamodeller.driver.AnnotationDriver in project kie-wb-common by kiegroup.
the class JavaRoasterModelDriver method createAnnotation.
private Annotation createAnnotation(AnnotationSource annotationToken, ClassTypeResolver classTypeResolver) throws ModelDriverException {
AnnotationDefinition annotationDefinition;
Annotation annotation = null;
annotationDefinition = buildAnnotationDefinition(annotationToken, classTypeResolver);
if (annotationDefinition != null) {
AnnotationDriver annotationDriver = new DefaultJavaRoasterModelAnnotationDriver();
annotation = annotationDriver.buildAnnotation(annotationDefinition, annotationToken);
} else {
logger.warn("Annotation: " + annotationToken.getName() + " is not configured for this ModelDriver driver.");
}
return annotation;
}
Aggregations