Examples of ConfigElement


Examples of net.minecraftforge.common.config.ConfigElement

public class ModGuiConfig extends GuiConfig
{
    public ModGuiConfig(GuiScreen guiScreen)
    {
        super(guiScreen,
                new ConfigElement(ConfigurationHandler.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(),
                Reference.MOD_ID,
                false,
                false,
                GuiConfig.getAbridgedConfigPath(ConfigurationHandler.configuration.toString()));
    }
View Full Code Here

Examples of net.minecraftforge.common.config.ConfigElement

        }

        private static List<IConfigElement> getConfigElements(){
            List<IConfigElement> list = new ArrayList<IConfigElement>();
            for(String category : Config.CATEGORIES) {
                list.add(new DummyCategoryElement(category, category, new ConfigElement(Config.config.getCategory(category).setRequiresMcRestart(!Config.NO_MC_RESTART_CATS.contains(category))).getChildElements()));
            }

            return list;
        }
View Full Code Here

Examples of org.apache.jetspeed.om.profile.ConfigElement

                mapping = new SynchronizedMapping();
                InputSource is = new InputSource( new FileReader(map) );
                is.setSystemId( mapFile );
                mapping.loadMapping( is );
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                ConfigElement rootset = (ConfigElement)unmarshaller.unmarshal(reader);
               
                assertTrue(rootset.getName().equals("theRootSet"));

                Iterator params = rootset.getParameterIterator();
                Parameter param = (Parameter)params.next();
                assertTrue(param.getName().equals("city"));
                assertTrue(param.getValue().equals("Atlanta"));
                param = (Parameter)params.next();
                assertTrue(param.getName().equals("state"));
                assertTrue(param.getValue().equals("Georgia"));
                param = (Parameter)params.next();
                assertTrue(param.getName().equals("country"));
                assertTrue(param.getValue().equals("USA"));
                assertTrue(rootset.getParameterValue("city").equals("Atlanta"));
                assertTrue(rootset.getParameterValue("country").equals("USA"));
                assertTrue(rootset.getParameter("state").getValue().equals("Georgia"));               
               
            }
            catch (Exception e)
            {
                String errmsg = "Error in psml mapping creation: " + e.toString();
View Full Code Here

Examples of org.apache.jetspeed.om.profile.ConfigElement

                mapping = new Mapping();
                InputSource is = new InputSource( new FileReader(map) );
                is.setSystemId( mapFile );
                mapping.loadMapping( is );
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                ConfigElement rootset = (ConfigElement)unmarshaller.unmarshal(reader);
               
                assertTrue(rootset.getName().equals("theRootSet"));

                Iterator params = rootset.getParameterIterator();
                Parameter param = (Parameter)params.next();
                assertTrue(param.getName().equals("city"));
                assertTrue(param.getValue().equals("Atlanta"));
                param = (Parameter)params.next();
                assertTrue(param.getName().equals("state"));
                assertTrue(param.getValue().equals("Georgia"));
                param = (Parameter)params.next();
                assertTrue(param.getName().equals("country"));
                assertTrue(param.getValue().equals("USA"));
                assertTrue(rootset.getParameterValue("city").equals("Atlanta"));
                assertTrue(rootset.getParameterValue("country").equals("USA"));
                assertTrue(rootset.getParameter("state").getValue().equals("Georgia"));               
               
            }
            catch (Exception e)
            {
                String errmsg = "Error in psml mapping creation: " + e.toString();
View Full Code Here

Examples of org.apache.jetspeed.om.profile.ConfigElement

                mapping = new Mapping();
                InputSource is = new InputSource( new FileReader(map) );
                is.setSystemId( mapFile );
                mapping.loadMapping( is );
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                ConfigElement rootset = (ConfigElement)unmarshaller.unmarshal(reader);
               
                assertTrue(rootset.getName().equals("theRootSet"));

                Iterator params = rootset.getParameterIterator();
                Parameter param = (Parameter)params.next();
                assertTrue(param.getName().equals("city"));
                assertTrue(param.getValue().equals("Atlanta"));
                param = (Parameter)params.next();
                assertTrue(param.getName().equals("state"));
                assertTrue(param.getValue().equals("Georgia"));
                param = (Parameter)params.next();
                assertTrue(param.getName().equals("country"));
                assertTrue(param.getValue().equals("USA"));
                assertTrue(rootset.getParameterValue("city").equals("Atlanta"));
                assertTrue(rootset.getParameterValue("country").equals("USA"));
                assertTrue(rootset.getParameter("state").getValue().equals("Georgia"));               
               
            }
            catch (Exception e)
            {
                String errmsg = "Error in psml mapping creation: " + e.toString();
View Full Code Here

Examples of org.apache.jetspeed.om.profile.ConfigElement

                mapping = new Mapping();
                InputSource is = new InputSource( new FileReader(map) );
                is.setSystemId( mapFile );
                mapping.loadMapping( is );
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                ConfigElement rootset = (ConfigElement)unmarshaller.unmarshal(reader);
               
                assertTrue(rootset.getName().equals("theRootSet"));

                Iterator params = rootset.getParameterIterator();
                Parameter param = (Parameter)params.next();
                assertTrue(param.getName().equals("city"));
                assertTrue(param.getValue().equals("Atlanta"));
                param = (Parameter)params.next();
                assertTrue(param.getName().equals("state"));
                assertTrue(param.getValue().equals("Georgia"));
                param = (Parameter)params.next();
                assertTrue(param.getName().equals("country"));
                assertTrue(param.getValue().equals("USA"));
                assertTrue(rootset.getParameterValue("city").equals("Atlanta"));
                assertTrue(rootset.getParameterValue("country").equals("USA"));
                assertTrue(rootset.getParameter("state").getValue().equals("Georgia"));               
               
            }
            catch (Exception e)
            {
                String errmsg = "Error in psml mapping creation: " + e.toString();
View Full Code Here

Examples of org.apache.jmeter.config.ConfigElement

     */
    public void addConfigElement(ConfigElement config, Class asClass)
    {
        if (config != null)
        {
            ConfigElement current = (ConfigElement) configSet.get(asClass);
            if (current == null)
            {
                configSet.put(asClass, cloneIfNecessary(config));
            }
            else
            {
                current.addConfigElement(config);
            }
        }
    }
View Full Code Here

Examples of org.apache.jmeter.config.ConfigElement

   */
  public void addConfigElement(ConfigElement config,Class asClass)
  {
    if (config != null)
    {
      ConfigElement current = (ConfigElement)configSet.get(asClass);
      if (current == null)
      {
        configSet.put(asClass, cloneIfNecessary(config));
      }
      else
      {
        current.addConfigElement(config);
      }
    }
  }
View Full Code Here

Examples of org.apache.jmeter.config.ConfigElement

     * Add a config element as a specific class. Usually this is done to add a
     * subclass as one of it's parent classes.
     */
    public void addConfigElement(ConfigElement config, Class asClass) {
        if (config != null) {
            ConfigElement current = (ConfigElement) configSet.get(asClass);
            if (current == null) {
                configSet.put(asClass, cloneIfNecessary(config));
            } else {
                current.addConfigElement(config);
            }
        }
    }
View Full Code Here

Examples of org.apache.jmeter.config.ConfigElement

     */
    public void addConfigElement(ConfigElement config, Class asClass)
    {
        if (config != null)
        {
            ConfigElement current = (ConfigElement) configSet.get(asClass);
            if (current == null)
            {
                configSet.put(asClass, cloneIfNecessary(config));
            }
            else
            {
                current.addConfigElement(config);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.