InterMine Items XML
================================
InterMine items XML is a generic format that encodes data the matches InterMine class definitions.
.. code-block:: xml
-
-
-
Here, the root element is always .
Within each object has is within a separate - element.
Each
- has an id with the format . For simple cases, the namespace can always be '0'. These IDs are used to signify connections between items within the item XML file - once the data is loaded into InterMine its own serial IDs are used instead and these Item XML ids disappear.
The child elements of an
- are either
* - this has the name of the attribute (matching the defined class name) and a value
* - where the property is a reference to some other item by its Items XML id.
* - this is a collection of s
Example scripts used to generate InterMine Items XML can be found at `intermine_items_example.pl `_.
Datatypes
---------
The data formats required for attributes in InterMine Items XML for the most part they are fairly obvious and match internal Java types (e.g. strings are UTF-8, doubles are 64-bit IEEE 754 floating point).
One exception is the format required for Dates. InterMine allows this to be expressed in 3 different ways.
1. As the number of seconds since the Unix epoch.
2. In the string format 'yyyy-MM-dd HH:mm:ss', assuming UTC.
3. In the string format 'yyyy-MM-dd', assuming UTC.
If parsing fails for all these formats then InterMine will throw a RuntimeException.
APIs
----
InterMine Items XML can either be generated directly in your favourite programming language, or there are a number of language-specific APIs that can generate it, and handle issues like Item XML allocation and referencing automatically.
.. toctree::
:maxdepth: 1
java-items-api
perl-items-api
python-items-api