/**
* Squidy Interaction Library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* Squidy Interaction Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Squidy Interaction Library. If not, see
* <http://www.gnu.org/licenses/>.
*
* 2009 Human-Computer Interaction Group, University of Konstanz.
* <http://hci.uni-konstanz.de>
*
* Please contact info@squidy-lib.de or visit our website
* <http://www.squidy-lib.de> for further information.
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1.3-b01-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2007.07.09 at 04:05:09 PM CEST
//
package org.squidy.nodes.tracking.config.xml;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for propertyContainer complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="propertyContainer">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="property" type="{}property" maxOccurs="unbounded"/>
* </sequence>
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="msg" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "propertyContainer", propOrder = {
"property"
})
public abstract class PropertyContainer {
@XmlTransient
protected Hashtable<String, Property> propertyHashtable;
@XmlElement(required = true)
protected List<Property> property;
@XmlAttribute(required = true)
protected String id;
@XmlAttribute
protected String msg;
@Override
public String toString() {
StringBuffer strBuf = new StringBuffer();
for (Property p : getProperty()) {
strBuf.append(p + " ");
}
return strBuf.toString();
}
/**
* Gets the value of the property property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the property property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getProperty().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Property }
*
*
*/
public List<Property> getProperty() {
if (property == null) {
property = new ArrayList<Property>();
}
return this.property;
}
public List<Property> getProperties() {
return getProperty();
}
/**
* @author Jo Bieg
* @param newProperties
*/
public void setProperty(Collection<Property> newProperties) {
getProperty().clear();
getProperty().addAll(newProperties);
createPropertyHashtable();
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the msg property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMsg() {
return msg;
}
/**
* Sets the value of the msg property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMsg(String value) {
this.msg = value;
}
/**
* @author Jo Bieg
* @return
*/
public Hashtable<String, Property> getPropertyHashtable() {
if(propertyHashtable == null) createPropertyHashtable();
return propertyHashtable;
}
/**
* @author Jo Bieg
*/
private void createPropertyHashtable() {
propertyHashtable = new Hashtable<String, Property>();
List<Property> properties = getProperty();
for (Property property : properties) {
propertyHashtable.put(property.getName(), property);
}
}
public void updatePropertyHashtable() {
createPropertyHashtable();
}
}