Package org.skyscreamer.yoga.selector.parser

Examples of org.skyscreamer.yoga.selector.parser.SelectorParser


        MapHierarchicalModel<?> navigationLinks = ( ( MapHierarchicalModel<?> ) event.getModel() )
                .createChildMap( "navigationLinks" );
        Collection<Property<T>> fieldNames = getNonSelectedFields( selector, instanceType, instance );

        SelectorParser selectorParser = event.getRequestContext().getSelectorParser();
        String format;
        if (selectorParser instanceof LinkedInSelectorParser)
        {
            format = "%s?selector=:(%s)";
        }
        else if (selectorParser instanceof GDataSelectorParser)
        {
            format = "%s?selector=%s";
        }
        else
        {
            throw new IllegalStateException( "Unknown selector type: " + selectorParser.getClass().getName() );
        }
        for ( Property<?> field : fieldNames )
        {
            String fieldName = field.name();
            MapHierarchicalModel<?> navModel = navigationLinks.createChildMap( fieldName );
View Full Code Here


            engine.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName());
            engine.init();

            // Set properties
            Context velocityContext = new VelocityContext();
            SelectorParser selectorParser = getSelectorResolver().getSelectorParser();
            velocityContext.put("selectorJavascriptURL", selectorParser.getSelectorJavascriptURL());
            velocityContext.put("selectorType", selectorParser.getSelectorType());
            Template velocityTemplate = engine.getTemplate("/selectorBuilder.vm.html");

            // Draw output
            StringWriter stringWriter = new StringWriter();
            velocityTemplate.merge(velocityContext, stringWriter);
View Full Code Here

TOP

Related Classes of org.skyscreamer.yoga.selector.parser.SelectorParser

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.