Package org.jconfig.parser

Examples of org.jconfig.parser.ConfigurationParser


     *
     *@param  theURL                          Description of the Parameter
     *@throws  ConfigurationManagerException  if the file cannot be processed
     */
    public synchronized Configuration load(String configName) throws ConfigurationManagerException {
    ConfigurationParser parser = ConfigurationParserFactory.getParser(configName);
        return load(getURL(), configName,parser);
    }
View Full Code Here


  public synchronized Configuration load(String configName,ConfigurationParser parser) throws ConfigurationManagerException {
        return load(getURL(), configName,parser);
    }
 
  protected Configuration load(String theURL,String configName) throws ConfigurationManagerException {
    ConfigurationParser parser = ConfigurationParserFactory.getParser(configName);
        return load(getURL(), configName,parser);
  }
View Full Code Here

    return config;
  }
 
  public static Configuration load(String configName,String parserName) throws ConfigurationManagerException {
    InputStreamHandler ish = new InputStreamHandler(configName+"_config.xml");
    ConfigurationParser parser = getParser(parserName);
    Configuration config = ish.load(configName,parser);
    cm.setConfiguration(config,ish);
    return config;
  }
View Full Code Here

    return config;
  }
 
  public static Configuration loadFile(String configName,String fileName,String parserName) throws ConfigurationManagerException {
    XMLFileHandler xmlHandler = new XMLFileHandler(fileName);
    ConfigurationParser parser = getParser(parserName);
    Configuration config = xmlHandler.load(configName,parser);
    cm.setConfiguration(config,xmlHandler);
    return config;
  }
View Full Code Here

  }
 
  public static Configuration loadFromUrl(String configName,String url,String parserName) throws ConfigurationManagerException {
    URLHandler urlHandler = new URLHandler();
    urlHandler.setURL(url);
    ConfigurationParser parser = getParser(parserName);
    Configuration config = urlHandler.load(configName,parser);
    cm.setConfiguration(config,urlHandler);
    return config;
  }
View Full Code Here

    String cls = line;
    if ( line.indexOf(".") == -1 ) {
      cls = "org.jconfig.parser."+line;
    }
    try {
      ConfigurationParser parser = (ConfigurationParser)Class.forName(cls).newInstance();
      return parser;
    }
    catch (Exception e) {
      throw new ConfigurationManagerException("The parser: "+cls+" cannot be found");
    }
View Full Code Here

    /**
     * Loads the configuration from a xml file.
     * @throws ConfigurationManagerException
     */
    public synchronized Configuration load(String configurationName) throws ConfigurationManagerException {
    ConfigurationParser parser = ConfigurationParserFactory.getParser(configurationName);
    return load(configurationName,parser);
    }
View Full Code Here

    }
   
    /**
     * @throws ConfigurationManagerException  */
    public synchronized Configuration load(String configurationName) throws ConfigurationManagerException {
    ConfigurationParser parser = ConfigurationParserFactory.getParser(configurationName);
        return load(file,configurationName,parser);
    }
View Full Code Here

  public Configuration load(String configurationName, ConfigurationParser parser) throws ConfigurationManagerException {
    return load(file,configurationName,parser);
  }
   
  public synchronized Configuration load(File file,String configurationName) throws ConfigurationManagerException {
    ConfigurationParser parser = ConfigurationParserFactory.getParser(configurationName);
        return load(file,configurationName,parser);
  }
View Full Code Here

TOP

Related Classes of org.jconfig.parser.ConfigurationParser

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.