Examples of Template


Examples of httl.Template

   */
  public void inited() {
    if (importMacros != null && importMacros.length > 0) {
      for (String importMacro : importMacros) {
        try {
          Template importMacroTemplate = engine.getTemplate(importMacro);
          importMacroTemplates.putAll(importMacroTemplate.getMacros());
        } catch (Exception e) {
          throw new IllegalStateException(e.getMessage(), e);
        }
      }
    }
View Full Code Here

Examples of it.cnr.isti.hpc.wikipedia.article.Template

        .getTemplates()) {
      List<String> templateParameters = t.getParameters();
      parseTemplatesSchema(article, templateParameters);

      if (t.getName().toLowerCase().startsWith("infobox")) {
        article.setInfobox(new Template(t.getName(), templateParameters));
      } else {
        templates.add(new Template(t.getName(), templateParameters));
      }
    }
    article.setTemplates(templates);

  }
View Full Code Here

Examples of it.eng.spagobi.engines.chart.utils.Template

    }   
    //defines the chart type for the correct execution
    ResponseContainer responseContainer=ResponseContainer.getResponseContainer();
    EMFErrorHandler errorHandler=responseContainer.getErrorHandler();
    String chartType = getChartType(obj, errorHandler);
    Template templateUtil = new Template();
    try{
      if (chartType != null && chartType.startsWith(HIGHCHART_TEMPLATE)){
        //gets the dataset object informations
        Integer id = obj.getDataSetId();
        IDataSet dataset = DAOFactory.getDataSetDAO().loadActiveIDataSetByID(id);
       
        ManageDatasets mDs = new ManageDatasets();
        JSONArray parsJSON = getParametersAsJSON(obj);
        //converts the template from xml to json format       
        JSONObject template = templateUtil.getJSONTemplateFromXml( getTemplate(obj.getId().toString()), parsJSON);
        //sets the response
        response.setAttribute("template", template);
        response.setAttribute("divWidth", (templateUtil.getDivWidth()==null)?"100%":templateUtil.getDivWidth());
        response.setAttribute("divHeight",(templateUtil.getDivHeight()==null)?"100%":templateUtil.getDivHeight());
        response.setAttribute("themeHighchart", (templateUtil.getTheme()==null)?"":templateUtil.getTheme());
        response.setAttribute("numCharts", (templateUtil.getNumCharts()==null)?1:templateUtil.getNumCharts());
        response.setAttribute("subType", (templateUtil.getSubType()==null)?1:templateUtil.getSubType());
        response.setAttribute(DataSetConstants.ID, dataset.getId());
        response.setAttribute(DataSetConstants.LABEL, dataset.getLabel());
        response.setAttribute(DataSetConstants.DS_TYPE_CD, (dataset.getDsType()==null)?"":dataset.getDsType());       
        response.setAttribute(DataSetConstants.PARS, parsJSON);
        response.setAttribute(DataSetConstants.TRASFORMER_TYPE_CD, (dataset.getTransformerCd()==null)?"":dataset.getTransformerCd());
View Full Code Here

Examples of jsontemplate.Template

      }
      if (optionsDict.has("format_char")) {
        char formatChar = optionsDict.getString("format_char").charAt(0);
        options.setFormatChar(formatChar);
      }
      System.out.print(new Template(template, null, options)
          .expand(convertObject(dictionary)));
    } catch (Exception e) {
      System.err.println("EXCEPTION: " + e.getClass().getSimpleName());
      e.printStackTrace();
      System.exit(1);
View Full Code Here

Examples of jsynoptic.base.Template

   
    protected void updateTemplatePanels(){
        templatesPanels.removeAll()
        templatesPanels.add(new JPanel() , "emptyPanel");
        for (Iterator it = Template.getTemplates().iterator(); it.hasNext();) {
            Template t = (Template)(it.next());
            if t.getOptionPanelForTemplate() != null) {
                templatesPanels.add( t.getOptionPanelForTemplate(), t.getName());
            }
        }
    }
View Full Code Here

