Package org.intermine.util
Class XmlBinding
- java.lang.Object
-
- org.intermine.util.XmlBinding
-
public class XmlBinding extends java.lang.Object
Represents an XML mapping - performs XML (un)marshalling of objects/Full Data XML- Author:
- Mark Woodbridge
-
-
Constructor Summary
Constructors Constructor Description XmlBinding(Model model)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
marshal(java.util.Collection<FastPathObject> col, java.io.Writer writer)
Marshal a collection of objects to an XML file.java.util.List<FastPathObject>
unmarshal(java.io.InputStream is)
Unmarshal an XML file to an object.
-
-
-
Field Detail
-
model
protected Model model
-
-
Constructor Detail
-
XmlBinding
public XmlBinding(Model model)
Constructor- Parameters:
model
- an object model
-
-
Method Detail
-
marshal
public void marshal(java.util.Collection<FastPathObject> col, java.io.Writer writer) throws java.io.IOException
Marshal a collection of objects to an XML file.- Parameters:
col
- business objects to marshal into XMLwriter
- the Writer to use- Throws:
java.io.IOException
- if error encountered with writer
-
unmarshal
public java.util.List<FastPathObject> unmarshal(java.io.InputStream is) throws InterMineException
Unmarshal an XML file to an object.- Parameters:
is
- the InputStream to read from- Returns:
- a collection of business objects
- Throws:
InterMineException
- if an error occurs during unmarshalling
-
-