Examples of RuleExtractor


Examples of br.com.caelum.vraptor.panettone.parser.rule.RuleExtractor

public class PanettoneParser {

  private final RuleExtractor ruleExtractor;

  public PanettoneParser() {
    ruleExtractor = new RuleExtractor();
  }
View Full Code Here

Examples of br.com.caelum.vraptor.panettone.parser.rule.RuleExtractor

public class PanettoneParser {

  private RuleExtractor ruleExtractor;

  public PanettoneParser() {
    ruleExtractor = new RuleExtractor();
  }
View Full Code Here

Examples of com.volantis.mcs.dom2theme.impl.generator.rule.RuleExtractor

                ".c4 {font-size: medium}" +

                ".c5,.c6 {font-family: fantasy}";

        DOMThemeGenerator generator = createTypeClassRuleGenerator();
        RuleExtractor groupRuleExtractor = new GroupRuleExtractor();
        generator.addRuleExtractor(groupRuleExtractor);


        checkThemeGeneration(generator, "AN004 Type Class and Group",
                inputXml, expectedXml, expectedTheme);
View Full Code Here

Examples of com.volantis.mcs.dom2theme.impl.generator.rule.RuleExtractor

        DOMThemeGenerator generator = new DefaultDOMThemeGenerator();
        RuleBuilderFactory ruleBuilderFactory = new RuleBuilderFactory();
        StylesClassRuleExtractorFactory stylesClassRuleExtractorFactory =
                new StylesClassRuleExtractorFactoryImpl(ruleBuilderFactory);
        RuleExtractor classRuleExtractor = new ClassRuleExtractor(
                stylesClassRuleExtractorFactory);
        generator.addRuleExtractor(classRuleExtractor);

        // We expect a DOM without types.
        String inputXml =
View Full Code Here

Examples of com.volantis.mcs.dom2theme.impl.generator.rule.RuleExtractor

    protected DOMThemeGenerator createTypeClassRuleGenerator() {
        category.setLevel(Level.ALL);

        DOMThemeGenerator generator = new DefaultDOMThemeGenerator();
        RuleBuilderFactory ruleBuilderFactory = new RuleBuilderFactory();
        RuleExtractor typeRuleExtractor = new TypeRuleExtractor(
                ruleBuilderFactory);
        generator.addRuleExtractor(typeRuleExtractor);
        StylesClassRuleExtractorFactory stylesClassRuleExtractorFactory =
                new StylesClassRuleExtractorFactoryImpl(ruleBuilderFactory);
        RuleExtractor classRuleExtractor = new ClassRuleExtractor(
                stylesClassRuleExtractorFactory);
        generator.addRuleExtractor(classRuleExtractor);
        return generator;
    }
View Full Code Here

Examples of com.volantis.mcs.dom2theme.impl.generator.rule.RuleExtractor

        RuleBuilderFactory ruleBuilderFactory = new RuleBuilderFactory();

        // Add the type rule extractor, but only if type rules are to be
        // generated.
        if (context.generateTypeRules()) {
            RuleExtractor typeRuleExtractor = new TypeRuleExtractor(
                    ruleBuilderFactory);
            generator.addRuleExtractor(typeRuleExtractor);
        }

        // Add the class rule extractor.
        StylesClassRuleExtractorFactory stylesClassRuleExtractorFactory =
                new StylesClassRuleExtractorFactoryImpl(ruleBuilderFactory);
        RuleExtractor classRuleExtractor = new ClassRuleExtractor(
                stylesClassRuleExtractorFactory,
                OptimalClassNameGenerator.getDefaultInstance());
        generator.addRuleExtractor(classRuleExtractor);

        // Add the rule group extractor.
        RuleExtractor groupRuleExtractor = new GroupRuleExtractor();
        generator.addRuleExtractor(groupRuleExtractor);

        // Create the extractor which uses both the optimizer and the
        // generator and return it.
        return new DefaultStyledDOMThemeExtractor(optimizer, generator);
View Full Code Here

Examples of com.volantis.mcs.dom2theme.impl.generator.rule.RuleExtractor

        StyleSheet styleSheet = styleSheetFactory.createStyleSheet();

        Iterator ruleExtractors = ruleExtractorList.iterator();
        while (ruleExtractors.hasNext()) {
            RuleExtractor extractor = (RuleExtractor) ruleExtractors.next();
            styleSheet = extractor.extractRules(elementList, styleSheet);
        }

        return styleSheet;
    }
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.