}
}
public String addDataSource(DataConfiguration dc) {
DataSourceConfiguration dsConfig = new DataSourceConfiguration();
String dsID;
try {
dsConfig.setPublisherID(ps.getPublisherID());
dsConfig.setDsName(dc.getDataSourceName());
dsConfig.setDsTimeoutInterval((long) dc.getTimeoutInterval());
dsConfig.setSeriesCount(dc.getNumberOfSeries());
int axisCount = dc.getAxisDetails().size();
AxisInfo[] xsInfoList = new AxisInfo[axisCount];
for (int i = 0; i < axisCount; i++) {
xsInfoList[i] = new AxisInfo();
ArrayList<String> axisLabels = new ArrayList<String>();
xsInfoList[i].setDataSourceAxisName(dc.getAxisDetails().get(i).getAxisName());
axisLabels.add(new Integer((int) dc.getAxisDetails().get(i).getMinima()).toString());
axisLabels.add(new Integer((int) dc.getAxisDetails().get(i).getMaxima()).toString());
xsInfoList[i].setAxisLabels(axisLabels.toArray(new String[axisLabels.size()]));
xsInfoList[i].setDataSourceAxisType("Y");
}
dsConfig.setXsInfo(xsInfoList);
System.out.println(dsConfig);
dsID = regWS.registerDataSource(dsConfig);
System.out.println("Datasource ID = " + dsID);
return dsID;
} catch (IOException e) {