use of com.cas.sim.tis.services.ElecCompService in project TeachingInSimulation by ScOrPiOzzy.
the class RMITest method testGetObject.
@Test
public void testGetObject() throws Exception {
UserService userService = (UserService) userServiceFactory.getObject();
Assert.assertNotNull(userService);
userService.findAll().forEach(System.out::println);
ResourceService resourceService = (ResourceService) resourceServiceFactory.getObject();
Assert.assertNotNull(resourceService);
resourceService.findAll().forEach(System.out::println);
ElecCompService elecCompService = (ElecCompService) elecCompServiceFactory.getObject();
Assert.assertNotNull(elecCompService);
elecCompService.findAll().forEach(System.out::println);
}
use of com.cas.sim.tis.services.ElecCompService in project TeachingInSimulation by ScOrPiOzzy.
the class CircuitTest method testParseCfg.
@Test
public void testParseCfg() throws Exception {
ElecCompService service = (ElecCompService) elecCompServiceFactory.getObject();
// ID:10\11
// ElecComp elecComp = service.findById(10);
ElecComp elecComp = service.findBy("model", "CJX2-12");
String cfgPath = util.getFullPath(elecComp.getCfgPath());
URL url = new URL(cfgPath);
ElecCompDef elecCompDef = JaxbUtil.converyToJavaBean(url, ElecCompDef.class);
System.out.println(elecCompDef);
System.out.println(JaxbUtil.convertToXml(elecCompDef));
}
Aggregations