/*
Copyright 2012 Christian Prause and Fraunhofer FIT
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package net.sf.collabreview.experimental;
import net.sf.collabreview.agents.AgentManager;
import net.sf.collabreview.core.*;
import net.sf.collabreview.core.configuration.AutoConfigurator;
import net.sf.collabreview.reputation.ReputationMetric;
import net.sf.collabreview.reputation.ReputationMetricManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class Eda {
private static final Log logger = LogFactory.getLog(Eda.class);
public static void main(String[] args) {
CollabReview collabReview = AutoConfigurator.newConfiguredApplication();
AgentManager agentManager = collabReview.getAgentManager();
try {
Thread.sleep(15000);
} catch (InterruptedException e) {
}
ReputationMetricManager rmm = collabReview.getReputationMetricManager();
ReputationMetric qualities = rmm.findReputationMetric("quality");
for (String name : qualities.listContributors()) {
logger.info(qualities.getAuthorRank(name) + ": " + name + " " + qualities.getAuthorScore(name));
}
logger.info("Sending terminate signal to agents...");
Shutdown.terminate();
}
}