当前位置: 首页>>代码示例>>Java>>正文


Java CyServiceRegistrar.getService方法代码示例

本文整理汇总了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);
	
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:23,代码来源:MapColumnTask.java

示例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());
	}
	
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:23,代码来源:AbstractImportTask.java

示例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();
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:8,代码来源:SmoothDataSeriesTask.java

示例4: SmoothDataSeriesTaskFactory

import org.cytoscape.service.util.CyServiceRegistrar; //导入方法依赖的package包/类
public SmoothDataSeriesTaskFactory(CyServiceRegistrar registrar) {
	super();
	this.registrar = registrar;
	dataSeriesManager = registrar.getService(DataSeriesManager.class);
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:6,代码来源:SmoothDataSeriesTaskFactory.java

示例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());
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:72,代码来源:CyActivator.java


注:本文中的org.cytoscape.service.util.CyServiceRegistrar.getService方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。