Examples of AnnotationFilter


Examples of com.log4ic.utils.support.scanner.filter.AnnotationFilter

public class DataBaseSupport implements ServletContextListener {
    private static final Log LOGGER = LogFactory.getLog(DataBaseSupport.class);

    public void contextInitialized(ServletContextEvent servletContextEvent) {
        LOGGER.info("初始化实体表....");
        AnnotationFilter annotationFilter = new AnnotationFilter();
        FileScanner fileScanner = new FileScanner(annotationFilter);
        LOGGER.info("查找相关实体....");
        fileScanner.find("com.log4ic.entity");

        List<Class> entityClassList = annotationFilter.getClassList();

        try {
            LOGGER.info("查看是否建表....");
            for (Class clazz : entityClassList) {
                DocViewerJdbcSupport support = (DocViewerJdbcSupport) clazz.newInstance();
View Full Code Here

Examples of org.mule.util.scan.annotations.AnnotationFilter

            if (clazz.isAnnotation())
            {
                @SuppressWarnings("unchecked")
                Class<? extends Annotation> annotationClass = (Class<? extends Annotation>) clazz;
               
                AnnotationFilter filter = null;
                Annotation[] annos = clazz.getDeclaredAnnotations();
                for (int i = 0; i < annos.length; i++)
                {
                    Annotation anno = annos[i];
                    if (anno instanceof Target)
View Full Code Here

Examples of org.mule.util.scan.annotations.AnnotationFilter

            if (clazz.isAnnotation())
            {
                @SuppressWarnings("unchecked")
                Class<? extends Annotation> annotationClass = (Class<? extends Annotation>) clazz;
               
                AnnotationFilter filter = null;
                Annotation[] annos = clazz.getDeclaredAnnotations();
                for (int i = 0; i < annos.length; i++)
                {
                    Annotation anno = annos[i];
                    if (anno instanceof Target)
View Full Code Here

Examples of org.openbel.framework.api.internal.KAMCatalogDao.AnnotationFilter

                for (org.openbel.framework.api.internal.KAMStoreDaoImpl.AnnotationType a : kAMStore
                        .getAnnotationTypes(objKam)) {
                    al.add(a);
                }

                final AnnotationFilter annotationFilter =
                        objKam.getKamInfo().createAnnotationFilter();

                for (AnnotationFilterCriteria c : criteria) {
                    final AnnotationType type = c.getAnnotationType();

                    for (org.openbel.framework.api.internal.KAMStoreDaoImpl.AnnotationType a : al) {
                        if (type.getName().equals(a.getName())) {
                            org.openbel.framework.api.AnnotationFilterCriteria afc =
                                    new org.openbel.framework.api.AnnotationFilterCriteria(
                                            a);
                            afc.getValues().addAll(c.getValueSet());
                            afc.setInclude(c.isIsInclude());

                            annotationFilter.add(afc);
                            break;
                        }
                    }
                }
View Full Code Here

Examples of org.openbel.framework.api.internal.KAMCatalogDao.AnnotationFilter

                    throw new KamStoreServiceException("Error processing KAM edge", e);
                }
            }

            // Get the supporting evidence for the edge
            AnnotationFilter annotationFilter = null;
            if (kamFilter != null) {
                // including edge and filter
                final List<AnnotationFilterCriteria> criteria =
                        kamFilter.getAnnotationCriteria();

                final List<org.openbel.framework.api.internal.KAMStoreDaoImpl.AnnotationType> al =
                        new ArrayList<org.openbel.framework.api.internal.KAMStoreDaoImpl.AnnotationType>();
                for (org.openbel.framework.api.internal.KAMStoreDaoImpl.AnnotationType a : kAMStore
                        .getAnnotationTypes(kam)) {
                    al.add(a);
                }

                annotationFilter = kam.getKamInfo().createAnnotationFilter();

                for (AnnotationFilterCriteria c : criteria) {
                    final AnnotationType type = c.getAnnotationType();

                    for (org.openbel.framework.api.internal.KAMStoreDaoImpl.AnnotationType a : al) {
                        if (type.getName().equals(a.getName())) {
                            org.openbel.framework.api.AnnotationFilterCriteria afc =
                                    new org.openbel.framework.api.AnnotationFilterCriteria(
                                            a);
                            afc.getValues().addAll(c.getValueSet());
                            afc.setInclude(c.isIsInclude());

                            annotationFilter.add(afc);
                            break;
                        }
                    }
                }
            }
View Full Code Here

Examples of org.openbel.framework.api.internal.KAMCatalogDao.AnnotationFilter

        teardownKamStore();
    }

    @Test
    public void includeOnlyFilter() {
        AnnotationFilter filter = testKam.getKamInfo().createAnnotationFilter();

        AnnotationFilterCriteria criteria = new AnnotationFilterCriteria(
                ann1.getAnnotationType());
        criteria.setInclude(true);
        criteria.getValues().add(ann1.getValue());
        filter.add(criteria);

        List<BelStatement> filteredStmts = null;
        try {
            filteredStmts = ks.getSupportingEvidence(edge, filter);
        } catch (InvalidArgument e) {
View Full Code Here

Examples of org.openbel.framework.api.internal.KAMCatalogDao.AnnotationFilter

        }
    }

    @Test
    public void excludeOnlyFilter() {
        AnnotationFilter filter = testKam.getKamInfo().createAnnotationFilter();

        AnnotationFilterCriteria criteria = new AnnotationFilterCriteria(
                ann2.getAnnotationType());
        criteria.setInclude(false);
        criteria.getValues().add(ann2.getValue());
        filter.add(criteria);

        List<BelStatement> filteredStmts = null;
        try {
            filteredStmts = ks.getSupportingEvidence(edge, filter);
        } catch (InvalidArgument e) {
View Full Code Here

Examples of org.openbel.framework.api.internal.KAMCatalogDao.AnnotationFilter

        }
    }

    @Test
    public void includeExcludeFilter() {
        AnnotationFilter filter = testKam.getKamInfo().createAnnotationFilter();

        AnnotationFilterCriteria criteria1 = new AnnotationFilterCriteria(ann1.getAnnotationType());
        criteria1.setInclude(true);
        criteria1.getValues().add(ann1.getValue());
        filter.add(criteria1);
        AnnotationFilterCriteria criteria2 = new AnnotationFilterCriteria(ann2.getAnnotationType());
        criteria2.setInclude(false);
        criteria2.getValues().add(ann2.getValue());
        filter.add(criteria2);

        List<BelStatement> filteredStmts = null;
        try {
            filteredStmts = ks.getSupportingEvidence(edge, filter);
        } catch (InvalidArgument e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.