Examples of notifyObservers()


Examples of cu.repsystestbed.graphs.FeedbackHistoryGraph.notifyObservers()

    DefaultArffFeedbackGenerator feedbackGen = new DefaultArffFeedbackGenerator();
    ArrayList<Feedback> feedbacks = (ArrayList<Feedback>) feedbackGen.generateHardcoded("feedbacks.arff");
   
    //add the feedbacks to the feedback history graph
    feedbackHistoryGraph.addFeedbacks(feedbacks, true)
    feedbackHistoryGraph.notifyObservers(true);

  }

}
View Full Code Here

Examples of cu.repsystestbed.graphs.FeedbackHistoryGraph.notifyObservers()

   
    //add eigentrust as an observer to the feedback history graph
    feedbackHistoryGraph.addObserver(repAlg);
   
    //make eigentrust calculate the reputation of all the agents
    feedbackHistoryGraph.notifyObservers(false);
   
    ReputationGraph repGraph = (ReputationGraph) repAlg.getGraph2Output();
    //TODO display the reputation graph.
   
    RankbasedTrustAlg trustAlg = (RankbasedTrustAlg) TrustAlgorithm.getInstance("cu.repsystestbed.algorithms.RankbasedTrustAlg");
View Full Code Here

Examples of cu.repsystestbed.graphs.ReputationGraph.notifyObservers()

    trustAlg.setRatio(0.7);
    trustAlg.setGraph2Listen(repGraph);
   
    repGraph.addObserver(trustAlg);
   
    repGraph.notifyObservers(null);
   
    TrustGraph trustGraph = (TrustGraph) trustAlg.getGraph2Output();
    //TODO display the trust graph.
   
View Full Code Here

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

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

    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

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

        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

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

    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

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

    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

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

      }

      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

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

  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
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.