/** * Creates a new data network in a string. * * @throws UdmException */ public void testCreateBlankInstance() throws UdmException { ContainerStringFactory gtf = FactoryRepository.getTimeSeriesContainerStringFactory(); Container con = gtf.create(); fillContainer(con); String a = gtf.save(); System.out.println("\ntestCreateBlankInstance():\n" + a); }
/** * Opens an existing data network from a stream and saves in a string. * * @throws UdmException * @throws FileNotFoundException */ public void testOpenExistingFromStreamSaveToString() throws UdmException, FileNotFoundException { InputStream xml = null; xml = new FileInputStream(BM_FILE_IN); ContainerStringFactory gtf = FactoryRepository.getTimeSeriesContainerStringFactory(); UdmPseudoObject rootUPO = gtf.open(xml); Container con = null; if (rootUPO instanceof Container) { con = (Container) rootUPO; } else { fail("Unexpected root type: " + rootUPO.getType()); } String a = gtf.save(); System.out.println("\ntestOpenExistingFromStreamSaveToString():\n" + a); }