// Path: arquillian-recorder-reporter/arquillian-recorder-reporter-spi/src/main/java/org/arquillian/recorder/reporter/PropertyEntry.java
// public abstract class PropertyEntry implements ReportEntry {
// 
//     @XmlTransient
//     private final List<PropertyEntry> propertyEntries = new ArrayList<PropertyEntry>();
// 
//     @Override
//     public List<PropertyEntry> getPropertyEntries() {
//         return propertyEntries;
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
// 
//         PropertyEntry that = (PropertyEntry) o;
// 
//         return propertyEntries.equals(that.propertyEntries);
// 
//     }
// 
//     @Override
//     public int hashCode() {
//         return propertyEntries.hashCode();
//     }
// }
// 
// Path: arquillian-recorder-reporter/arquillian-recorder-reporter-api/src/main/java/org/arquillian/recorder/reporter/model/entry/table/TableEntry.java
// @XmlRootElement(name = "table")
// @XmlType(propOrder = { "tableName", "tableHead", "tableBody", "tableFoot" })
// public class TableEntry extends PropertyEntry {
// 
//     private final TableHeadEntry tableHead = new TableHeadEntry();
// 
//     private final TableBodyEntry tableBody = new TableBodyEntry();
// 
//     private final TableFootEntry tableFoot = new TableFootEntry();
// 
//     private String tableName;
// 
//     @XmlElement(name = "tbody", required = true)
//     public TableBodyEntry getTableBody() {
//         return tableBody;
//     }
// 
//     @XmlElement(name = "thead")
//     public TableHeadEntry getTableHead() {
//         return tableHead;
//     }
// 
//     @XmlElement(name = "tfoot")
//     public TableFootEntry getTableFoot() {
//         return tableFoot;
//     }
// 
//     @XmlAttribute(name = "tableName")
//     public String getTableName() {
//         return tableName;
//     }
// 
//     public void setTableName(String tableName) {
//         this.tableName = tableName;
//     }
// 
//     public int getNumberOfColumns() {
// 
//         int n = 0;
// 
//         for (TableRowEntry row : tableBody.getRows()) {
//             int i = row.getTotalColspan();
//             if (i > n) {
//                 n = i;
//             }
//         }
// 
//         return n;
//     }
// 
//     public int getNumberOfRows() {
//         return tableBody.getRows().size();
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
//         if (!super.equals(o)) return false;
// 
//         TableEntry that = (TableEntry) o;
// 
//         if (!tableHead.equals(that.tableHead)) return false;
//         if (!tableBody.equals(that.tableBody)) return false;
//         if (!tableFoot.equals(that.tableFoot)) return false;
//         return tableName != null ? tableName.equals(that.tableName) : that.tableName == null;
// 
//     }
// 
//     @Override
//     public int hashCode() {
//         int result = super.hashCode();
//         result = 31 * result + tableHead.hashCode();
//         result = 31 * result + tableBody.hashCode();
//         result = 31 * result + tableFoot.hashCode();
//         result = 31 * result + (tableName != null ? tableName.hashCode() : 0);
//         return result;
//     }
// }


import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import org.arquillian.recorder.reporter.PropertyEntry;
import org.arquillian.recorder.reporter.model.entry.table.TableEntry;
/*
 * JBoss, Home of Professional Open Source
 * Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
 * contributors by the @authors tag. See the copyright.txt in the
 * distribution for a full listing of individual contributors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.arquillian.recorder.reporter.model.entry;



/**
 * Represents group entry which can hold:<br>
 * <br>
 * <ul>
 * <li>{@link KeyValueEntry}</li>
 * <li>{@link TableEntry}</li>
 * <li>{@link GroupEntry}</li>
 * </ul>
 *
 * By providing the possibility to put {@link GroupEntry} into properties, we are introducing recursive reporting.
 *
 * @author <a href="mailto:smikloso@redhat.com">Stefan Miklosovic</a>
 *
 */
@XmlRootElement(name = "groupEntry")
public class GroupEntry extends PropertyEntry {

    private String name;

    @XmlElements({
        @XmlElement(name = "property", type = KeyValueEntry.class),
        @XmlElement(name = "text", type = TextEntry.class),
        @XmlElement(name = "table", type = TableEntry.class),
        @XmlElement(name = "group", type = GroupEntry.class),
        @XmlElement(name = "screenshot", type = ScreenshotEntry.class),
        @XmlElement(name = "video", type = VideoEntry.class),
        @XmlElement(name = "file", type = FileEntry.class)
    })

    private final List<PropertyEntry> propertyEntries = new ArrayList<PropertyEntry>();

    public GroupEntry() {
    }

    public GroupEntry(String name) {
        setName(name);
    }

