Search in sources :

Example 11 with CyServiceRegistrar

use of org.cytoscape.service.util.CyServiceRegistrar in project cytoscape-impl by cytoscape.

the class MacCyActivator method start.

@Override
public void start(BundleContext context) throws Exception {
    final CyServiceRegistrar serviceRegistrar = getService(context, CyServiceRegistrar.class);
    final CyShutdown shutdown = getService(context, CyShutdown.class);
    final TaskFactory aboutTaskFactory = new HelpAboutTaskFactory(serviceRegistrar);
    final DialogTaskManager taskManager = getService(context, DialogTaskManager.class);
    final CyShutdownEvent[] lastShutdownEvent = new CyShutdownEvent[1];
    CyShutdownListener listener = (CyShutdownEvent e) -> {
        lastShutdownEvent[0] = e;
    };
    registerService(context, listener, CyShutdownListener.class, new Properties());
    Application application = Application.getApplication();
    application.setQuitHandler((QuitEvent event, QuitResponse response) -> {
        shutdown.exit(0);
        if (lastShutdownEvent[0] != null && !lastShutdownEvent[0].actuallyShutdown()) {
            response.cancelQuit();
        }
    });
    application.setAboutHandler((AboutEvent event) -> {
        taskManager.execute(aboutTaskFactory.createTaskIterator());
    });
}
Also used : AboutEvent(com.apple.eawt.AppEvent.AboutEvent) DialogTaskManager(org.cytoscape.work.swing.DialogTaskManager) Properties(java.util.Properties) CyServiceRegistrar(org.cytoscape.service.util.CyServiceRegistrar) CyShutdownListener(org.cytoscape.application.events.CyShutdownListener) HelpAboutTaskFactory(org.cytoscape.internal.view.help.HelpAboutTaskFactory) HelpAboutTaskFactory(org.cytoscape.internal.view.help.HelpAboutTaskFactory) TaskFactory(org.cytoscape.work.TaskFactory) Application(com.apple.eawt.Application) CyShutdownEvent(org.cytoscape.application.events.CyShutdownEvent) QuitResponse(com.apple.eawt.QuitResponse) CyShutdown(org.cytoscape.application.CyShutdown) QuitEvent(com.apple.eawt.AppEvent.QuitEvent)

Example 12 with CyServiceRegistrar

use of org.cytoscape.service.util.CyServiceRegistrar in project cytoscape-impl by cytoscape.

the class CySubNetworkCyTableManagerTest method setUp.

@Before
public void setUp() {
    final CyEventHelper eh = new DummyCyEventHelper();
    final CyNetworkNaming namingUtil = mock(CyNetworkNaming.class);
    final CyServiceRegistrar serviceRegistrar = mock(CyServiceRegistrar.class);
    final EquationCompiler compiler = new EquationCompilerImpl(new EquationParserImpl(serviceRegistrar));
    final Interpreter interpreter = new InterpreterImpl();
    when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eh);
    when(serviceRegistrar.getService(CyNetworkNaming.class)).thenReturn(namingUtil);
    when(serviceRegistrar.getService(EquationCompiler.class)).thenReturn(compiler);
    when(serviceRegistrar.getService(Interpreter.class)).thenReturn(interpreter);
    networkTableMgr = new CyNetworkTableManagerImpl();
    networkManager = new CyNetworkManagerImpl(serviceRegistrar);
    mgr = new CyTableManagerImpl(networkTableMgr, networkManager, serviceRegistrar);
    CyTableFactoryImpl tableFactory = new CyTableFactoryImpl(eh, serviceRegistrar);
    CyRootNetworkImpl baseNet = new CyRootNetworkImpl(eh, (CyTableManagerImpl) mgr, networkTableMgr, tableFactory, serviceRegistrar, true, SavePolicy.DO_NOT_SAVE);
    // This is a different subnetwork and not "baseNetwork" in ArrayGraph.
    goodNetwork = baseNet.addSubNetwork();
    globalTable = tableFactory.createTable("test table", CyIdentifiable.SUID, Long.class, true, true);
    networkManager.addNetwork(goodNetwork);
    assertNotNull(globalTable);
    assertNotNull(goodNetwork);
    assertEquals(1, networkManager.getNetworkSet().size());
}
Also used : DummyCyEventHelper(org.cytoscape.event.DummyCyEventHelper) CyEventHelper(org.cytoscape.event.CyEventHelper) EquationCompilerImpl(org.cytoscape.equations.internal.EquationCompilerImpl) Interpreter(org.cytoscape.equations.Interpreter) CyNetworkManagerImpl(org.cytoscape.model.internal.CyNetworkManagerImpl) InterpreterImpl(org.cytoscape.equations.internal.interpreter.InterpreterImpl) CyTableManagerImpl(org.cytoscape.model.internal.CyTableManagerImpl) CyServiceRegistrar(org.cytoscape.service.util.CyServiceRegistrar) EquationParserImpl(org.cytoscape.equations.internal.EquationParserImpl) CyTableFactoryImpl(org.cytoscape.model.internal.CyTableFactoryImpl) CyNetworkTableManagerImpl(org.cytoscape.model.internal.CyNetworkTableManagerImpl) CyRootNetworkImpl(org.cytoscape.model.internal.CyRootNetworkImpl) CyNetworkNaming(org.cytoscape.session.CyNetworkNaming) DummyCyEventHelper(org.cytoscape.event.DummyCyEventHelper) EquationCompiler(org.cytoscape.equations.EquationCompiler) Before(org.junit.Before)

