mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-08 05:10:20 +01:00
improve xml serialization
This commit is contained in:
@@ -42,6 +42,10 @@ import sonia.scm.LastModifiedAware;
|
||||
import java.util.Iterator;
|
||||
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.XmlRootElement;
|
||||
|
||||
/**
|
||||
@@ -50,6 +54,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||
* @since 1.5
|
||||
*/
|
||||
@XmlRootElement(name = "file")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
public class FileObject implements LastModifiedAware, Iterable<FileObject>
|
||||
{
|
||||
|
||||
@@ -212,6 +217,8 @@ public class FileObject implements LastModifiedAware, Iterable<FileObject>
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
@XmlElement(name = "file")
|
||||
@XmlElementWrapper(name = "children")
|
||||
private List<FileObject> children;
|
||||
|
||||
/** Field description */
|
||||
|
||||
Reference in New Issue
Block a user