org.kinsources.kiwa.agora
Class XMLAgora
java.lang.Object
org.kinsources.kiwa.agora.XMLAgora
public class XMLAgora
- extends java.lang.Object
This class represents a Agora File reader and writer.
- Author:
- TIP
Method Summary |
static Agora |
load(java.io.File file)
|
static Agora |
readAgora(fr.devinsy.util.xml.XMLReader in)
Reads a net from a XMLReader object. |
static Forum |
readForum(fr.devinsy.util.xml.XMLReader in)
|
static void |
readForums(Forums target,
java.lang.String source)
|
static void |
readForums(Forums target,
fr.devinsy.util.xml.XMLReader in)
|
static Message |
readMessage(java.lang.String source)
|
static Message |
readMessage(fr.devinsy.util.xml.XMLReader in,
Topic topic)
|
static void |
readMessages(Messages target,
fr.devinsy.util.xml.XMLReader in,
Topic topic)
|
static Topic |
readTopic(java.lang.String source)
|
static Topic |
readTopic(fr.devinsy.util.xml.XMLReader in,
Forum forum)
|
static void |
readTopics(Topics target,
fr.devinsy.util.xml.XMLReader in,
Forum forum)
|
static void |
save(java.io.File file,
Agora source,
java.lang.String generator)
Saves a net in a file. |
static java.lang.String |
toXMLString(Forums source)
|
static java.lang.String |
toXMLString(Message source)
|
static java.lang.String |
toXMLString(Topic source)
|
static void |
write(fr.devinsy.util.xml.XMLWriter out,
Agora source)
Writes a net in an stream. |
static void |
write(fr.devinsy.util.xml.XMLWriter out,
Forums source,
XMLAgora.Mode mode)
|
static void |
write(fr.devinsy.util.xml.XMLWriter out,
Forum source,
XMLAgora.Mode mode)
|
static void |
write(fr.devinsy.util.xml.XMLWriter out,
Message source)
|
static void |
write(fr.devinsy.util.xml.XMLWriter out,
Messages source,
XMLAgora.Mode mode)
|
static void |
write(fr.devinsy.util.xml.XMLWriter out,
Topics source,
XMLAgora.Mode mode)
|
static void |
write(fr.devinsy.util.xml.XMLWriter out,
Topic source,
XMLAgora.Mode mode)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLAgora
public XMLAgora()
load
public static Agora load(java.io.File file)
throws java.lang.Exception
- Parameters:
file
-
- Returns:
-
- Throws:
java.lang.Exception
readAgora
public static Agora readAgora(fr.devinsy.util.xml.XMLReader in)
throws javax.xml.stream.XMLStreamException,
fr.devinsy.util.xml.XMLBadFormatException
- Reads a net from a XMLReader object.
- Parameters:
in
- the source of reading.
- Returns:
- the read net.
- Throws:
fr.devinsy.util.xml.XMLBadFormatException
javax.xml.stream.XMLStreamException
readForum
public static Forum readForum(fr.devinsy.util.xml.XMLReader in)
throws javax.xml.stream.XMLStreamException,
fr.devinsy.util.xml.XMLBadFormatException
- Parameters:
target
- in
-
- Throws:
fr.devinsy.util.xml.XMLBadFormatException
javax.xml.stream.XMLStreamException
readForums
public static void readForums(Forums target,
java.lang.String source)
throws javax.xml.stream.XMLStreamException,
fr.devinsy.util.xml.XMLBadFormatException
- Parameters:
target
- in
-
- Throws:
fr.devinsy.util.xml.XMLBadFormatException
javax.xml.stream.XMLStreamException
java.lang.Exception
readForums
public static void readForums(Forums target,
fr.devinsy.util.xml.XMLReader in)
throws javax.xml.stream.XMLStreamException,
fr.devinsy.util.xml.XMLBadFormatException
- Parameters:
target
- in
-
- Throws:
fr.devinsy.util.xml.XMLBadFormatException
javax.xml.stream.XMLStreamException
readMessage
public static Message readMessage(java.lang.String source)
throws javax.xml.stream.XMLStreamException,
fr.devinsy.util.xml.XMLBadFormatException
- Parameters:
target
- in
-
- Throws:
fr.devinsy.util.xml.XMLBadFormatException
javax.xml.stream.XMLStreamException
java.lang.Exception
readMessage
public static Message readMessage(fr.devinsy.util.xml.XMLReader in,
Topic topic)
throws javax.xml.stream.XMLStreamException,
fr.devinsy.util.xml.XMLBadFormatException
- Parameters:
target
- in
-
- Throws:
fr.devinsy.util.xml.XMLBadFormatException
javax.xml.stream.XMLStreamException
readMessages
public static void readMessages(Messages target,
fr.devinsy.util.xml.XMLReader in,
Topic topic)
throws javax.xml.stream.XMLStreamException,
fr.devinsy.util.xml.XMLBadFormatException
- Parameters:
target
- in
-
- Throws:
fr.devinsy.util.xml.XMLBadFormatException
javax.xml.stream.XMLStreamException
readTopic
public static Topic readTopic(java.lang.String source)
throws javax.xml.stream.XMLStreamException,
fr.devinsy.util.xml.XMLBadFormatException
- Parameters:
target
- in
-
- Throws:
fr.devinsy.util.xml.XMLBadFormatException
javax.xml.stream.XMLStreamException
java.lang.Exception
readTopic
public static Topic readTopic(fr.devinsy.util.xml.XMLReader in,
Forum forum)
throws javax.xml.stream.XMLStreamException,
fr.devinsy.util.xml.XMLBadFormatException
- Parameters:
target
- in
-
- Throws:
fr.devinsy.util.xml.XMLBadFormatException
javax.xml.stream.XMLStreamException
readTopics
public static void readTopics(Topics target,
fr.devinsy.util.xml.XMLReader in,
Forum forum)
throws javax.xml.stream.XMLStreamException,
fr.devinsy.util.xml.XMLBadFormatException
- Parameters:
target
- in
-
- Throws:
fr.devinsy.util.xml.XMLBadFormatException
javax.xml.stream.XMLStreamException
save
public static void save(java.io.File file,
Agora source,
java.lang.String generator)
throws java.lang.Exception
- Saves a net in a file.
- Parameters:
file
- Target.source
- Source.
- Throws:
java.lang.Exception
toXMLString
public static java.lang.String toXMLString(Forums source)
throws java.io.UnsupportedEncodingException
- Parameters:
source
-
- Returns:
-
- Throws:
java.io.UnsupportedEncodingException
toXMLString
public static java.lang.String toXMLString(Message source)
throws java.io.UnsupportedEncodingException
- Parameters:
source
-
- Returns:
-
- Throws:
java.io.UnsupportedEncodingException
toXMLString
public static java.lang.String toXMLString(Topic source)
throws java.io.UnsupportedEncodingException
- Parameters:
source
-
- Returns:
-
- Throws:
java.io.UnsupportedEncodingException
write
public static void write(fr.devinsy.util.xml.XMLWriter out,
Agora source)
- Writes a net in an stream.
- Parameters:
out
- Target.source
- Source.
write
public static void write(fr.devinsy.util.xml.XMLWriter out,
Forum source,
XMLAgora.Mode mode)
- Parameters:
source
-
write
public static void write(fr.devinsy.util.xml.XMLWriter out,
Forums source,
XMLAgora.Mode mode)
- Parameters:
source
-
write
public static void write(fr.devinsy.util.xml.XMLWriter out,
Message source)
- Parameters:
source
-
write
public static void write(fr.devinsy.util.xml.XMLWriter out,
Messages source,
XMLAgora.Mode mode)
- Parameters:
source
-
write
public static void write(fr.devinsy.util.xml.XMLWriter out,
Topic source,
XMLAgora.Mode mode)
- Parameters:
source
-
write
public static void write(fr.devinsy.util.xml.XMLWriter out,
Topics source,
XMLAgora.Mode mode)
- Parameters:
source
-