Package org.apache.commons.digester

Examples of org.apache.commons.digester.ExtendedBaseRules


     * @return scxmlRules The rule set to be used for digestion
     */
    private static ExtendedBaseRules initRules(final SCXML scxml,
            final PathResolver pr, final List customActions) {

        ExtendedBaseRules scxmlRules = new ExtendedBaseRules();
        scxmlRules.setNamespaceURI(NAMESPACE_SCXML);

        //// SCXML
        scxmlRules.add(XP_SM, new ObjectCreateRule(SCXML.class));
        scxmlRules.add(XP_SM, new SetPropertiesRule());

        //// Datamodel at document root i.e. <scxml> datamodel
        addDatamodelRules(XP_SM + XPF_DM, scxmlRules, scxml, pr);

        //// States
View Full Code Here


     * @return scxmlRules The rule set to be used for digestion
     */
    private static ExtendedBaseRules initRules(final SCXML scxml,
            final PathResolver pr, final List customActions) {

        ExtendedBaseRules scxmlRules = new ExtendedBaseRules();
        scxmlRules.setNamespaceURI(NAMESPACE_SCXML);

        //// SCXML
        scxmlRules.add(XP_SM, new ObjectCreateRule(SCXML.class));
        scxmlRules.add(XP_SM, new SetPropertiesRule());

        //// Datamodel at document root i.e. <scxml> datamodel
        addDatamodelRules(XP_SM + XPF_DM, scxmlRules, scxml, pr);

        //// States
        // Level one states
        addStateRules(XP_SM_ST, scxmlRules, customActions, scxml, pr, 0);
        scxmlRules.add(XP_SM_ST, new SetNextRule("addState"));
        // Nested states
        addStateRules(XPU_ST_ST, scxmlRules, customActions, scxml, pr, 1);
        scxmlRules.add(XPU_ST_ST, new SetNextRule("addChild"));

        // Parallel states
        addStateRules(XPU_PAR_ST, scxmlRules, customActions, scxml, pr, 1);
        scxmlRules.add(XPU_PAR_ST, new SetNextRule("addState"));
        // Target states
        addStateRules(XPU_TR_TAR_ST, scxmlRules, customActions, scxml, pr, 2);
        scxmlRules.add(XPU_TR_TAR_ST, new SetNextRule("setTarget"));

        //// Parallels
        addParallelRules(XPU_ST_PAR, scxmlRules, pr, customActions, scxml);

        //// Ifs
View Full Code Here

    /**
     * Construct a new BeanReader with default properties.
     */
    public BeanReader() {
      // TODO: now we require extended rules may need to document this
      setRules(new ExtendedBaseRules());
    }
View Full Code Here

     *
     * @param parser use this <code>SAXParser</code>
     */
    public BeanReader(SAXParser parser) {
        super(parser);
    setRules(new ExtendedBaseRules());
    }
View Full Code Here

     *
     * @param reader use this <code>XMLReader</code> as source for SAX events
     */
    public BeanReader(XMLReader reader) {
        super(reader);
    setRules(new ExtendedBaseRules());
    }
View Full Code Here

        listOfNames.addName( martinBean );
       
        String xml = "<ListOfNames><names><name name='Martin'/></names></ListOfNames>";
       
        BeanReader reader = new BeanReader();
        reader.setRules( new ExtendedBaseRules() );
        reader.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(true);
        reader.getXMLIntrospector().getConfiguration().setWrapCollectionsInElement(true);
       
        TestRule ruleOne = new TestRule();
        TestRule ruleTwo = new TestRule();
View Full Code Here

     * @return scxmlRules The rule set to be used for digestion
     */
    private static ExtendedBaseRules initRules(final SCXML scxml,
            final PathResolver pr, final List customActions) {

        ExtendedBaseRules scxmlRules = new ExtendedBaseRules();
        scxmlRules.setNamespaceURI(NAMESPACE_SCXML);

        //// SCXML
        scxmlRules.add(XP_SM, new ObjectCreateRule(SCXML.class));
        scxmlRules.add(XP_SM, new SetPropertiesRule());

        //// Datamodel at document root i.e. <scxml> datamodel
        addDatamodelRules(XP_SM + XPF_DM, scxmlRules, scxml, pr);

        //// States
        // Level one states
        addStateRules(XP_SM_ST, scxmlRules, customActions, scxml, pr, 0);
        scxmlRules.add(XP_SM_ST, new SetNextRule("addState"));
        // Nested states
        addStateRules(XPU_ST_ST, scxmlRules, customActions, scxml, pr, 1);
        scxmlRules.add(XPU_ST_ST, new SetNextRule("addChild"));

        // Parallel states
        addStateRules(XPU_PAR_ST, scxmlRules, customActions, scxml, pr, 1);
        scxmlRules.add(XPU_PAR_ST, new SetNextRule("addState"));
        // Target states
        addStateRules(XPU_TR_TAR_ST, scxmlRules, customActions, scxml, pr, 2);
        scxmlRules.add(XPU_TR_TAR_ST, new SetNextRule("setTarget"));

        //// Parallels
        addParallelRules(XPU_ST_PAR, scxmlRules, pr, customActions, scxml);

        //// Ifs
View Full Code Here

     * @return scxmlRules The rule set to be used for digestion
     */
    private static ExtendedBaseRules initRules(final SCXML scxml,
            final PathResolver pr, final List customActions) {

        ExtendedBaseRules scxmlRules = new ExtendedBaseRules();
        scxmlRules.setNamespaceURI(NAMESPACE_SCXML);

        //// SCXML
        scxmlRules.add(XP_SM, new ObjectCreateRule(SCXML.class));
        scxmlRules.add(XP_SM, new SetPropertiesRule());
        scxmlRules.add(XP_SM, new SetCurrentNamespacesRule());

        //// Datamodel at document root i.e. <scxml> datamodel
        addDatamodelRules(XP_SM + XPF_DM, scxmlRules, scxml, pr);

        //// States
View Full Code Here

     * @return scxmlRules The rule set to be used for digestion
     */
    private static ExtendedBaseRules initRules(final SCXML scxml,
            final PathResolver pr, final List customActions) {

        ExtendedBaseRules scxmlRules = new ExtendedBaseRules();
        scxmlRules.setNamespaceURI(NAMESPACE_SCXML);

        //// SCXML
        scxmlRules.add(XP_SM, new ObjectCreateRule(SCXML.class));
        scxmlRules.add(XP_SM, new SetPropertiesRule());

        //// Datamodel at document root i.e. <scxml> datamodel
        addDatamodelRules(XP_SM + XPF_DM, scxmlRules, scxml, pr);

        //// States
        // Level one states
        addStateRules(XP_SM_ST, scxmlRules, customActions, scxml, pr, 0);
        scxmlRules.add(XP_SM_ST, new SetNextRule("addState"));
        // Nested states
        addStateRules(XPU_ST_ST, scxmlRules, customActions, scxml, pr, 1);
        scxmlRules.add(XPU_ST_ST, new SetNextRule("addChild"));

        // Parallel states
        addStateRules(XPU_PAR_ST, scxmlRules, customActions, scxml, pr, 1);
        scxmlRules.add(XPU_PAR_ST, new SetNextRule("addState"));
        // Target states
        addStateRules(XPU_TR_TAR_ST, scxmlRules, customActions, scxml, pr, 2);
        scxmlRules.add(XPU_TR_TAR_ST, new SetNextRule("setTarget"));

        //// Parallels
        addParallelRules(XPU_ST_PAR, scxmlRules, pr, customActions, scxml);

        //// Ifs
View Full Code Here

     * @return scxmlRules The rule set to be used for digestion
     */
    private static ExtendedBaseRules initRules(final SCXML scxml,
            final PathResolver pr, final List customActions) {

        ExtendedBaseRules scxmlRules = new ExtendedBaseRules();

        //// SCXML
        scxmlRules.add(XP_SM, new ObjectCreateRule(SCXML.class));
        scxmlRules.add(XP_SM, new SetPropertiesRule());

        //// Datamodel at document root i.e. <scxml> datamodel
        addDatamodelRules(XP_SM + XPF_DM, scxmlRules, scxml, pr);

        //// States
        // Level one states
        addStateRules(XP_SM_ST, scxmlRules, customActions, scxml, pr, 0);
        scxmlRules.add(XP_SM_ST, new SetNextRule("addState"));
        // Nested states
        addStateRules(XPU_ST_ST, scxmlRules, customActions, scxml, pr, 1);
        scxmlRules.add(XPU_ST_ST, new SetNextRule("addChild"));

        // Parallel states
        addStateRules(XPU_PAR_ST, scxmlRules, customActions, scxml, pr, 1);
        scxmlRules.add(XPU_PAR_ST, new SetNextRule("addState"));
        // Target states
        addStateRules(XPU_TR_TAR_ST, scxmlRules, customActions, scxml, pr, 2);
        scxmlRules.add(XPU_TR_TAR_ST, new SetNextRule("setTarget"));

        //// Parallels
        addParallelRules(XPU_ST_PAR, scxmlRules, pr, customActions, scxml);

        //// Ifs
View Full Code Here

TOP

Related Classes of org.apache.commons.digester.ExtendedBaseRules

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.