org.allurefw.report.Feature Maven / Gradle / Ivy
The newest version!
package org.allurefw.report;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlType;
import org.allurefw.report.entity.Statistic;
import org.allurefw.report.entity.WithStatistic;
/**
* Java class for Feature complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Feature">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="statistic" type="{urn:report.allurefw.org}Statistic"/>
* <element name="stories" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="story" type="{urn:report.allurefw.org}Story" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </all>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Feature", propOrder = {
})
public class Feature implements Serializable, WithStatistic
{
private final static long serialVersionUID = 1L;
@XmlElement(required = true)
protected String name;
@XmlElement(required = true)
protected Statistic statistic;
@XmlElementWrapper
@XmlElement(name = "story")
protected List stories;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the statistic property.
*
* @return
* possible object is
* {@link Statistic }
*
*/
public Statistic getStatistic() {
return statistic;
}
/**
* Sets the value of the statistic property.
*
* @param value
* allowed object is
* {@link Statistic }
*
*/
public void setStatistic(Statistic value) {
this.statistic = value;
}
public List getStories() {
if (stories == null) {
stories = new ArrayList();
}
return stories;
}
public void setStories(List stories) {
this.stories = stories;
}
public Feature withName(String value) {
setName(value);
return this;
}
public Feature withStatistic(Statistic value) {
setStatistic(value);
return this;
}
public Feature withStories(Story... values) {
if (values!= null) {
for (Story value: values) {
getStories().add(value);
}
}
return this;
}
public Feature withStories(Collection values) {
if (values!= null) {
getStories().addAll(values);
}
return this;
}
public Feature withStories(List stories) {
setStories(stories);
return this;
}
}