From: Niki Roo Date: Wed, 1 May 2019 08:06:45 +0000 (+0200) Subject: Make all classes in be.nikiroo.fanfix.data Serializable X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=8b152e7b4b89b6bda319c96a1371e766b8a51adc;p=nikiroo-utils.git Make all classes in be.nikiroo.fanfix.data Serializable --- diff --git a/libs/nikiroo-utils-4.7.2-dev-sources.jar b/libs/nikiroo-utils-4.7.2-dev-sources.jar index 604c761..1d12611 100644 Binary files a/libs/nikiroo-utils-4.7.2-dev-sources.jar and b/libs/nikiroo-utils-4.7.2-dev-sources.jar differ diff --git a/src/be/nikiroo/fanfix/data/Chapter.java b/src/be/nikiroo/fanfix/data/Chapter.java index 873dcb8..d490058 100644 --- a/src/be/nikiroo/fanfix/data/Chapter.java +++ b/src/be/nikiroo/fanfix/data/Chapter.java @@ -1,5 +1,6 @@ package be.nikiroo.fanfix.data; +import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -9,7 +10,9 @@ import java.util.List; * * @author niki */ -public class Chapter implements Iterable, Cloneable { +public class Chapter implements Iterable, Cloneable, Serializable { + private static final long serialVersionUID = 1L; + private String name; private int number; private List paragraphs = new ArrayList(); diff --git a/src/be/nikiroo/fanfix/data/MetaData.java b/src/be/nikiroo/fanfix/data/MetaData.java index cbaf84e..67fedbd 100644 --- a/src/be/nikiroo/fanfix/data/MetaData.java +++ b/src/be/nikiroo/fanfix/data/MetaData.java @@ -1,5 +1,6 @@ package be.nikiroo.fanfix.data; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -10,7 +11,9 @@ import be.nikiroo.utils.Image; * * @author niki */ -public class MetaData implements Cloneable, Comparable { +public class MetaData implements Cloneable, Comparable, Serializable { + private static final long serialVersionUID = 1L; + private String title; private String author; private String date; diff --git a/src/be/nikiroo/fanfix/data/Paragraph.java b/src/be/nikiroo/fanfix/data/Paragraph.java index 0ed61fb..9adc51c 100644 --- a/src/be/nikiroo/fanfix/data/Paragraph.java +++ b/src/be/nikiroo/fanfix/data/Paragraph.java @@ -1,5 +1,7 @@ package be.nikiroo.fanfix.data; +import java.io.Serializable; + import be.nikiroo.utils.Image; /** @@ -7,7 +9,9 @@ import be.nikiroo.utils.Image; * * @author niki */ -public class Paragraph implements Cloneable { +public class Paragraph implements Cloneable, Serializable { + private static final long serialVersionUID = 1L; + /** * A paragraph type, that will dictate how the paragraph will be handled. * diff --git a/src/be/nikiroo/fanfix/data/Story.java b/src/be/nikiroo/fanfix/data/Story.java index 0e0279f..fc3f909 100644 --- a/src/be/nikiroo/fanfix/data/Story.java +++ b/src/be/nikiroo/fanfix/data/Story.java @@ -1,5 +1,6 @@ package be.nikiroo.fanfix.data; +import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -9,7 +10,9 @@ import java.util.List; * * @author niki */ -public class Story implements Iterable, Cloneable { +public class Story implements Iterable, Cloneable, Serializable { + private static final long serialVersionUID = 1L; + private MetaData meta; private List chapters = new ArrayList(); private List empty = new ArrayList(); diff --git a/src/be/nikiroo/fanfix/data/package-info.java b/src/be/nikiroo/fanfix/data/package-info.java index aaa02c3..57db36b 100644 --- a/src/be/nikiroo/fanfix/data/package-info.java +++ b/src/be/nikiroo/fanfix/data/package-info.java @@ -1,6 +1,8 @@ /** * This package contains the data structure used by the program, without the * logic behind them. + *

+ * All the classes inside are serializable. * * @author niki */