Package org.openbel.framework.compiler

Examples of org.openbel.framework.compiler.PhaseTwoImpl


        final ProtoNetworkService protonetService =
                new ProtoNetworkServiceImpl();
        final EquivalenceIndexerService indexer =
                new EquivalenceIndexerServiceImpl();
        final PhaseTwoImpl phaseTwo =
                new PhaseTwoImpl(cache, indexer, protonetService);
        phaseTwo.setReportable(getReportable());

        p2 = phaseTwo;
    }
View Full Code Here


        final ProtoNetworkService protonetService =
                new ProtoNetworkServiceImpl();
        final EquivalenceIndexerService indexer =
                new EquivalenceIndexerServiceImpl();
        final PhaseTwoImpl phaseTwo =
                new PhaseTwoImpl(cache, indexer, protonetService);
        phaseTwo.setReportable(getReportable());

        p2 = phaseTwo;
        p3 = new PhaseThreeImpl(protonetService, p2);

        final XBELValidatorService validator = createValidator();
View Full Code Here

     * </ol>
     */
    @Test
    public void testEquivalence() {
        // load equivalences using PhaseTwo
        final DefaultPhaseTwo p2 = new PhaseTwoImpl(
                new DefaultCacheableResourceService(),
                new EquivalenceIndexerServiceImpl(),
                new ProtoNetworkServiceImpl());

        assertThat("test protonetwork is null", pn, notNullValue());

        final Set<EquivalenceDataIndex> equivs;
        try {
            equivs = p2.stage2LoadNamespaceEquivalences();
        } catch (EquivalenceMapResolutionFailure e) {
            e.printStackTrace();
            fail("encountered exception when loading equivalences");
            return;
        }

        assertThat("equivs are null", equivs, notNullValue());
        assertThat("equivs set is empty", equivs.size(), greaterThan(0));

        // test equivalencing
        try {
            // test parameter equivalencer
            int params = p2.stage3EquivalenceParameters(pn, equivs);
            assertThat("incorrect number of parmeter equivalences", params, is(9));

            // test term equivalencer
            int terms = p2.stage3EquivalenceTerms(pn);
            assertThat("incorrect number of term equivalences", terms, is(5));

            // test statement equivalencer
            int statements = p2.stage3EquivalenceStatements(pn);
            assertThat("incorrect number of statement equivalences", statements, is(3));
        } catch (IOException e) {
            e.printStackTrace();
            fail("encountered exception running parmaeter equivalencer");
        }
View Full Code Here

TOP

Related Classes of org.openbel.framework.compiler.PhaseTwoImpl

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.