Package org.simpleframework.xml.convert

Examples of org.simpleframework.xml.convert.Registry.bind()


    {
      List<Configuration> list = configurationDao.getConfigurations(
          0, Integer.MAX_VALUE, "c.configuration_id", true);
      Registry registry = new Registry();
      registry.bind(OmTimeZone.class, OmTimeZoneConverter.class);
      registry.bind(State.class, StateConverter.class);
      registry.bind(User.class, UserConverter.class);
      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      if (list != null && list.size() > 0) {
View Full Code Here


      List<Configuration> list = configurationDao.getConfigurations(
          0, Integer.MAX_VALUE, "c.configuration_id", true);
      Registry registry = new Registry();
      registry.bind(OmTimeZone.class, OmTimeZoneConverter.class);
      registry.bind(State.class, StateConverter.class);
      registry.bind(User.class, UserConverter.class);
      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      if (list != null && list.size() > 0) {
        registry.bind(list.get(0).getStarttime().getClass(), DateConverter.class);
View Full Code Here

      registry.bind(User.class, UserConverter.class);
      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      if (list != null && list.size() > 0) {
        registry.bind(list.get(0).getStarttime().getClass(), DateConverter.class);
      }
     
      writeList(serializer, backup_dir, "configs.xml", "configs", list);
    }
   
View Full Code Here

  public void exportUsers(OutputStream os, List<User> list) throws Exception {
    Registry registry = new Registry();
    Strategy strategy = new RegistryStrategy(registry);
    Serializer serializer = new Persister(strategy);

    registry.bind(Organisation.class, OrganisationConverter.class);
    registry.bind(OmTimeZone.class, OmTimeZoneConverter.class);
    registry.bind(State.class, StateConverter.class);
    if (list != null && list.size() > 0) {
      registry.bind(list.get(0).getRegdate().getClass(), DateConverter.class);
    }
View Full Code Here

    Registry registry = new Registry();
    Strategy strategy = new RegistryStrategy(registry);
    Serializer serializer = new Persister(strategy);

    registry.bind(Organisation.class, OrganisationConverter.class);
    registry.bind(OmTimeZone.class, OmTimeZoneConverter.class);
    registry.bind(State.class, StateConverter.class);
    if (list != null && list.size() > 0) {
      registry.bind(list.get(0).getRegdate().getClass(), DateConverter.class);
    }
   
View Full Code Here

    Strategy strategy = new RegistryStrategy(registry);
    Serializer serializer = new Persister(strategy);

    registry.bind(Organisation.class, OrganisationConverter.class);
    registry.bind(OmTimeZone.class, OmTimeZoneConverter.class);
    registry.bind(State.class, StateConverter.class);
    if (list != null && list.size() > 0) {
      registry.bind(list.get(0).getRegdate().getClass(), DateConverter.class);
    }
   
    writeList(serializer, os, "users", list);
View Full Code Here

    registry.bind(Organisation.class, OrganisationConverter.class);
    registry.bind(OmTimeZone.class, OmTimeZoneConverter.class);
    registry.bind(State.class, StateConverter.class);
    if (list != null && list.size() > 0) {
      registry.bind(list.get(0).getRegdate().getClass(), DateConverter.class);
    }
   
    writeList(serializer, os, "users", list);
  }
  /*
 
View Full Code Here

      RegistryMatcher matcher = new RegistryMatcher(); //TODO need to be removed in the later versions
      Serializer serializer = new Persister(strategy, matcher);

      matcher.bind(Long.class, LongTransform.class);
      matcher.bind(Integer.class, IntegerTransform.class);
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(RoomType.class, new RoomTypeConverter(roomManager));
     
      List<Room> list = readList(serializer, f, "rooms.xml", "rooms", Room.class);
      for (Room r : list) {
        Long roomId = r.getRooms_id();
View Full Code Here

      Serializer serializer = new Persister(strategy, matcher);

      matcher.bind(Long.class, LongTransform.class);
      matcher.bind(Integer.class, IntegerTransform.class);
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(RoomType.class, new RoomTypeConverter(roomManager));
     
      List<Room> list = readList(serializer, f, "rooms.xml", "rooms", Room.class);
      for (Room r : list) {
        Long roomId = r.getRooms_id();
View Full Code Here

    {
      Registry registry = new Registry();
      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      registry.bind(Organisation.class, new OrganisationConverter(orgDao, organisationsMap));
      registry.bind(Room.class, new RoomConverter(roomDao, roomsMap));
     
      List<RoomOrganisation> list = readList(serializer, f, "rooms_organisation.xml", "room_organisations", RoomOrganisation.class);
      for (RoomOrganisation ro : list) {
        if (!ro.getDeleted()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.