package fr.gouv.finances.cp.xemelios.updater.config;
import java.util.ArrayList;
-import java.util.Iterator;
+
+import javax.xml.namespace.QName;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import fr.gouv.finances.cp.utils.xml.marshal.XmlAttributes;
import fr.gouv.finances.cp.utils.xml.marshal.XmlMarshallable;
import fr.gouv.finances.cp.utils.xml.marshal.XmlOutputter;
-import javax.xml.namespace.QName;
public class FileListModel implements XmlMarshallable {
public static final transient String TAG = "files";
- public static final transient QName QN = new QName(TAG);
-
+ public static final transient QName QN = new QName(TAG);
+
private String root;
-
+
public ArrayList<XmlMarshallable> files;
- public FileListModel(QName tag) {
+ public FileListModel(final QName tag) {
super();
- files=new ArrayList<XmlMarshallable>();
+ this.files = new ArrayList<XmlMarshallable>();
}
- public void addCharacterData(String cData) throws SAXException {
+ @Override
+ public void addCharacterData(final String cData) throws SAXException {
}
- public void addChild(XmlMarshallable child, QName tagName) throws SAXException {
- files.add(child);
+ @Override
+ public void addChild(final XmlMarshallable child, final QName tagName) throws SAXException {
+ this.files.add(child);
}
- public XmlMarshallable getAttributes(XmlAttributes attributes) throws SAXException {
- root = attributes.getValue("root");
+ @Override
+ public XmlMarshallable getAttributes(final XmlAttributes attributes) throws SAXException {
+ this.root = attributes.getValue("root");
return this;
}
- public void marshall(XmlOutputter output) {
+ @Override
+ public void marshall(final XmlOutputter output) {
output.startTag(TAG);
- output.addAttribute("root",root);
- for(Iterator<XmlMarshallable> it=files.iterator();it.hasNext();)
- it.next().marshall(output);
+ output.addAttribute("root", this.root);
+ for (final XmlMarshallable xmlMarshallable : this.files) {
+ xmlMarshallable.marshall(output);
+ }
output.endTag(TAG);
}
- public void validate() throws InvalidXmlDefinition { }
+ @Override
+ public void validate() throws InvalidXmlDefinition {
+ }
+
+ @Override
public FileListModel clone() {
- FileListModel flm = new FileListModel(QN);
- flm.root=root;
- for(Iterator<XmlMarshallable> it=files.iterator();it.hasNext();)
- flm.files.add((XmlMarshallable)it.next().clone());
+ final FileListModel flm = new FileListModel(QN);
+ flm.root = this.root;
+ for (final XmlMarshallable xmlMarshallable : this.files) {
+ flm.files.add((XmlMarshallable) xmlMarshallable.clone());
+ }
return flm;
}
public ArrayList<XmlMarshallable> getFiles() {
- return files;
+ return this.files;
}
- public void setFiles(ArrayList<XmlMarshallable> files) {
+ public void setFiles(final ArrayList<XmlMarshallable> files) {
this.files = files;
}
public String getRoot() {
- return root;
+ return this.root;
}
- public void setRoot(String root) {
+ public void setRoot(final String root) {
this.root = root;
}
- public XmlMarshallable getChildToModify(String uri, String localName, String qName, Attributes atts) {
- return null;
- }
+ @Override
+ public XmlMarshallable getChildToModify(final String uri, final String localName, final String qName, final Attributes atts) {
+ return null;
+ }
- public QName getQName() {
- return QN;
- }
+ @Override
+ public QName getQName() {
+ return QN;
+ }
}