org.kinsources.kiwa.hico
Class XMLHico

java.lang.Object
  extended by org.kinsources.kiwa.hico.XMLHico

public class XMLHico
extends java.lang.Object

This class represents a Actulog File reader and writer.

Author:
TIP

Constructor Summary
XMLHico()
           
 
Method Summary
static Hico load(byte[] source)
           
static Hico load(java.io.File file)
           
static Article readArticle(java.lang.String source)
           
static Article readArticle(fr.devinsy.util.xml.XMLReader in)
           
static void readArticles(Articles target, fr.devinsy.util.xml.XMLReader in)
           
static Hico readHico(java.lang.String source)
           
static Hico readHico(fr.devinsy.util.xml.XMLReader in)
          Reads a net from a XMLReader object.
static void save(java.io.File file, Hico source, java.lang.String generator)
          Saves a net in a file.
static java.lang.String toXMLString(Article source)
           
static java.lang.String toXMLString(Hico source)
           
static void write(fr.devinsy.util.xml.XMLWriter out, Article source)
           
static void write(fr.devinsy.util.xml.XMLWriter out, Articles source)
           
static void write(fr.devinsy.util.xml.XMLWriter out, Hico source)
          Writes a net in an stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLHico

public XMLHico()
Method Detail

load

public static Hico load(byte[] source)
                 throws java.lang.Exception
Parameters:
file -
Returns:
Throws:
java.lang.Exception

load

public static Hico load(java.io.File file)
                 throws java.lang.Exception
Parameters:
file -
Returns:
Throws:
java.lang.Exception

readArticle

public static Article readArticle(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

readArticle

public static Article readArticle(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

readArticles

public static void readArticles(Articles 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

readHico

public static Hico readHico(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

readHico

public static Hico readHico(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

save

public static void save(java.io.File file,
                        Hico 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(Article source)
                                    throws java.io.UnsupportedEncodingException
Parameters:
source -
Returns:
Throws:
java.io.UnsupportedEncodingException

toXMLString

public static java.lang.String toXMLString(Hico source)
                                    throws java.io.UnsupportedEncodingException
Parameters:
source -
Returns:
Throws:
java.io.UnsupportedEncodingException

write

public static void write(fr.devinsy.util.xml.XMLWriter out,
                         Article source)
Parameters:
source -

write

public static void write(fr.devinsy.util.xml.XMLWriter out,
                         Articles source)
Parameters:
source -

write

public static void write(fr.devinsy.util.xml.XMLWriter out,
                         Hico source)
Writes a net in an stream.

Parameters:
out - Target.
source - Source.