Generates DRL from a data provider for the spreadsheet data and templates.

@param dataProvider   the data provider for the spreadsheet data
@param templateStream the InputStream for reading the templates
@return the generated DRL text as a String
320011
public String compile(final DataProvider dataProvider,
                          final InputStream templateStream,
                          boolean replaceOptionals) {
        DefaultTemplateContainer tc = new DefaultTemplateContainer(templateStream, replaceOptionals);
        closeStream(templateStream);
        return compile(dataProvider,
                       new TemplateDataListener(tc));
    }
1060201
private void compileTemplateString(ComponentExposedTypeGenerator exposedTypeGenerator,
      TemplateParserResult templateParserResult) {
    VueTemplateCompilerResult compilerResult;
    try {
      VueTemplateCompiler vueTemplateCompiler = new VueTemplateCompiler();
      compilerResult = vueTemplateCompiler.compile(templateParserResult.getProcessedTemplate());
    } catch (VueTemplateCompilerException e) {
      e.printStackTrace();
      throw new RuntimeException();
    }

    generateGetRenderFunction(exposedTypeGenerator, compilerResult, templateParserResult);
    generateGetStaticRenderFunctions(exposedTypeGenerator, compilerResult);
  }
935956
public RuleContext<D> read(final DataProvider<D>... dataProviders) {
        if (dataProviders != null) {
            Collections.addAll(registeredDataProviders, dataProviders);
        }
        return this;
    }
366693
public com.google.api.ads.admanager.axis.v201811.AudienceSegmentDataProvider getDataProvider() {
        return dataProvider;
    }
99987
@Override
    public XMLValidator createValidator(ValidationContext ctxt)
        throws XMLStreamException
    {
        if (mFullyValidating) {
            return new DTDValidator(this, ctxt, mHasNsDefaults,
                                    getElementMap(), getGeneralEntityMap());
        }
        return new DTDTypingNonValidator(this, ctxt, mHasNsDefaults,
                                         getElementMap(), getGeneralEntityMap());

    }
890068
@Override
    public Object generate(SequenceGeneratorDiscriptor discriptor, Client<?> client, String dataType)
    {
        Jedis jedis = ((RedisClient) client).factory.getConnection();

        Long latestCount = jedis.incr(((RedisClient) client).getEncodedBytes(discriptor.getSequenceName()));
        if (latestCount == 1)
        {
            return discriptor.getInitialValue();
        }
        else
        {
            return (latestCount - 1) * discriptor.getAllocationSize();
        }
    }
450887
public static String toUrl(ProviderInfo providerInfo) {
        String uri = providerInfo.getProtocolType() + "://" + providerInfo.getHost() + ":" + providerInfo.getPort();
        uri += StringUtils.trimToEmpty(providerInfo.getPath());
        StringBuilder sb = new StringBuilder();
        if (providerInfo.getRpcVersion() > 0) {
            sb.append("&").append(ProviderInfoAttrs.ATTR_RPC_VERSION).append("=").append(providerInfo.getRpcVersion());
        }
        if (providerInfo.getSerializationType() != null) {
            sb.append("&").append(ProviderInfoAttrs.ATTR_SERIALIZATION).append("=")
                .append(providerInfo.getSerializationType());
        }
        for (Map.Entry<String, String> entry : providerInfo.getStaticAttrs().entrySet()) {
            sb.append("&").append(entry.getKey()).append("=").append(entry.getValue());
        }
        if (sb.length() > 0) {
            uri += sb.replace(0, 1, "?").toString();
        }
        return uri;
    }
880340
public com.google.protobuf.ByteString
      getProviderIdBytes() {
    java.lang.Object ref = providerId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      providerId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
294311
public com.google.inject.Provider<org.eclipse.xtext.xtext.generator.parser.antlr.splitting.parser.antlr.internal.InternalSimpleExpressionsLexer> provideInternalSimpleExpressionsLexer() {
		return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.xtext.xtext.generator.parser.antlr.splitting.parser.antlr.internal.InternalSimpleExpressionsLexer.class);
	}
163663
private static ZoneRulesProvider getProvider(String zoneId) {
        ZoneRulesProvider provider = ZONES.get(zoneId);
        if (provider == null) {
            if (ZONES.isEmpty()) {
                throw new ZoneRulesException("No time-zone data files registered");
            }
            throw new ZoneRulesException("Unknown time-zone ID: " + zoneId);
        }
        return provider;
    }
