org.intermine.dataloader
Class XmlDataLoader

java.lang.Object
  extended by org.intermine.dataloader.DataLoader
      extended by org.intermine.dataloader.XmlDataLoader

public class XmlDataLoader
extends DataLoader

Provides a method for unmarshalling XML given source into java business objects then calls store on each. store() is AbstractDataLoader.store().


Constructor Summary
XmlDataLoader(IntegrationWriter iw)
           
 
Method Summary
 void close()
          Perform any necessary clean-up and close the integration writer
 void processXml(java.io.InputStream is, Source source, Source skelSource)
          Static method to unmarshall business objects from a given xml file and call store on each.
 
Methods inherited from class org.intermine.dataloader.DataLoader
getIntegrationWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDataLoader

public XmlDataLoader(IntegrationWriter iw)
Parameters:
iw - an IntegrationWriter to use to write objects
See Also:
DataLoader.DataLoader(IntegrationWriter)
Method Detail

processXml

public void processXml(java.io.InputStream is,
                       Source source,
                       Source skelSource)
                throws InterMineException
Static method to unmarshall business objects from a given xml file and call store on each.

Parameters:
is - access to xml file
source - the main source
skelSource - the skeleton source
Throws:
InterMineException - if anything goes wrong with xml or storing

close

public void close()
           throws java.lang.Exception
Perform any necessary clean-up and close the integration writer

Throws:
java.lang.Exception - if an error occurs