Package de.hpi.eworld.core

Examples of de.hpi.eworld.core.ModelManager.notifyObservers()


  @Test
  public void testSumoImport() {
    ModelManager model = ModelManager.getInstance();
    model.clearModel();
    model.notifyObservers(new ObserverNotification(NotificationType.startBatchProcess));
    Sumo2ModelDOM s2m = new Sumo2ModelDOM("./resources/sumo_test/original/berlin_test.net.xml", model, false,
        false, "");
    s2m.run();
   
    model.notifyObservers(new ObserverNotification(NotificationType.endBatchProcess, true, false));
View Full Code Here


    model.notifyObservers(new ObserverNotification(NotificationType.startBatchProcess));
    Sumo2ModelDOM s2m = new Sumo2ModelDOM("./resources/sumo_test/original/berlin_test.net.xml", model, false,
        false, "");
    s2m.run();
   
    model.notifyObservers(new ObserverNotification(NotificationType.endBatchProcess, true, false));

    Assert.assertEquals(1597, ModelManager.getInstance().getAllModelElements().size());
  }

  @Test
View Full Code Here

        EWorldConstants.getDuaRouterFile(), "", true /* doTlsFile */, false, false,
        false, true, new Integer[]{10000}, false);
    ew2s.run();

    model.clearModel();
    model.notifyObservers(new ObserverNotification(NotificationType.startBatchProcess));
    Sumo2ModelDOM s2m = new Sumo2ModelDOM("./resources/sumo_test/original/berlin_test.net.xml", model, true,
        false, "");
    s2m.run();
    model.notifyObservers(new ObserverNotification(NotificationType.endBatchProcess, true, false));

View Full Code Here

    model.clearModel();
    model.notifyObservers(new ObserverNotification(NotificationType.startBatchProcess));
    Sumo2ModelDOM s2m = new Sumo2ModelDOM("./resources/sumo_test/original/berlin_test.net.xml", model, true,
        false, "");
    s2m.run();
    model.notifyObservers(new ObserverNotification(NotificationType.endBatchProcess, true, false));

    int edges2 = 0;
    int nodes2 = 0;
    int ways2 = 0;
    int tls2 = 0;
View Full Code Here

    logger.debug("now try to import");
    try {
      final ModelManager modelManager = ModelManager.getInstance();
      modelManager.setChanged();
      modelManager.notifyObservers(new ObserverNotification(NotificationType.startBatchProcess));
      osm = new Osm2Model(pedestrian, filterCyclic);
      osm.addObserver(this);

      boolean missingData = false;
      if (length >= 0) {
View Full Code Here

      }

      if (!osm.wasInterrupted()) {
        logger.debug("!osm.wasInterrupted()");
        modelManager.setChanged();
        modelManager.notifyObservers(
          new ObserverNotification(
            NotificationType.endBatchProcess,
            new Boolean(filterDuplicateEdges),
            new Boolean(missingData)
          )
View Full Code Here

  public void testSaveLoad_Imported() {
    Osm2Model converter = new Osm2Model();
    ModelManager mm = ModelManager.getInstance();
    ModelManagerMockUp mmmu = ModelManagerMockUp.getInstance();
    mm.addObserver(mmmu);
    mm.notifyObservers(new ObserverNotification(NotificationType.elementAdded));
    try {
      converter.parseFile(new FileInputStream("./resources/rostock.osm"));
    }
    catch (Exception xcp) {
      xcp.printStackTrace();
View Full Code Here

   */
  @Override
  public void run() {
    ModelManager manager = ModelManager.getInstance();
    manager.setChanged();
    manager.notifyObservers(new ObserverNotification(NotificationType.startBatchProcess));
    manager.clearChanged();
   
    Collection<ModelElement> allElements = ModelManager.getInstance().getAllModelElements();
    int totalNumber = allElements.size();
    if(totalNumber == 0) totalNumber = 1;
View Full Code Here

                              progress));
      this.clearChanged();
    }
   
    manager.setChanged();
    manager.notifyObservers(new ObserverNotification(NotificationType.endBatchProcess, true, false));
    manager.clearChanged();
   
    this.setChanged();
    if(progressDialog.wasCanceled()) {
      this.notifyObservers(new ObserverNotification(NotificationType.failed));
View Full Code Here

    ModelManager model = ModelManager.getInstance();
   
    model.clearModel();

    model.setChanged();
    model.notifyObservers(new ObserverNotification(NotificationType.startBatchProcess));
    model.clearChanged();
   
    for(String id : nodes.keySet()) {
      MyNode n = nodes.get(id);
      NodeModel newNode = new NodeModel(n.lat, n.lon);
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.