storedExonContigLocations[0] = createLocation(storedContigs[0], storedExons[0], 1, 120, 140);
storedRepeatRegions = new RepeatRegion [4]; for (int i = 0 ; i < 4 ; i++) { storedRepeatRegions[i] = (RepeatRegion) DynamicUtil.createObject(Collections.singleton(RepeatRegion.class)); storedRepeatRegions[i].setName("repeat_region" + i); }
    private void createData() throws Exception {        osw.flushObjectById();        storedContigs[0] =            (Contig) DynamicUtil.createObject(Collections.singleton(Contig.class));        storedContigs[0].setName("contig0");        storedContigs[0].setLength(new Integer(1000));        storedContigs[1] =            (Contig) DynamicUtil.createObject(Collections.singleton(Contig.class));        storedContigs[0].setName("contig1");        storedContigs[0].setLength(new Integer(1500));        storedExons = new Exon [6];        for (int i = 0 ; i < 6 ; i++) {            storedExons[i] = (Exon) DynamicUtil.createObject(Collections.singleton(Exon.class));            storedExons[i].setName("exon" + i);        }        storedExonContigLocations[0] =            createLocation(storedContigs[0], storedExons[0], 1, 120, 140);//         storedExon2ContigLocation =//             (Location) DynamicUtil.createObject(Collections.singleton(SimpleRelation.class));//         storedExon2ContigLocation.setObject(storedContig);//         storedExon2ContigLocation.setSubject(storedExon2);//         Set toStore = new HashSet(Arrays.asList(new Object[] {//                                                     storedContig, storedExon1, storedExon2,//                                                     storedExon1ContigLocation,//                                                     storedExon2ContigLocation,//                                                 }));//         Iterator i = toStore.iterator();//         osw.beginTransaction();//         while (i.hasNext()) {//             osw.store((InterMineObject) i.next());//         }//         osw.commitTransaction();    }