improve xml serialization

This commit is contained in:
Sebastian Sdorra
2011-06-12 17:17:53 +02:00
parent b80af3ee4a
commit e7b959ac6c

View File

@@ -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 */