Package com.qspin.qtaste.tools.filter

Examples of com.qspin.qtaste.tools.filter.FilterXmlHandler


  public SpyInstaller(String pXmlFilterDefinitionPath) {
    super();
    mFilter = new ArrayList<RecorderFilter>();
    if ( pXmlFilterDefinitionPath != null )
    {
      FilterXmlHandler gestionnaire = new FilterXmlHandler();
      try {
        SAXParserFactory fabrique = SAXParserFactory.newInstance();
        SAXParser parseur = fabrique.newSAXParser();
        parseur.parse(pXmlFilterDefinitionPath, gestionnaire);
        for (Filter f : gestionnaire.getDecodedFilters() )
        {
          mFilter.add(new RecorderFilter(f));
        }
      } catch (IOException pExc) {
        LOGGER.error(pExc);
View Full Code Here


    EventManager.getInstance().setEventsFilter(decodeFile(pSelectedFile));
  }

  private List<Filter> decodeFile(File pFile)
  {
    FilterXmlHandler gestionnaire = new FilterXmlHandler();
    try {
      SAXParserFactory fabrique = SAXParserFactory.newInstance();
      SAXParser parseur = fabrique.newSAXParser();
      parseur.parse(pFile, gestionnaire);
    } catch (IOException pExc) {
      LOGGER.error(pExc);
    } catch (SAXException pExc) {
      LOGGER.error(pExc);
    } catch (ParserConfigurationException pExc) {
      LOGGER.error(pExc);
    }
    List<Filter> filters = new ArrayList<Filter>();
    for (Filter f: gestionnaire.getDecodedFilters() )
    {
      filters.add(new EventFilter(f));
    }
    return filters;
  }
View Full Code Here

TOP

Related Classes of com.qspin.qtaste.tools.filter.FilterXmlHandler

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.