Perform Tea "parsing."  This method will compile the named template.

@param templateName the name of the template to parse

@return a Template object that represents the root node of the Tea
parse tree.
436607
public Template parseTeaTemplate(String templateName) throws IOException {

        if (templateName == null) {
            return null;
        }

        preserveParseTree(templateName);
        compile(templateName);
        CompilationUnit unit = getCompilationUnit(templateName, null);
        if (unit == null) {
            return null;
        }

        return unit.getParseTree();
    }
1314718
public Template getTemplate(final String parentName, final String name) throws ResourceNotFoundException {
        return getTemplate(this.loader.concat(parentName, name));
    }
500781
public void parseStandalone(
            final IEngineConfiguration configuration,
            final String ownerTemplate,
            final String template,
            final Set<String> templateSelectors,
            final ITemplateResource resource,
            final TemplateMode templateMode,
            final boolean useDecoupledLogic,
            final ITemplateHandler handler) {

        Validate.notNull(configuration, "Engine Configuration cannot be null");
        // ownerTemplate CAN be null if this is a first-level template
        Validate.notNull(template, "Template cannot be null");
        Validate.notNull(resource, "Template Resource cannot be null");
        Validate.isTrue(templateSelectors == null || templateSelectors.isEmpty(),
                        "Template selectors cannot be specified for a template using RAW template mode: template " +
                        "insertion operations must be always performed on whole template files, not fragments");
        Validate.notNull(templateMode, "Template Mode cannot be null");
        Validate.isTrue(templateMode == TemplateMode.RAW, "Template Mode has to be RAW");
        Validate.isTrue(!useDecoupledLogic, "Cannot use decoupled logic in template mode " + templateMode);
        Validate.notNull(handler, "Template Handler cannot be null");

        parse(configuration, ownerTemplate, template, templateSelectors, resource, 0, 0, templateMode, handler);

    }
1113408
public T getTemplateFromCache(String filename) {

        LRUCache.CacheEntry<String, T> cachedTemplate = cache.get(filename);

        // this is to avoid null pointer exception in case of the layout composite template
        if (cachedTemplate == null) {
            return null;
        }

        return cachedTemplate.compiled;
    }
341957
def get_template(self, template_name):
        """"""
        try:
            return self.loader.load(template_name, encoding=self.encoding)
        except self.not_found_exception, e:
            # catch the exception raised by Genshi, convert it into a werkzeug
            # exception (for the sake of consistency)
            raise TemplateNotFound(template_name)
1209873
public OvhTemplates templateName_GET(String templateName) throws IOException {
		String qPath = "/dedicated/installationTemplate/{templateName}";
		StringBuilder sb = path(qPath, templateName);
		String resp = execN(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhTemplates.class);
	}
311168
public OvhTemplateModem templateModem_name_GET(String name) throws IOException {
		String qPath = "/xdsl/templateModem/{name}";
		StringBuilder sb = path(qPath, name);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhTemplateModem.class);
	}
1279180
private String loadTemplateFile(String templateName) {
		String name = templateName.replace('.', '/') + ".java";
		InputStream in = SpoonMojoGenerate.class.getClassLoader().getResourceAsStream(name);
		String packageName = templateName.substring(0, templateName.lastIndexOf('.'));
		String fileName = templateName.substring(templateName.lastIndexOf('.') + 1) + ".java";
		try {
			return TemplateLoader.loadToTmpFolder(in, packageName, fileName)
					.getAbsolutePath();
		} catch (IOException e) {
			LogWrapper.warn(spoon, String.format("Template %s cannot be loaded.", templateName), e);
			return null;
		}
	}
208618
def get_template_by_name(name,**kwargs):
    
    try:
        tmpl_i = db.DBSession.query(Template).filter(Template.name == name).options(joinedload_all('templatetypes.typeattrs.default_dataset.metadata')).one()
        return tmpl_i
    except NoResultFound:
        log.info("%s is not a valid identifier for a template",name)
        raise HydraError('Template "%s" not found'%name)
348704
public Template getTemplate(String name, Locale locale, Object args) throws IOException, ParseException {
        if (args instanceof String)
            return getTemplate(name, locale, (String) args);
        return getTemplate(name, locale, null, args);
    }
608030
def _get_template(self, template_name, template_file):
        
        template = os.path.join(self.location, 'templates',
                                template_name, template_file)
        return jinja2.Template(open(template).read())
561111
public static StringTemplate stringTemplate(Template template, Object... args) {
        return stringTemplate(template, ImmutableList.copyOf(args));
    }
707900
private void registerTemplates(Iterable<TemplateType> templates, @Nullable Node scopeRoot) {
    if (!Iterables.isEmpty(templates)) {
      // Add any templates from JSDoc into our template scope.
      this.templateScope = typeRegistry.createScopeWithTemplates(templateScope, templates);
      // Register the template types on the scope root node, if there is one.
      if (scopeRoot != null) {
        typeRegistry.registerTemplateTypeNamesInScope(templates, scopeRoot);
      }
    }
  }
1215103
public static String readTemplate(String root, String template) throws IOException {
		if (root == null) {
			return readTemplate(template);
		}
		String settingsFile = root + "/" + Defaults.TemplateDir + "/" + template + Defaults.JsonFileExtension;
		return readFileFromClasspath(settingsFile);
	}
379129
public VueTemplateCompilerResult compile(String htmlTemplate)
      throws VueTemplateCompilerException {
    ScriptObjectMirror templateCompilerResult;
    try {
      templateCompilerResult =
          (ScriptObjectMirror) engine.invokeFunction("compile", htmlTemplate);
    } catch (ScriptException | NoSuchMethodException e) {
      e.printStackTrace();
      throw new VueTemplateCompilerException(
          "An error occurred while compiling the template: "
              + htmlTemplate
              + " -> "
              + e.getMessage());
    }

    String renderFunction = (String) templateCompilerResult.get("render");
    String[] staticRenderFunctions =
        ((ScriptObjectMirror) templateCompilerResult.get("staticRenderFns")).to(String[].class);

    return new VueTemplateCompilerResult(renderFunction, staticRenderFunctions);
  }
828244
public static StringTemplate stringTemplate(Template template, List<?> args) {
        return new StringTemplate(template, ImmutableList.copyOf(args));
    }
145372
public Template parseTemplate(InputStream stream) throws IOException {
        return parseTemplate(new BufferedReader(new InputStreamReader(stream, Charsets.UTF_8)));
    }