Example 13 with CyServiceRegistrar

use of org.cytoscape.service.util.CyServiceRegistrar in project cytoscape-impl by cytoscape.

the class CyActivator method start.

@Override
public void start(BundleContext bc) {
    final CyServiceRegistrar serviceRegistrar = getService(bc, CyServiceRegistrar.class);
    CommandTunableInterceptorImpl interceptor = new CommandTunableInterceptorImpl();
    StringTunableHandlerFactory<FileTunableHandler> fileTHF = new SimpleStringTunableHandlerFactory<>(FileTunableHandler.class, File.class);
    StringTunableHandlerFactory<IntTunableHandler> intTHF = new SimpleStringTunableHandlerFactory<>(IntTunableHandler.class, Integer.class, int.class);
    StringTunableHandlerFactory<DoubleTunableHandler> doubleTHF = new SimpleStringTunableHandlerFactory<>(DoubleTunableHandler.class, Double.class, double.class);
    StringTunableHandlerFactory<FloatTunableHandler> floatTHF = new SimpleStringTunableHandlerFactory<>(FloatTunableHandler.class, Float.class, float.class);
    StringTunableHandlerFactory<LongTunableHandler> longTHF = new SimpleStringTunableHandlerFactory<>(LongTunableHandler.class, Long.class, long.class);
    StringTunableHandlerFactory<BooleanTunableHandler> booleanTHF = new SimpleStringTunableHandlerFactory<>(BooleanTunableHandler.class, Boolean.class, boolean.class);
    StringTunableHandlerFactory<StringTunableHandlerImpl> stringTHF = new SimpleStringTunableHandlerFactory<>(StringTunableHandlerImpl.class, String.class);
    StringTunableHandlerFactory<BoundedIntTunableHandler> boundedIntTHF = new SimpleStringTunableHandlerFactory<>(BoundedIntTunableHandler.class, BoundedInteger.class);
    StringTunableHandlerFactory<BoundedDoubleTunableHandler> boundedDoubleTHF = new SimpleStringTunableHandlerFactory<>(BoundedDoubleTunableHandler.class, BoundedDouble.class);
    StringTunableHandlerFactory<BoundedFloatTunableHandler> boundedFloatTHF = new SimpleStringTunableHandlerFactory<>(BoundedFloatTunableHandler.class, BoundedFloat.class);
    StringTunableHandlerFactory<BoundedLongTunableHandler> boundedLongTHF = new SimpleStringTunableHandlerFactory<>(BoundedLongTunableHandler.class, BoundedLong.class);
    StringTunableHandlerFactory<URLTunableHandler> urlTHF = new SimpleStringTunableHandlerFactory<>(URLTunableHandler.class, URL.class);
    StringTunableHandlerFactory<ListSingleTunableHandler> listSingleTHF = new SimpleStringTunableHandlerFactory<>(ListSingleTunableHandler.class, ListSingleSelection.class);
    StringTunableHandlerFactory<ListMultipleTunableHandler> listMultipleTHF = new SimpleStringTunableHandlerFactory<>(ListMultipleTunableHandler.class, ListMultipleSelection.class);
    registerService(bc, fileTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, intTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, doubleTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, floatTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, longTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, booleanTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, stringTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, boundedIntTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, boundedDoubleTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, boundedFloatTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, boundedLongTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, urlTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, listSingleTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, listMultipleTHF, StringTunableHandlerFactory.class, new Properties());
    StringToModel stm = new StringToModelImpl(serviceRegistrar);
    registerService(bc, stm, StringToModel.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<CyNetworkTunableHandler> networkTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, CyNetworkTunableHandler.class, CyNetwork.class);
    registerService(bc, networkTHF, StringTunableHandlerFactory.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<CyNetworkViewTunableHandler> networkViewTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, CyNetworkViewTunableHandler.class, CyNetworkView.class);
    registerService(bc, networkViewTHF, StringTunableHandlerFactory.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<CyTableTunableHandler> tableTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, CyTableTunableHandler.class, CyTable.class);
    registerService(bc, tableTHF, StringTunableHandlerFactory.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<NodeListTunableHandler> nodeListTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, NodeListTunableHandler.class, NodeList.class);
    registerService(bc, nodeListTHF, StringTunableHandlerFactory.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<EdgeListTunableHandler> edgeListTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, EdgeListTunableHandler.class, EdgeList.class);
    registerService(bc, edgeListTHF, StringTunableHandlerFactory.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<RowListTunableHandler> rowListTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, RowListTunableHandler.class, RowList.class);
    registerService(bc, rowListTHF, StringTunableHandlerFactory.class, new Properties());
    BasicArgHandlerFactory argHandlerFactory = new BasicArgHandlerFactory();
    registerService(bc, argHandlerFactory, ArgHandlerFactory.class, new Properties());
    ArgRecorder argRec = new ArgRecorder();
    registerServiceListener(bc, argRec::addTunableHandlerFactory, argRec::removeTunableHandlerFactory, ArgHandlerFactory.class);
    AvailableCommandsImpl availableCommandsImpl = new AvailableCommandsImpl(argRec, serviceRegistrar);
    registerService(bc, availableCommandsImpl, AvailableCommands.class, new Properties());
    registerServiceListener(bc, availableCommandsImpl::addTaskFactory, availableCommandsImpl::removeTaskFactory, TaskFactory.class);
    registerServiceListener(bc, availableCommandsImpl::addNetworkTaskFactory, availableCommandsImpl::removeNetworkTaskFactory, NetworkTaskFactory.class);
    registerServiceListener(bc, availableCommandsImpl::addNetworkViewTaskFactory, availableCommandsImpl::removeNetworkViewTaskFactory, NetworkViewTaskFactory.class);
    registerServiceListener(bc, availableCommandsImpl::addNetworkViewCollectionTaskFactory, availableCommandsImpl::removeNetworkViewCollectionTaskFactory, NetworkViewCollectionTaskFactory.class);
    registerServiceListener(bc, availableCommandsImpl::addTableTaskFactory, availableCommandsImpl::removeTableTaskFactory, TableTaskFactory.class);
    CommandExecutorImpl commandExecutor = new CommandExecutorImpl(interceptor, availableCommandsImpl, serviceRegistrar);
    CommandExecutorTaskFactoryImpl commandExecutorTaskFactory = new CommandExecutorTaskFactoryImpl(commandExecutor, serviceRegistrar);
    Properties commandExecutorTaskFactoryProps = new Properties();
    commandExecutorTaskFactoryProps.setProperty(ID, "commandExecutorTaskFactory");
    registerService(bc, commandExecutorTaskFactory, TaskFactory.class, commandExecutorTaskFactoryProps);
    registerService(bc, commandExecutorTaskFactory, CommandExecutorTaskFactory.class, commandExecutorTaskFactoryProps);
    registerServiceListener(bc, commandExecutor::addTaskFactory, commandExecutor::removeTaskFactory, TaskFactory.class);
    registerServiceListener(bc, commandExecutor::addNetworkTaskFactory, commandExecutor::removeNetworkTaskFactory, NetworkTaskFactory.class);
    registerServiceListener(bc, commandExecutor::addNetworkViewTaskFactory, commandExecutor::removeNetworkViewTaskFactory, NetworkViewTaskFactory.class);
    registerServiceListener(bc, commandExecutor::addNetworkViewCollectionTaskFactory, commandExecutor::removeNetworkViewCollectionTaskFactory, NetworkViewCollectionTaskFactory.class);
    registerServiceListener(bc, commandExecutor::addTableTaskFactory, commandExecutor::removeTableTaskFactory, TableTaskFactory.class);
    registerServiceListener(bc, interceptor::addTunableHandlerFactory, interceptor::removeTunableHandlerFactory, StringTunableHandlerFactory.class);
    {
        Properties props = new Properties();
        props.setProperty(COMMAND, "sleep");
        props.setProperty(COMMAND_NAMESPACE, "command");
        props.setProperty(COMMAND_DESCRIPTION, "Stop command processing for a specified time");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "The **sleep** command will pause processing for a period of time as specified by *duration* seconds.");
        registerService(bc, new SleepCommandTaskFactory(), TaskFactory.class, props);
    }
    {
        Properties props = new Properties();
        props.setProperty(COMMAND, "echo");
        props.setProperty(COMMAND_NAMESPACE, "command");
        props.setProperty(COMMAND_DESCRIPTION, "Returns the value of the 'message' argument.");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Returns the value of the **message** argument.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "");
        registerService(bc, new EchoCommandTaskFactory(), TaskFactory.class, props);
    }
    {
        Properties props = new Properties();
        props.setProperty(COMMAND, "quit");
        props.setProperty(COMMAND_NAMESPACE, "command");
        props.setProperty(COMMAND_DESCRIPTION, "Exit Cytoscape");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "This command causes Cytoscape to exit. It is typically used at the end of a script file");
        registerService(bc, new QuitTaskFactory(serviceRegistrar), TaskFactory.class, props);
    }
    {
        Properties props = new Properties();
        props.setProperty(PREFERRED_MENU, "Tools");
        props.setProperty(TITLE, "Execute Command File...");
        props.setProperty(COMMAND, "run");
        props.setProperty(COMMAND_NAMESPACE, "command");
        props.setProperty(COMMAND_DESCRIPTION, "Run a series of commands from a file");
        props.setProperty(IN_MENU_BAR, "true");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "The **run** command will execute a command script from the " + "file pointed to by the ``file`` argument, which " + "should contain Cytoscape commands, one per line. " + "Arguments to the " + "script are provided by the *args* argument");
        registerService(bc, new RunCommandsTaskFactory(commandExecutorTaskFactory), TaskFactory.class, props);
    }
    // Get any command line arguments.  The "-S" and "-R" are ours
    AppsFinishedStartingListener scriptRunner = new AppsFinishedStartingListener() {

        public void handleEvent(AppsFinishedStartingEvent event) {
            @SuppressWarnings("unchecked") CyProperty<Properties> commandLineProps = getService(bc, CyProperty.class, "(cyPropertyName=commandline.props)");
            String scriptFile = commandLineProps.getProperties().getProperty("scriptFile");
            if (scriptFile != null) {
                TaskIterator tasks = commandExecutorTaskFactory.createTaskIterator(new File(scriptFile), null);
                SynchronousTaskManager<?> taskManager = serviceRegistrar.getService(SynchronousTaskManager.class);
                taskManager.execute(tasks);
            }
        }
    };
    registerService(bc, scriptRunner, AppsFinishedStartingListener.class, new Properties());
}
Also used : ListSingleTunableHandler(org.cytoscape.command.internal.tunables.ListSingleTunableHandler) BoundedIntTunableHandler(org.cytoscape.command.internal.tunables.BoundedIntTunableHandler) NodeListTunableHandler(org.cytoscape.command.internal.tunables.NodeListTunableHandler) CyTableTunableHandler(org.cytoscape.command.internal.tunables.CyTableTunableHandler) BasicArgHandlerFactory(org.cytoscape.command.internal.available.BasicArgHandlerFactory) BoundedLongTunableHandler(org.cytoscape.command.internal.tunables.BoundedLongTunableHandler) CyServiceRegistrar(org.cytoscape.service.util.CyServiceRegistrar) ArgRecorder(org.cytoscape.command.internal.available.ArgRecorder) BoundedDoubleTunableHandler(org.cytoscape.command.internal.tunables.BoundedDoubleTunableHandler) DoubleTunableHandler(org.cytoscape.command.internal.tunables.DoubleTunableHandler) CommandTunableInterceptorImpl(org.cytoscape.command.internal.tunables.CommandTunableInterceptorImpl) SimpleStringTunableHandlerFactory(org.cytoscape.command.internal.tunables.SimpleStringTunableHandlerFactory) IntTunableHandler(org.cytoscape.command.internal.tunables.IntTunableHandler) BoundedIntTunableHandler(org.cytoscape.command.internal.tunables.BoundedIntTunableHandler) BooleanTunableHandler(org.cytoscape.command.internal.tunables.BooleanTunableHandler) SleepCommandTaskFactory(org.cytoscape.command.internal.tasks.SleepCommandTaskFactory) StringToModel(org.cytoscape.command.StringToModel) ListMultipleTunableHandler(org.cytoscape.command.internal.tunables.ListMultipleTunableHandler) URLTunableHandler(org.cytoscape.command.internal.tunables.URLTunableHandler) QuitTaskFactory(org.cytoscape.command.internal.tasks.QuitTaskFactory) FileTunableHandler(org.cytoscape.command.internal.tunables.FileTunableHandler) RowListTunableHandler(org.cytoscape.command.internal.tunables.RowListTunableHandler) CyIdentifiableStringTunableHandlerFactory(org.cytoscape.command.internal.tunables.CyIdentifiableStringTunableHandlerFactory) File(java.io.File) BoundedFloatTunableHandler(org.cytoscape.command.internal.tunables.BoundedFloatTunableHandler) FloatTunableHandler(org.cytoscape.command.internal.tunables.FloatTunableHandler) ServiceProperties(org.cytoscape.work.ServiceProperties) Properties(java.util.Properties) CyNetworkTunableHandler(org.cytoscape.command.internal.tunables.CyNetworkTunableHandler) AppsFinishedStartingEvent(org.cytoscape.app.event.AppsFinishedStartingEvent) TaskIterator(org.cytoscape.work.TaskIterator) EdgeListTunableHandler(org.cytoscape.command.internal.tunables.EdgeListTunableHandler) BoundedDoubleTunableHandler(org.cytoscape.command.internal.tunables.BoundedDoubleTunableHandler) EchoCommandTaskFactory(org.cytoscape.command.internal.tasks.EchoCommandTaskFactory) BoundedFloatTunableHandler(org.cytoscape.command.internal.tunables.BoundedFloatTunableHandler) AppsFinishedStartingListener(org.cytoscape.app.event.AppsFinishedStartingListener) RunCommandsTaskFactory(org.cytoscape.command.internal.tasks.RunCommandsTaskFactory) StringTunableHandlerImpl(org.cytoscape.command.internal.tunables.StringTunableHandlerImpl) CyNetworkViewTunableHandler(org.cytoscape.command.internal.tunables.CyNetworkViewTunableHandler) BoundedLongTunableHandler(org.cytoscape.command.internal.tunables.BoundedLongTunableHandler) LongTunableHandler(org.cytoscape.command.internal.tunables.LongTunableHandler) NetworkViewCollectionTaskFactory(org.cytoscape.task.NetworkViewCollectionTaskFactory) EchoCommandTaskFactory(org.cytoscape.command.internal.tasks.EchoCommandTaskFactory) RunCommandsTaskFactory(org.cytoscape.command.internal.tasks.RunCommandsTaskFactory) SleepCommandTaskFactory(org.cytoscape.command.internal.tasks.SleepCommandTaskFactory) NetworkViewTaskFactory(org.cytoscape.task.NetworkViewTaskFactory) TaskFactory(org.cytoscape.work.TaskFactory) NetworkTaskFactory(org.cytoscape.task.NetworkTaskFactory) TableTaskFactory(org.cytoscape.task.TableTaskFactory) CommandExecutorTaskFactory(org.cytoscape.command.CommandExecutorTaskFactory) QuitTaskFactory(org.cytoscape.command.internal.tasks.QuitTaskFactory) AvailableCommandsImpl(org.cytoscape.command.internal.available.AvailableCommandsImpl)

