org.embl.ebi.escience.baclava.factory
Class DataThingFactory

java.lang.Object
  extended by org.embl.ebi.escience.baclava.factory.DataThingFactory

public class DataThingFactory
extends java.lang.Object

A collection of static methods to build DataThings from various other Java object types.

Author:
Tom Oinn

Constructor Summary
DataThingFactory()
           
 
Method Summary
static DataThing bake(byte[] theByteArray)
          For byte arrays store the byte array as is
static DataThing bake(byte[][] theByteArrayArray)
          For arrays of byte arrays store each byte array in a List
static DataThing bake(java.lang.Object theObject)
           
static DataThing bake(java.lang.String theString)
          Easy for String objects, everything already recognizes them so no custom code required.
static DataThing bake(java.lang.String[] theStringArray)
          For String arrays convert the array to a List and store that.
static DataThing bakeForSoaplab(java.util.List theList)
          Bake a List of Lists into a List of byte[]
static java.lang.Object convertObject(java.lang.Object theObject)
           
static DataThing fetchFromURL(java.net.URL url)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataThingFactory

public DataThingFactory()
Method Detail

fetchFromURL

public static DataThing fetchFromURL(java.net.URL url)
                              throws java.io.IOException
Throws:
java.io.IOException

bake

public static DataThing bake(java.lang.Object theObject)

bake

public static DataThing bake(java.lang.String theString)
Easy for String objects, everything already recognizes them so no custom code required.


bake

public static DataThing bake(java.lang.String[] theStringArray)
For String arrays convert the array to a List and store that.


bake

public static DataThing bake(byte[] theByteArray)
For byte arrays store the byte array as is


bake

public static DataThing bake(byte[][] theByteArrayArray)
For arrays of byte arrays store each byte array in a List


bakeForSoaplab

public static DataThing bakeForSoaplab(java.util.List theList)
Bake a List of Lists into a List of byte[]


convertObject

public static java.lang.Object convertObject(java.lang.Object theObject)