be.ac.ulg.montefiore.run.totem.topgen.util
Class Converter

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.topgen.util.Converter

public class Converter
extends java.lang.Object

This class contains some methods to import topologies in different formats into our schema-derived data structures (see domain package).

Creation date: 2004

Author:
Jean Lepropre (lepropre@run.montefiore.ulg.ac.be)

Field Summary
static int METRIC_HOP_COUNT
          The metric to use is the hop count.
static int METRIC_INV_BW
          The metric to use is the inverse of the bandwith.
 
Constructor Summary
Converter()
           
 
Method Summary
static Domain briteTopologyToDomain(Topology.Topology topology, boolean linksDirected, int metric)
          This method parses a Topology object that is in BRITE format and returns a Domain object that contains the same information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METRIC_HOP_COUNT

public static final int METRIC_HOP_COUNT
The metric to use is the hop count.

See Also:
Constant Field Values

METRIC_INV_BW

public static final int METRIC_INV_BW
The metric to use is the inverse of the bandwith.

See Also:
Constant Field Values
Constructor Detail

Converter

public Converter()
Method Detail

briteTopologyToDomain

public static Domain briteTopologyToDomain(Topology.Topology topology,
                                           boolean linksDirected,
                                           int metric)
                                    throws NodeAlreadyExistException,
                                           LinkAlreadyExistException,
                                           NodeNotFoundException
This method parses a Topology object that is in BRITE format and returns a Domain object that contains the same information.

Parameters:
topology - The Topology object to be converted.
linksDirected - True if you want that all the links of the topology are directed. If a link is undirected, we create a new link so that there are two links with one in each direction.
metric - Indicates which metric to use. See METRIC_* constants in this class for more information.
Returns:
A Domain object.
Throws:
JAXBException - If an error occurred during the conversion.
java.lang.IllegalArgumentException - If metric is not valid.
NodeAlreadyExistException
LinkAlreadyExistException
NodeNotFoundException


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.