public MediaWikiParser createParser(){
  logger.debug("Selected Parser: " + parserClass);
  if (parserClass == ModularParser.class) {
    ModularParser mwgp=new ModularParser("\n",languageIdentifers,categoryIdentifers,imageIdentifers,showImageText,deleteTags,showMathTagContent,calculateSrcSpans,null);
    StringBuilder sb=new StringBuilder();
    sb.append(lineSeparator + "languageIdentifers: ");
    for (    String s : languageIdentifers) {
      sb.append(s + " ");
    }
    sb.append(lineSeparator + "categoryIdentifers: ");
    for (    String s : categoryIdentifers) {
      sb.append(s + " ");
    }
    sb.append(lineSeparator + "imageIdentifers: ");
    for (    String s : imageIdentifers) {
      sb.append(s + " ");
    }
    logger.debug(sb.toString());
    MediaWikiTemplateParser mwtp;
    logger.debug("Selected TemplateParser: " + templateParserClass);
    if (templateParserClass == GermanTemplateParser.class) {
      for (      String s : deleteTemplates) {
        logger.debug("DeleteTemplate: '" + s + "'");
      }
      for (      String s : parseTemplates) {
        logger.debug("ParseTemplate: '" + s + "'");
      }
      mwtp=new GermanTemplateParser(mwgp,deleteTemplates,parseTemplates);
    }
 else     if (templateParserClass == FlushTemplates.class) {
      mwtp=new FlushTemplates();
    }
 else     if (templateParserClass == ShowTemplateNamesAndParameters.class) {
      mwtp=new ShowTemplateNamesAndParameters();
    }
 else {
      logger.error("TemplateParser Class Not Found!");
      return null;
    }
    mwgp.setTemplateParser(mwtp);
    return mwgp;
  }
 else {
    logger.error("Parser Class Not Found!");
    return null;
  }
}

public MediaWikiParser createParser ( ) { logger . debug ( "Selected Parser: " + parserClass ) ; if ( parserClass == ModularParser . class ) { ModularParser mwgp = new ModularParser ( "\n" , languageIdentifers , categoryIdentifers , imageIdentifers , showImageText , deleteTags , showMathTagContent , calculateSrcSpans , null ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( lineSeparator + "languageIdentifers: " ) ; for ( String s : languageIdentifers ) { sb . append ( s + " " ) ; } sb . append ( lineSeparator + "categoryIdentifers: " ) ; for ( String s : categoryIdentifers ) { sb . append ( s + " " ) ; } sb . append ( lineSeparator + "imageIdentifers: " ) ; for ( String s : imageIdentifers ) { sb . append ( s + " " ) ; } logger . debug ( sb . toString ( ) ) ; MediaWikiTemplateParser mwtp ; logger . debug ( "Selected TemplateParser: " + templateParserClass ) ; if ( templateParserClass == GermanTemplateParser . class ) { for ( String s : deleteTemplates ) { logger . debug ( "DeleteTemplate: '" + s + "'" ) ; } for ( String s : parseTemplates ) { logger . debug ( "ParseTemplate: '" + s + "'" ) ; } mwtp = new GermanTemplateParser ( mwgp , deleteTemplates , parseTemplates ) ; } else if ( templateParserClass == FlushTemplates . class ) { mwtp = new FlushTemplates ( ) ; } else if ( templateParserClass == ShowTemplateNamesAndParameters . class ) { mwtp = new ShowTemplateNamesAndParameters ( ) ; } else { logger . error ( "TemplateParser Class Not Found!" ) ; return null ; } mwgp . setTemplateParser ( mwtp ) ; return mwgp ; } else { logger . error ( "Parser Class Not Found!" ) ; return null ; } }
creates a mediawikiparser with the configurations which has been set .