Example 14 with CyServiceRegistrar

use of org.cytoscape.service.util.CyServiceRegistrar in project cytoscape-impl by cytoscape.

the class TestCyNetworkFactory method getPublicRootInstance.

public static CyRootNetwork getPublicRootInstance(DummyCyEventHelper deh, SavePolicy policy) {
    CyServiceRegistrar serviceRegistrar = mockCyServiceRegistrar(deh);
    final CyNetworkTableManagerImpl ntm = new CyNetworkTableManagerImpl();
    final CyTableManagerImpl tm = new CyTableManagerImpl(ntm, new CyNetworkManagerImpl(serviceRegistrar), serviceRegistrar);
    final CyTableFactoryImpl tableFactory = new CyTableFactoryImpl(deh, serviceRegistrar);
    return new CyRootNetworkImpl(deh, tm, ntm, tableFactory, serviceRegistrar, true, policy);
}
Also used : CyTableFactoryImpl(org.cytoscape.model.internal.CyTableFactoryImpl) CyNetworkManagerImpl(org.cytoscape.model.internal.CyNetworkManagerImpl) CyNetworkTableManagerImpl(org.cytoscape.model.internal.CyNetworkTableManagerImpl) CyRootNetworkImpl(org.cytoscape.model.internal.CyRootNetworkImpl) CyTableManagerImpl(org.cytoscape.model.internal.CyTableManagerImpl) CyServiceRegistrar(org.cytoscape.service.util.CyServiceRegistrar)

Example 15 with CyServiceRegistrar

use of org.cytoscape.service.util.CyServiceRegistrar in project cytoscape-impl by cytoscape.

the class CyActivator method start.

public void start(BundleContext bc) {
    CyServiceRegistrar cyServiceRegistrarRef = getService(bc, CyServiceRegistrar.class);
    BookmarkReader bookmarksReader = new BookmarkReader("bookmarks", "bookmarks.xml");
    BookmarksUtilImpl bookmarksUtil = new BookmarksUtilImpl(cyServiceRegistrarRef);
    Properties bookmarksReaderProps = new Properties();
    bookmarksReaderProps.setProperty("cyPropertyName", "bookmarks");
    registerService(bc, bookmarksReader, CyProperty.class, bookmarksReaderProps);
    Properties bookmarksUtilProps = new Properties();
    registerService(bc, bookmarksUtil, BookmarksUtil.class, bookmarksUtilProps);
    PropsReader cyApplicationCoreProperty = new PropsReader(SimpleCyProperty.CORE_PROPRERTY_NAME, "cytoscape3.props");
    Properties cyApplicationCorePropertyProps = new Properties();
    cyApplicationCorePropertyProps.setProperty("cyPropertyName", "cytoscape3.props");
    registerAllServices(bc, cyApplicationCoreProperty, cyApplicationCorePropertyProps);
}
Also used : BookmarkReader(org.cytoscape.property.internal.bookmark.BookmarkReader) BookmarksUtilImpl(org.cytoscape.property.internal.bookmark.BookmarksUtilImpl) Properties(java.util.Properties) CyServiceRegistrar(org.cytoscape.service.util.CyServiceRegistrar)

