本文整理汇总了Java中org.cytoscape.service.util.CyServiceRegistrar.getService方法的典型用法代码示例。如果您正苦于以下问题:Java CyServiceRegistrar.getService方法的具体用法?Java CyServiceRegistrar.getService怎么用?Java CyServiceRegistrar.getService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cytoscape.service.util.CyServiceRegistrar
的用法示例。
在下文中一共展示了CyServiceRegistrar.getService方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MapColumnTask
import org.cytoscape.service.util.CyServiceRegistrar; //导入方法依赖的package包/类
public MapColumnTask(CyServiceRegistrar registrar) {
this.applicationManager = registrar.getService(CyApplicationManager.class);
this.mappingManager = registrar.getService(DataSeriesMappingManager.class);
DataSeriesManager dataSeriesManager = registrar.getService(DataSeriesManager.class);
CyNetworkManager networkManager = registrar.getService(CyNetworkManager.class);
targetClass = new ListSingleSelection<>(new TargetClassInfo("Nodes", CyNode.class), new TargetClassInfo("Edges", CyEdge.class));
dataSeries = new ListSingleSelection<>(dataSeriesManager.getAllDataSeries());
existingColumnForMapping = new ListSingleSelection<>();
mapRowNamesWithColumn = new ListSingleSelection<>();
targetNetwork = new ListSingleSelection<>(networkManager.getNetworkSet().stream().toArray(CyNetwork[]::new));
if(applicationManager.getCurrentNetwork() != null)
{
targetNetwork.setSelectedValue(applicationManager.getCurrentNetwork());
}
updateExistingColumnForMapping(CyNode.class);
updateMapRowNamesWithColumn(CyNode.class);
}
示例2: AbstractImportTask
import org.cytoscape.service.util.CyServiceRegistrar; //导入方法依赖的package包/类
public AbstractImportTask(CyServiceRegistrar registrar) {
super();
this.registrar = registrar;
this.dataSeriesManager = registrar.getService(DataSeriesManager.class);
DataSeriesImportManager importManager = registrar.getService(DataSeriesImportManager.class);
this.provider = new ListSingleSelection<>(importManager.getAllImportProviders().stream()
.map(x -> new ProviderDisplay(x))
.collect(Collectors.toList()));
Optional<ProviderDisplay> timeSeriesDisplay = provider.getPossibleValues().stream()
.filter(x ->
x.getProvider().getImportedClass() != null && TimeSeries.class.isAssignableFrom(x.getProvider().getImportedClass()))
.findAny();
if(timeSeriesDisplay.isPresent())
{
provider.setSelectedValue(timeSeriesDisplay.get());
}
}
示例3: SmoothDataSeriesTask
import org.cytoscape.service.util.CyServiceRegistrar; //导入方法依赖的package包/类
public SmoothDataSeriesTask(CyServiceRegistrar registrar) {
this.dataSeriesManager = registrar.getService(DataSeriesManager.class);
this.smoothingService = registrar.getService(SmoothingService.class);
this.registrar = registrar;
timeSeries = new ListSingleSelection<>(dataSeriesManager.getDataSeriesByType(TimeSeries.class));
outputParameters = new SmoothingOutputParameters();
}
示例4: SmoothDataSeriesTaskFactory
import org.cytoscape.service.util.CyServiceRegistrar; //导入方法依赖的package包/类
public SmoothDataSeriesTaskFactory(CyServiceRegistrar registrar) {
super();
this.registrar = registrar;
dataSeriesManager = registrar.getService(DataSeriesManager.class);
}
示例5: start
import org.cytoscape.service.util.CyServiceRegistrar; //导入方法依赖的package包/类
@Override
public void start(BundleContext bc) throws Exception {
CyApplicationManager cyApplicationManager = getService(bc,CyApplicationManager.class);
CyServiceRegistrar serviceRegistrar = getService(bc, CyServiceRegistrar.class);
DataSeriesMappingManagerImpl mappingManager = new DataSeriesMappingManagerImpl(bc);
registerAllServices(bc, mappingManager, new Properties());
DataSeriesManagerImpl dataSeriesManager = new DataSeriesManagerImpl(bc, mappingManager);
registerAllServices(bc, dataSeriesManager, new Properties());
DataSeriesStorageManager storageManager = new DataSeriesStorageManagerImpl(bc, serviceRegistrar.getService(CyNetworkManager.class), dataSeriesManager, mappingManager);
registerAllServices(bc, storageManager, new Properties());
registerService(bc, new TimeSeriesStorageProviderImpl(), DataSeriesStorageProvider.class, new Properties());
registerService(bc, new NamedDoubleDataSeriesStorageProviderImpl(), DataSeriesStorageProvider.class, new Properties());
SmoothingService smoothingService = new SmoothingServiceImpl();
registerService(bc, smoothingService, SmoothingService.class, new Properties());
registerService(bc, new TabularFileImportParametersGUIHandlerFactory(), GUITunableHandlerFactory.class, new Properties());
registerService(bc, new SoftFileImportParametersGUIHandlerFactory(), GUITunableHandlerFactory.class, new Properties());
registerService(bc, new TimeSeriesImportProviderImpl(), DataSeriesImportProvider.class, new Properties());
registerService(bc, new NamedDoubleDataSeriesImportProviderImpl(), DataSeriesImportProvider.class, new Properties());
registerService(bc, new DataSeriesFactoryImpl(), DataSeriesFactory.class, new Properties());
registerService(bc, new MappingManipulationServiceImpl(serviceRegistrar), MappingManipulationService.class, new Properties());
DataSeriesImportManager importManager = new DataSeriesImportManagerImpl(bc);
registerService(bc, importManager, DataSeriesImportManager.class, new Properties());
ImportDataSeriesTaskFactory importTaskFactory = new ImportDataSeriesTaskFactory(serviceRegistrar);
registerMenuItem(bc, "File.Import.Data Series", "From tabular file (.csv,.tsv, etc.) ...", importTaskFactory);
ImportSoftFileTaskFactory importSoftTaskFactory = new ImportSoftFileTaskFactory(serviceRegistrar);
registerMenuItem(bc, "File.Import.Data Series", "From SOFT file...", importSoftTaskFactory);
registerMenuItem(bc, "File.Export", "Data Series...", new ExportDataSeriesTaskFactory(dataSeriesManager, storageManager));
registerMenuItem(bc, "Remove Data Series", new RemoveDataSeriesTaskFactory(dataSeriesManager));
MapColumnTaskFactory mapColumnTaskFactory = new MapColumnTaskFactory(serviceRegistrar);
//registerMenuItem(bc, "Map Column to Series", mapColumnTaskFactory);
//registerMenuItem(bc, "Remove Column Mapping", new RemoveColumnMappingTaskFactory(mappingManager));
registerMenuItem(bc, "Manage Column Mappings", new ManageMappingsTaskFactory(serviceRegistrar));
registerMenuItem(bc, DEFAULT_MENU + ".Advanced smoothing", "Linear kernel", new SmoothDataSeriesTaskFactory(serviceRegistrar));
registerMenuItem(bc, "Exponentiate Data Series", new ExponentiateDataSeriesTaskFactory(dataSeriesManager));
SmoothInteractiveShowUITaskFactory smoothInteractiveTaskFactory = new SmoothInteractiveShowUITaskFactory(serviceRegistrar);
registerMenuItem(bc, "Interactive smoothing", smoothInteractiveTaskFactory);
DataSeriesPanel panel = new DataSeriesPanel(serviceRegistrar);
registerService(bc, panel, CytoPanelComponent.class, new Properties());
registerService(bc, panel, DataSeriesListener.class, new Properties());
DataSeriesVisualPanel visualPanel = new DataSeriesVisualPanel(cyApplicationManager, dataSeriesManager, mappingManager);
registerService(bc, visualPanel, CytoPanelComponent.class, new Properties());
registerService(bc, visualPanel, RowsSetListener.class, new Properties());
registerService(bc, visualPanel, DataSeriesListener.class, new Properties());
registerService(bc, visualPanel, DataSeriesMappingListener.class, new Properties());
registerService(bc, new DataSeriesPublicTasksImpl(importTaskFactory, importSoftTaskFactory, mapColumnTaskFactory, smoothInteractiveTaskFactory), DataSeriesPublicTasks.class, new Properties());
}