All Downloads are FREE. Search and download functionalities are using the official Maven repository.

s.leia-executable.0.1.source-code.ApplicationContext.xml Maven / Gradle / Ivy

The newest version!
<?xml version='1.0' encoding="UTF-8" ?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
       xsi:schemaLocation="
           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
           http://www.springframework.org/schema/data/neo4j http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd
           ">

    <context:component-scan base-package="org.leialearns"/>

    <!-- Database configuration -->
    <neo4j:repositories base-package="org.leialearns.graph" />

    <bean id="graphLogger" class="org.leialearns.graph.common.GraphLogger" />

    <bean id="fractionDAO" class="org.leialearns.graph.model.FractionDAO" />
    <bean id="alphabetDAO" class="org.leialearns.graph.interaction.AlphabetDAO" />
    <bean id="symbolDAO" class="org.leialearns.graph.interaction.SymbolDAO"/>
    <bean id="interactionContextDAO" class="org.leialearns.graph.interaction.InteractionContextDAO" />
    <bean id="nodeDAO" class="org.leialearns.graph.structure.NodeDAO" />
    <bean id="counterDAO" class="org.leialearns.graph.model.CounterDAO" />
    <bean id="versionDAO" class="org.leialearns.graph.model.VersionDAO" />
    <bean id="expectedDAO" class="org.leialearns.graph.model.ExpectedDAO" />
    <bean id="estimateDAO" class="org.leialearns.graph.model.EstimateDAO" />
    <bean id="toggledDAO" class="org.leialearns.graph.model.ToggledDAO" />
    <bean id="observedDAO" class="org.leialearns.graph.model.ObservedDAO" />
    <bean id="structureDAO" class="org.leialearns.graph.structure.StructureDAO" />
    <bean id="sessionDAO" class="org.leialearns.graph.session.SessionDAO"/>

    <bean id="factoryInjector" class="org.leialearns.bridge.FactoryInjector"/>

    <bean id="registry" class="org.leialearns.bridge.BridgeHeadTypeRegistry" />

    <bean id="counterLogger" class="org.leialearns.logic.model.CounterLoggerImpl" />
    <bean id="fractionHelper" class="org.leialearns.logic.model.expectation.FractionHelper" />
    <bean id="observedHelper" class="org.leialearns.logic.model.ObservedHelper" />
    <bean id="deltaHelper" class="org.leialearns.logic.model.DeltaHelper" />
    <bean id="checkHelper" class="org.leialearns.logic.model.CheckHelper" />
    <bean id="expectationHelper" class="org.leialearns.logic.model.ExpectationHelperImpl" />

    <bean id="rootFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.session.RootDTO"/>
        <constructor-arg>
            <array>
                <ref bean="expectationHelper" />
                <ref bean="fractionHelper" />
                <ref bean="fractionDAO" />
            </array>
        </constructor-arg>
    </bean>

    <bean id="alphabetFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.interaction.AlphabetDTO"/>
        <constructor-arg>
            <array>
                <ref bean="alphabetHelper"/>
                <ref bean="alphabetDAO"/>
                <ref bean="symbolDAO"/>
                <ref bean="symbolRepository"/>
                <null/> <!-- AlphabetDTO -->
                <value type="java.lang.Class">org.leialearns.logic.interaction.AlphabetAugmenter</value>
            </array>
        </constructor-arg>
    </bean>

    <bean id="symbolFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.interaction.SymbolDTO"/>
        <constructor-arg>
            <array>
                <ref bean="symbolDAO"/>
                <null/> <!-- SymbolDTO -->
                <value type="java.lang.Class">org.leialearns.logic.interaction.SymbolAugmenter</value>
            </array>
        </constructor-arg>
    </bean>

    <bean id="directedSymbolFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.interaction.DirectedSymbolDTO"/>
        <constructor-arg><null/></constructor-arg>
    </bean>

    <bean id="interactionContextFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.interaction.InteractionContextDTO"/>
        <constructor-arg>
            <array>
                <ref bean="interactionContextPrefixHelper"/>
                <ref bean="interactionContextDAO"/>
                <ref bean="versionDAO"/>
            </array>
        </constructor-arg>
    </bean>

    <bean id="nodeFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.structure.NodeDTO"/>
        <constructor-arg>
            <array>
                <ref bean="nodeDAO"/>
                <bean class="org.leialearns.logic.structure.NodeHelper" />
            </array>
        </constructor-arg>
    </bean>

    <bean id="counterFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.model.CounterDTO"/>
        <constructor-arg>
            <array>
                <ref bean="counterDAO"/>
            </array>
        </constructor-arg>
    </bean>

    <bean id="counterUpdateFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.model.CounterUpdateDTO"/>
        <constructor-arg><null/></constructor-arg>
    </bean>

    <bean id="fractionFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.model.FractionBaseDTO"/>
        <constructor-arg>
            <array>
                <ref bean="fractionHelper" />
                <ref bean="fractionDAO" />
            </array>
        </constructor-arg>
    </bean>

    <bean id="versionFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.model.VersionDTO"/>
        <constructor-arg>
            <array>
                <ref bean="versionDAO"/>
                <ref bean="counterDAO"/>
                <ref bean="expectedDAO"/>
                <ref bean="estimateDAO"/>
            </array>
        </constructor-arg>
    </bean>

    <bean id="expectedFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.model.ExpectedDTO"/>
        <constructor-arg>
            <array>
                <ref bean="expectationHelper"/>
                <ref bean="expectedDAO"/>
                <ref bean="estimateDAO"/>
                <bean class="org.leialearns.logic.model.ExpectedHelper" />
                <ref bean="counterLogger" />
            </array>
        </constructor-arg>
    </bean>

    <bean id="toggledFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.model.ToggledDTO"/>
        <constructor-arg>
            <array>
                <ref bean="expectationHelper"/>
                <ref bean="toggledDAO"/>
                <ref bean="estimateDAO"/>
                <null/>
                <value type="java.lang.Class">org.leialearns.logic.model.ToggledAugmenter</value>
            </array>
        </constructor-arg>
    </bean>

    <bean id="estimateFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.model.EstimateDTO" />
        <constructor-arg><null/></constructor-arg>
    </bean>

    <bean id="observedFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.model.ObservedDTO"/>
        <constructor-arg>
            <array>
                <ref bean="observedHelper" />
                <ref bean="deltaHelper" />
                <ref bean="checkHelper" />
                <ref bean="observedDAO"/>
                <ref bean="counterDAO"/>
                <ref bean="counterLogger" />
            </array>
        </constructor-arg>
    </bean>

    <bean id="countedFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.model.CountedDTO"/>
        <constructor-arg>
            <array>
                <ref bean="counterLogger" />
                <ref bean="counterDAO" />
                <ref bean="versionDAO" />
            </array>
        </constructor-arg>
    </bean>

    <bean id="structureFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.structure.StructureDTO"/>
        <constructor-arg>
            <array>
                <ref bean="structurePrefixFreeHelper"/>
                <ref bean="structureDAO"/>
                <ref bean="nodeDAO"/>
            </array>
        </constructor-arg>
    </bean>

    <bean id="sessionFactory" class="org.leialearns.bridge.BridgeFactory">
        <constructor-arg value="org.leialearns.graph.session.SessionDTO"/>
        <constructor-arg>
            <array>
                <ref bean="sessionDAO"/>
                <ref bean="versionDAO"/>
                <ref bean="toggledDAO"/>
                <null/>
                <value type="java.lang.Class">org.leialearns.logic.session.SessionAugmenter</value>
            </array>
        </constructor-arg>
    </bean>

    <!-- Configuration of LEIA interaction context -->

    <bean id="rootDTO" class="org.leialearns.graph.session.RootDTO">
        <constructor-arg>
            <array>
                <ref bean="expectationHelper"/>
            </array>
        </constructor-arg>
    </bean>

    <bean id="root" factory-bean="rootDTO" factory-method="getNearObject" />

    <bean id="encounter" class="org.leialearns.command.encounter.Encounter">
        <property name="streamAdapter" ref="symbolsAdapter" />
        <property name="interactionContextUri" value="http://leialearns.org/test/encounter" />
        <property name="limitFlag" value="true" />
        <property name="autoExtendLimit" value="5" />
    </bean>

    <bean id="symbolsAdapter" class="org.leialearns.command.encounter.TokensAdapter">
        <!-- property name="tokenPattern" value="([\p{Alpha}]+|[\p{Digit}]+|\s*[\[{(]|[^\p{Alpha}\p{Digit}\[{(]\s*)" / -->
        <property name="tokenPattern" value="(\s*[\p{Alpha}]+\s*|[\p{Digit}]+|\s*[\[{(]|[^\p{Alpha}\p{Digit}\[{(]\s*)" />
    </bean>

    <bean id="charactersAdapter" class="org.leialearns.command.encounter.TokensAdapter" />

    <bean id="observer" class="org.leialearns.command.observer.Observer">
        <property name="interactionContextUri" value="http://leialearns.org/test/encounter" />
    </bean>

    <bean id="oracle" class="org.leialearns.logic.oracle.Oracle">
        <property name="data" value="/leia-oracle.data" />
    </bean>

    <bean id="minimizer" class="org.leialearns.command.minimizer.Minimizer">
        <property name="interactionContextUri" value="http://leialearns.org/test/encounter" />
    </bean>

    <bean id="consolidator" class="org.leialearns.command.consolidator.Consolidator">
        <property name="interactionContextUri" value="http://leialearns.org/test/encounter" />
    </bean>

    <bean id="generator" class="org.leialearns.command.generator.Generator" />

</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy