Package org.jsmdr.preprocessor

Examples of org.jsmdr.preprocessor.PreProcessor


    NodeList collectorElts = doc.getDocumentElement().getElementsByTagName("Collector");
    NodeList processorElts = doc.getDocumentElement().getElementsByTagName("Processor");
    NodeList parserElts = doc.getDocumentElement().getElementsByTagName("Parser");

    Collector col = CollectorFactory.getInstance().createCollector((Element)collectorElts.item(0));
    PreProcessor processor = null;
    if (processorElts.getLength()>0)
      processor = new PreProcessor((Element)processorElts.item(0));
    else
      processor = new PreProcessor();
   
    col.addListener(processor);
    for (int i=0; i<parserElts.getLength(); i++) {
      SMDRParser parser = ParserFactory.getParser((Element)parserElts.item(i));
      processor.addListener(parser);
      parser.addListener(listener);
    }
  }
View Full Code Here


  }
 
  private void handleListSelection() {
    String selection =
          (String)cdrList.getSelectedValue();
    PreProcessor processor = loader.getProcessor();
    SMDRParser parser = loader.getParser();
   
    String line = selection;
    if (processor != null)
      line = processor.preprocess(line);
     
    if (parser != null)
    {
      CDR cdr = parser.parse(line);
      tableModel.setCDR(cdr);
View Full Code Here

  public PreProcessor getProcessor() {
    return processor;
  }
 
  public void loadSettings(Element e) {
    processor = new PreProcessor(e);
    view.loadSettings(processor.getReplacementsList());
  }
View Full Code Here

  public String getProcessedLine() {
    return processedLine;
  }
 
  public void processStrings() {
    processor = new PreProcessor(view.replacementTablePanel.getReplacementsList());
    processor.addListener(new PreProcessorListener() {
      public void handleLine(String line) {
        processedLine = line;
      }
View Full Code Here

      Document doc = XMLUtil.parseXmlFile(fileName, false);
      NodeList processorElts = doc.getDocumentElement().getElementsByTagName("Processor");
      NodeList parserElts = doc.getDocumentElement().getElementsByTagName("Parser");
 
      if (processorElts.getLength()>0)
        processor = new PreProcessor((Element)processorElts.item(0));
     
      if (parserElts.getLength() == 0)
      {
        parser = null;
      }
View Full Code Here

TOP

Related Classes of org.jsmdr.preprocessor.PreProcessor

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.