    @XmlAttribute
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public List<PropertyEntry> getPropertyEntries() {
// Path: arquillian-recorder-reporter/arquillian-recorder-reporter-spi/src/main/java/org/arquillian/recorder/reporter/PropertyEntry.java
// public abstract class PropertyEntry implements ReportEntry {
// 
//     @XmlTransient
//     private final List<PropertyEntry> propertyEntries = new ArrayList<PropertyEntry>();
// 
//     @Override
//     public List<PropertyEntry> getPropertyEntries() {
//         return propertyEntries;
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
// 
//         PropertyEntry that = (PropertyEntry) o;
// 
//         return propertyEntries.equals(that.propertyEntries);
// 
//     }
// 
//     @Override
//     public int hashCode() {
//         return propertyEntries.hashCode();
//     }
// }
// 
// Path: arquillian-recorder-reporter/arquillian-recorder-reporter-api/src/main/java/org/arquillian/recorder/reporter/model/entry/table/TableEntry.java
// @XmlRootElement(name = "table")
// @XmlType(propOrder = { "tableName", "tableHead", "tableBody", "tableFoot" })
// public class TableEntry extends PropertyEntry {
// 
//     private final TableHeadEntry tableHead = new TableHeadEntry();
// 
//     private final TableBodyEntry tableBody = new TableBodyEntry();
// 
//     private final TableFootEntry tableFoot = new TableFootEntry();
// 
//     private String tableName;
// 
//     @XmlElement(name = "tbody", required = true)
//     public TableBodyEntry getTableBody() {
//         return tableBody;
//     }
// 
//     @XmlElement(name = "thead")
//     public TableHeadEntry getTableHead() {
//         return tableHead;
//     }
// 
//     @XmlElement(name = "tfoot")
//     public TableFootEntry getTableFoot() {
//         return tableFoot;
//     }
// 
//     @XmlAttribute(name = "tableName")
//     public String getTableName() {
//         return tableName;
//     }
// 
//     public void setTableName(String tableName) {
//         this.tableName = tableName;
//     }
// 
//     public int getNumberOfColumns() {
// 
//         int n = 0;
// 
//         for (TableRowEntry row : tableBody.getRows()) {
//             int i = row.getTotalColspan();
//             if (i > n) {
//                 n = i;
//             }
//         }
// 
//         return n;
//     }
// 
//     public int getNumberOfRows() {
//         return tableBody.getRows().size();
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
//         if (!super.equals(o)) return false;
// 
//         TableEntry that = (TableEntry) o;
// 
//         if (!tableHead.equals(that.tableHead)) return false;
//         if (!tableBody.equals(that.tableBody)) return false;
//         if (!tableFoot.equals(that.tableFoot)) return false;
//         return tableName != null ? tableName.equals(that.tableName) : that.tableName == null;
// 
//     }
// 
//     @Override
//     public int hashCode() {
//         int result = super.hashCode();
//         result = 31 * result + tableHead.hashCode();
//         result = 31 * result + tableBody.hashCode();
//         result = 31 * result + tableFoot.hashCode();
//         result = 31 * result + (tableName != null ? tableName.hashCode() : 0);
//         return result;
//     }
// }


// Path: arquillian-recorder-reporter/arquillian-recorder-reporter-api/src/main/java/org/arquillian/recorder/reporter/model/entry/GroupEntry.java
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import org.arquillian.recorder.reporter.PropertyEntry;
import org.arquillian.recorder.reporter.model.entry.table.TableEntry;

/*
 * JBoss, Home of Professional Open Source
 * Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
 * contributors by the @authors tag. See the copyright.txt in the
 * distribution for a full listing of individual contributors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.arquillian.recorder.reporter.model.entry;



/**
 * Represents group entry which can hold:<br>
 * <br>
 * <ul>
 * <li>{@link KeyValueEntry}</li>
 * <li>{@link TableEntry}</li>
 * <li>{@link GroupEntry}</li>
 * </ul>
 *
 * By providing the possibility to put {@link GroupEntry} into properties, we are introducing recursive reporting.
 *
 * @author <a href="mailto:smikloso@redhat.com">Stefan Miklosovic</a>
 *
 */
@XmlRootElement(name = "groupEntry")
public class GroupEntry extends PropertyEntry {

    private String name;

    @XmlElements({
        @XmlElement(name = "property", type = KeyValueEntry.class),
        @XmlElement(name = "text", type = TextEntry.class),
        @XmlElement(name = "table", type = TableEntry.class),
        @XmlElement(name = "group", type = GroupEntry.class),
        @XmlElement(name = "screenshot", type = ScreenshotEntry.class),
        @XmlElement(name = "video", type = VideoEntry.class),
        @XmlElement(name = "file", type = FileEntry.class)
    })

    private final List<PropertyEntry> propertyEntries = new ArrayList<PropertyEntry>();

    public GroupEntry() {
    }

    public GroupEntry(String name) {
        setName(name);
    }

    @XmlAttribute
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public List<PropertyEntry> getPropertyEntries() {
        return propertyEntries;