Examples of net.hamnaberg.json.Template

        assertNotNull("Template was null", collection.getTemplate());
    }

    @Test
    public void parseOnlyTemplate() throws IOException {
        Template template = parser.parseTemplate(new InputStreamReader(getClass().getResourceAsStream("/only-template.json")));
        assertNotNull("Template was null", template);
        Map<String,Property> properties = template.getDataAsMap();
        assertThat(properties.keySet(), CoreMatchers.hasItems("full-name", "email", "blog", "avatar"));
    }
View Full Code Here

Examples of net.pterodactylus.util.template.Template

    templateContextFactory.addProvider(new ClassPathTemplateProvider(WebInterface.class, "/templates/"));
    templateContextFactory.addTemplateObject("webInterface", this);
    templateContextFactory.addTemplateObject("formPassword", formPassword);

    /* create notifications. */
    Template newSoneNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/newSoneNotification.html"));
    newSoneNotification = new ListNotification<Sone>("new-sone-notification", "sones", newSoneNotificationTemplate, false);

    Template newPostNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/newPostNotification.html"));
    newPostNotification = new ListNotification<Post>("new-post-notification", "posts", newPostNotificationTemplate, false);

    Template localPostNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/newPostNotification.html"));
    localPostNotification = new ListNotification<Post>("local-post-notification", "posts", localPostNotificationTemplate, false);

    Template newReplyNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/newReplyNotification.html"));
    newReplyNotification = new ListNotification<PostReply>("new-reply-notification", "replies", newReplyNotificationTemplate, false);

    Template localReplyNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/newReplyNotification.html"));
    localReplyNotification = new ListNotification<PostReply>("local-reply-notification", "replies", localReplyNotificationTemplate, false);

    Template mentionNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/mentionNotification.html"));
    mentionNotification = new ListNotification<Post>("mention-notification", "posts", mentionNotificationTemplate, false);

    Template lockedSonesTemplate = TemplateParser.parse(createReader("/templates/notify/lockedSonesNotification.html"));
    lockedSonesNotification = new ListNotification<Sone>("sones-locked-notification", "sones", lockedSonesTemplate);

    Template newVersionTemplate = TemplateParser.parse(createReader("/templates/notify/newVersionNotification.html"));
    newVersionNotification = new TemplateNotification("new-version-notification", newVersionTemplate);

    Template insertingImagesTemplate = TemplateParser.parse(createReader("/templates/notify/inserting-images-notification.html"));
    insertingImagesNotification = new ListNotification<Image>("inserting-images-notification", "images", insertingImagesTemplate);

    Template insertedImagesTemplate = TemplateParser.parse(createReader("/templates/notify/inserted-images-notification.html"));
    insertedImagesNotification = new ListNotification<Image>("inserted-images-notification", "images", insertedImagesTemplate);

    Template imageInsertFailedTemplate = TemplateParser.parse(createReader("/templates/notify/image-insert-failed-notification.html"));
    imageInsertFailedNotification = new ListNotification<Image>("image-insert-failed-notification", "images", imageInsertFailedTemplate);
  }
View Full Code Here

Examples of net.sf.jpluck.jxl.Template

                    }
                }
            } catch (Exception e) {
            }
        }
        Template template = jxl.getDefaultTemplate();
        if (template != null) {
            dlg.templateCombo.setSelectedItem(template.getID());
        }

        if (pluckthis) {
            dlg.cacheCheck.setSelected(false);
            dlg.maxDepthSpinner.setValue(new Integer(0));
View Full Code Here

Examples of net.sf.laja.template.Template

   * @param itemplate
   * @param imacrobody
   * @return
   */
  private Context getContext(ITemplate itemplate, IMacro imacro, IFunction ifunction) {
    Template template = (Template) itemplate;
    if (imacro != null) {
      return ((Macro) imacro).getLocalContext();
    }
    if (ifunction != null) {
      return ((Macro) ifunction).getLocalContext();
    }
    return template.getContext();
  }
View Full Code Here

Examples of net.sf.minuteProject.configuration.bean.Template

    return null;
  }

  public String getBeanClassName (Bean bean, Template template) {
    if (bean!=null) {
      Template templateTarget = CommonUtils.getTargetTemplate(template, BEAN_OBJECT_TEMPLATE);
      return CommonUtils.getClassName(bean, templateTarget);
    }
    return "BEAN CANNOT BE NULL";
  }
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.