Package org.jostraca

Examples of org.jostraca.TemplateParser


    Template    template   = pTemplate;
    PropertySet tmps       = pTemplate.getMergedPropertySet();
    SectionSet  sectionSet = new SectionSet();

    String src = template.getSource();
    TemplateParser templateParser = getTemplateParser( tmps );
    templateParser.setPropertySet( tmps );
    templateParser.setSectionSet( sectionSet );
    templateParser.setSourceText( src );

    iUserMessageHandler.debug( UserText.get(UserText.TXT_parsing), src.length()+" characters" );

    // FIX: how about .parse(template) and remove sets above?
    templateParser.parse();

    sectionSet = templateParser.getSectionSet();
    template.setSectionSet( sectionSet );

    // FIX: do we need a way to stop processing?
    boolean displaytmdoc = displayTemplateDocumentation( tmps, sectionSet, iUserMessageHandler );
    if( displaytmdoc ) {
View Full Code Here


  protected TemplateParser getTemplateParser( PropertySet pPropertySet ) {
    String tmpp = Property.main_TemplateParser;
    if( pPropertySet.has( tmpp ) ) {
      String templateParserClassName = pPropertySet.get( Property.main_TemplateParser );
      TemplateParser tp = (TemplateParser) iTemplateParserIM.getInstance( templateParserClassName );
      return tp;
    }
    else {
      throw ProcessException.CODE_prop_missing( "propname", tmpp );
    }
View Full Code Here

    Template    template   = pTemplate;
    PropertySet tmps       = pTemplate.getMergedPropertySet();
    SectionSet  sectionSet = new SectionSet();

    String src = template.getSource();
    TemplateParser templateParser = getTemplateParser( tmps );
    templateParser.setPropertySet( tmps );
    templateParser.setSectionSet( sectionSet );
    templateParser.setSourceText( src );
    templateParser.setTemplate( template );

    mUserMessageHandler.debug( UserText.get(UserText.TXT_parsing), src.length()+" characters" );

    // FIX: how about .parse(template) and remove sets above?
    templateParser.parse();

    sectionSet = templateParser.getSectionSet();
    template.setSectionSet( sectionSet );

    // FIX: do we need a way to stop processing?
    boolean displaytmdoc = displayTemplateDocumentation( tmps, sectionSet, mUserMessageHandler );
    if( displaytmdoc ) {
View Full Code Here

  protected TemplateParser getTemplateParser( PropertySet pPropertySet ) {
    String tmpp = Property.main_TemplateParser;
    if( pPropertySet.has( tmpp ) ) {
      String templateParserClassName = pPropertySet.get( Property.main_TemplateParser );
      TemplateParser tp = (TemplateParser) iTemplateParserIM.getInstance( templateParserClassName );
      return tp;
    }
    else {
      throw ProcessException.CODE_prop_missing( "propname", tmpp );
    }
View Full Code Here

TOP

Related Classes of org.jostraca.TemplateParser

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.