Package org.roolie.config.elmt

Examples of org.roolie.config.elmt.PropertyElmt


    }
    propertyElmts = new LinkedList<PropertyElmt>();
    for (Node propertyNode : propertyNodes)
    {
      // Create a new PropertyElmt
      PropertyElmt propertyElmt = new PropertyElmt();

      // Set name
      final String name = RUtil.getRequiredAttributeValue(propertyNode,
        XML.ATTRIB.NAME);
      propertyElmt.setName(name);

      // Set value
      final String value = RUtil.getAttributeValue(propertyNode,
        XML.ATTRIB.VALUE);
      propertyElmt.setValue(value);

      // Set list items
      final List<ListItemElmt> listItems = createListItemElmts(propertyNode);
      propertyElmt.setListItems(listItems);

      // Make sure there is either listItems or a value, but not both
      RUtil.assertExclusiveOR((null == value), (null == listItems), "Either "
        + XML.ATTRIB.VALUE + " or " + XML.NODE.LIST
        + " are required, but not both");
View Full Code Here

TOP

Related Classes of org.roolie.config.elmt.PropertyElmt

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.