Package org.openbel.framework.api.internal.KAMCatalogDao

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


                    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

        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

        }
    }

    @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

        }
    }

    @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

Related Classes of org.openbel.framework.api.internal.KAMCatalogDao.AnnotationFilter

Copyright © 2018 www.massapicom. 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.