Version: 1.1.1

org.biomoby.shared.data
Class MobyDataUtils

java.lang.Object
  extended by org.biomoby.shared.data.MobyDataUtils

public class MobyDataUtils
extends Object

This class contains utilities that could be used on many of the data package classes, such as serialization and deserialization.


Constructor Summary
MobyDataUtils()
           
 
Method Summary
static MobyContentInstance fromXMLDocument(Element doc_root)
          Create a MOBY Java object representation from a MOBY XML payload represented in a DOM.
static MobyContentInstance fromXMLDocument(Element doc_root, Registry registry)
          Create a MOBY Java object representation from a MOBY XML payload represented in a DOM.
static MobyContentInstance fromXMLDocument(InputStream is)
          Create a MOBY Java object representation from a MOBY XML payload coming from an InputStream (a byte stream that will becoverted by the parser into character data).
static MobyContentInstance fromXMLDocument(InputStream is, Registry registry)
           
static MobyContentInstance fromXMLDocument(Reader reader)
          Create a MOBY Java object representation from a MOBY XML payload coming from a Reader (character data).
static MobyContentInstance fromXMLDocument(Reader reader, Registry registry)
           
static MobyContentInstance fromXMLDocument(String xmlData)
          Create a MOBY Java object representation from a MOBY XML payload stored in a String.
static MobyContentInstance fromXMLDocument(String xmlData, Registry registry)
           
static MobyContentInstance fromXMLDocument(URL url)
          Create a MOBY Java object representation from a MOBY XML payload at the given URL.
static MobyContentInstance fromXMLDocument(URL url, Registry registry)
           
static boolean toXMLDocument(OutputStream os, MobyContentInstance mci)
          Writes the XML version of the contents, with an XML declaration.
static boolean toXMLDocument(OutputStream os, MobyContentInstance mci, boolean includeXMLDeclaration)
          Output the XML representation of the data to an OutputStream (i.e. an output that takes byte data, not character-encoded strings).
static boolean toXMLDocument(Writer writer, MobyContentInstance mci)
          Writes the XML version of the contents, with an XML declaration.
static boolean toXMLDocument(Writer writer, MobyContentInstance mci, boolean includeXMLDeclaration)
          Output the XML representation of the data to a Writer (i.e. an output that understands character-encoded strings).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MobyDataUtils

public MobyDataUtils()
Method Detail

toXMLDocument

public static boolean toXMLDocument(OutputStream os,
                                    MobyContentInstance mci)
                             throws Exception
Writes the XML version of the contents, with an XML declaration.

Throws:
Exception

toXMLDocument

public static boolean toXMLDocument(OutputStream os,
                                    MobyContentInstance mci,
                                    boolean includeXMLDeclaration)
                             throws Exception
Output the XML representation of the data to an OutputStream (i.e. an output that takes byte data, not character-encoded strings). Note that the character decoding will depend on your runtime environment.

Throws:
Exception

toXMLDocument

public static boolean toXMLDocument(Writer writer,
                                    MobyContentInstance mci)
                             throws Exception
Writes the XML version of the contents, with an XML declaration.

Throws:
Exception

toXMLDocument

public static boolean toXMLDocument(Writer writer,
                                    MobyContentInstance mci,
                                    boolean includeXMLDeclaration)
                             throws Exception
Output the XML representation of the data to a Writer (i.e. an output that understands character-encoded strings).

Throws:
Exception

fromXMLDocument

public static MobyContentInstance fromXMLDocument(String xmlData)
                                           throws Exception
Create a MOBY Java object representation from a MOBY XML payload stored in a String.

Throws:
Exception

fromXMLDocument

public static MobyContentInstance fromXMLDocument(String xmlData,
                                                  Registry registry)
                                           throws Exception
Throws:
Exception

fromXMLDocument

public static MobyContentInstance fromXMLDocument(InputStream is)
                                           throws Exception
Create a MOBY Java object representation from a MOBY XML payload coming from an InputStream (a byte stream that will becoverted by the parser into character data).

Throws:
Exception

fromXMLDocument

public static MobyContentInstance fromXMLDocument(InputStream is,
                                                  Registry registry)
                                           throws Exception
Throws:
Exception

fromXMLDocument

public static MobyContentInstance fromXMLDocument(URL url)
                                           throws Exception
Create a MOBY Java object representation from a MOBY XML payload at the given URL.

Throws:
Exception

fromXMLDocument

public static MobyContentInstance fromXMLDocument(URL url,
                                                  Registry registry)
                                           throws Exception
Throws:
Exception

fromXMLDocument

public static MobyContentInstance fromXMLDocument(Reader reader)
                                           throws Exception
Create a MOBY Java object representation from a MOBY XML payload coming from a Reader (character data).

Throws:
Exception

fromXMLDocument

public static MobyContentInstance fromXMLDocument(Reader reader,
                                                  Registry registry)
                                           throws Exception
Throws:
Exception

fromXMLDocument

public static MobyContentInstance fromXMLDocument(Element doc_root)
                                           throws Exception
Create a MOBY Java object representation from a MOBY XML payload represented in a DOM.

Parameters:
doc_root - the document's base MOBY tag
Throws:
Exception

fromXMLDocument

public static MobyContentInstance fromXMLDocument(Element doc_root,
                                                  Registry registry)
                                           throws Exception
Create a MOBY Java object representation from a MOBY XML payload represented in a DOM.

Parameters:
doc_root - the document's base MOBY tag
registry - the Mony Central from which to retrieve the data type definitions, uses default registry if null
Throws:
Exception

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010