Aggregations

CyServiceRegistrar (org.cytoscape.service.util.CyServiceRegistrar)62 Properties (java.util.Properties)32 CyEventHelper (org.cytoscape.event.CyEventHelper)14 VisualMappingManager (org.cytoscape.view.vizmap.VisualMappingManager)13 CyApplicationManager (org.cytoscape.application.CyApplicationManager)12 UndoSupport (org.cytoscape.work.undo.UndoSupport)12 TaskIterator (org.cytoscape.work.TaskIterator)11 CyNetwork (org.cytoscape.model.CyNetwork)10 Task (org.cytoscape.work.Task)10 Before (org.junit.Before)10 Test (org.junit.Test)10 CyNetworkManager (org.cytoscape.model.CyNetworkManager)7 CyNetworkViewManager (org.cytoscape.view.model.CyNetworkViewManager)7 TaskFactory (org.cytoscape.work.TaskFactory)7 CyGroupManager (org.cytoscape.group.CyGroupManager)6 CyNetworkFactory (org.cytoscape.model.CyNetworkFactory)6 CyRootNetworkManager (org.cytoscape.model.subnetwork.CyRootNetworkManager)6 CyNetworkNaming (org.cytoscape.session.CyNetworkNaming)6 RenderingEngineManager (org.cytoscape.view.presentation.RenderingEngineManager)6 CyNetworkView (org.cytoscape.view.model.CyNetworkView)5