Hi,
I have this class:
public class Source extends Node {
protected DistributionSampler delay ;
protected DistributionSampler batchsize ;
/**
* @param name The name of the source node
* @param d The {@link DistributionSampler} used to generate the
* inter-arrival times
*/
public Source( String name, DistributionSampler d ) {
super( name ) ;
delay = d ;
batchsize = new Deterministic( 1 ) ;
Sim.schedule( new Arrival( Sim.now() + delay.next() ) ) ;
}
/**
* @param name The name of the source node
* @param d The {@link DistributionSampler} used to generate the
* inter-arrival times
* @param b The {@link DistributionSampler} used to generate the
batch sizes
*/
public Source( String name, DistributionSampler d, DistributionSampler b ) {
super( name ) ;
delay = d ;
batchsize = b ;
Sim.schedule( new Arrival( Sim.now() + delay.next() ) ) ;
}
....
}
DistributionSampler is an AbstractClass.
At the time of conversion from XML to Java Object, I will know which concrete implementation of my abstract class to use (via the bean name).
However, I'm not entirely sure how to write the mapping file to tell castor how to do the translation.
Any help would be much appreciated.