867880
public com.google.protobuf.ByteString
      getProviderBytes() {
    java.lang.Object ref = provider_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      provider_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
369348
function(dataprovider) {
            var optionDOM = "";
            var groupCounter = 0;

            $.each(dataprovider, function (index, option) {
                if ($.isArray(option.children)) {
                    groupCounter++;
                    optionDOM += '<optgroup label="' + (option.title || 'Group ' + groupCounter) + '">';

                    option.children.forEach(function(subOption) {
                        optionDOM += '<option value="' + subOption.value + '">' + (subOption.label || subOption.value) + '</option>';
                    });

                    optionDOM += '</optgroup>';
                }
                else {
                    optionDOM += '<option value="' + option.value + '">' + (option.label || option.value) + '</option>';
                }
            });

            this.$select.html(optionDOM);
            this.rebuild();
        }
559029
public static XStream createTemplateXStream() {
        XStream xstream = new XStream(new DomDriver("UTF-8"));
        xstream.setMode(XStream.NO_REFERENCES);
        xstream.registerConverter(new FontConverter());
        
        xstream.alias("template", ReportTemplate.class);
        xstream.useAttributeFor(ReportTemplate.class, "version");
        xstream.alias("band-element", BandElement.class);
        xstream.alias("column-band-element", ColumnBandElement.class);
        
        return xstream;
    }
728552
public MultipleDataProviderContext<DPO> read(DataProvider<DPO> dataProvider) {
        if (dataProvider != null) {
            addedDataProviders.add(dataProvider);
        }

        // Change context
        return new MultipleDataProviderContext<DPO>(addedTriggers, addedDataProviders);
    }
392548
protected Loader<?> getTemplateLoaderForPath(String templateLoaderPath) {
        if (templateLoaderPath.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) {
            String basePackagePath = templateLoaderPath.substring(ResourceUtils.CLASSPATH_URL_PREFIX.length());
            if (log.isDebugEnabled()) {
                log.debug("Template loader path [" + templateLoaderPath + "] resolved to class path [" + basePackagePath + "]");
            }
            ClasspathLoader loader = new ClasspathLoader(environment.getClassLoader());
            loader.setPrefix(basePackagePath);
            return loader;
        } else if (templateLoaderPath.startsWith(ResourceUtils.FILE_URL_PREFIX)) {
            File file = new File(templateLoaderPath.substring(ResourceUtils.FILE_URL_PREFIX.length()));
            String prefix = file.getAbsolutePath();
            if (log.isDebugEnabled()) {
                log.debug("Template loader path [" + templateLoaderPath + "] resolved to file path [" + prefix + "]");
            }
            FileLoader loader = new FileLoader();
            loader.setPrefix(prefix);
            return loader;
        } else {
            File file = new File(environment.getBasePath(), templateLoaderPath);
            String prefix = file.getAbsolutePath();
            if (log.isDebugEnabled()) {
                log.debug("Template loader path [" + templateLoaderPath + "] resolved to file path [" + prefix + "]");
            }
            FileLoader loader = new FileLoader();
            loader.setPrefix(prefix);
            return loader;
        }
    }
1278546
public void generate( String templateName,
                          Row row ) {
        try {
            CompiledTemplate template = getTemplate( templateName );
            VariableResolverFactory factory = new MapVariableResolverFactory();
            Map<String, Object> vars = new HashMap<String, Object>();

            initializePriorCommaConstraints( vars );
            initializeHasPriorJunctionConstraint( vars );

            vars.put( "row",
                      row );

            for ( Cell cell : row.getCells() ) {
                cell.addValue( vars );
            }

            String drl = String.valueOf( TemplateRuntime.execute( template,
                                                                  vars,
                                                                  factory,
                                                                  registry ) );

            rules.add( drl );
        } catch ( Exception e ) {
            throw new RuntimeException( e );
        }
    }
104952
public I_CmsTemplateContextProvider getTemplateContextProvider(String providerName) {

        providerName = providerName.trim();
        providerName = removePropertyPrefix(providerName);
        String providerClassName = providerName;
        String providerConfig = "";

        // get provider configuration string if available
        int separatorIndex = providerName.indexOf(",");
        if (separatorIndex > 0) {
            providerClassName = providerName.substring(0, separatorIndex);
            providerConfig = providerName.substring(separatorIndex + 1);
        }

        I_CmsTemplateContextProvider result = m_providerInstances.get(providerName);
        if (result == null) {
            try {
                Class<?> providerClass = Class.forName(providerClassName);
                if (I_CmsTemplateContextProvider.class.isAssignableFrom(providerClass)) {
                    result = (I_CmsTemplateContextProvider)providerClass.newInstance();
                    result.initialize(m_cms, providerConfig);
                    //note: we use the provider name as a key here, which includes configuration parameters
                    m_providerInstances.put(providerName, result);
                }
            } catch (Throwable t) {
                LOG.error(t.getLocalizedMessage(), t);
            }
        }
        return result;
    }