Examples of Workspace


Examples of org.gephi.project.api.Workspace

        return layoutBuilder;
    }

    public void setGraphModel(GraphModel graphModel) {
        this.graphModel = graphModel;
        Workspace workspace = graphModel.getWorkspace();
        DynamicController dynamicController = Lookup.getDefault().lookup(DynamicController.class);
        if (dynamicController != null && workspace != null) {
            dynamicModel = dynamicController.getModel(workspace);
        }
    }
View Full Code Here

Examples of org.gephi.project.api.Workspace

                uiModel = null;
                refreshModel();
            }
        });
        if (pc.getCurrentWorkspace() != null) {
            Workspace workspace = pc.getCurrentWorkspace();
            filterModel = workspace.getLookup().lookup(FilterModel.class);
            uiModel = workspace.getLookup().lookup(FilterUIModel.class);
            if (uiModel == null) {
                uiModel = new FilterUIModel();
                workspace.add(uiModel);
            }
        }
        refreshModel();
    }
View Full Code Here

Examples of org.gephi.project.api.Workspace

    @Before
    public void setUp() {
        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        pc.newProject();
        Workspace workspace = pc.getCurrentWorkspace();
        Lookup.getDefault().lookup(AttributeController.class).getModel();

        //Graph 1 - Multilevel sample without edges
        DhnsGraphController controller1 = new DhnsGraphController();
        dhns1 = new Dhns(controller1, workspace);
        graph1 = new HierarchicalDirectedGraphImpl(dhns1, dhns1.getGraphStructure().getMainView());
        GraphFactoryImpl factory1 = dhns1.factory();

        AbstractNode nodeA = factory1.newNode();
        AbstractNode nodeB = factory1.newNode();
        AbstractNode nodeC = factory1.newNode();
        AbstractNode nodeD = factory1.newNode();
        AbstractNode nodeE = factory1.newNode();
        graph1.addNode(nodeA);
        graph1.addNode(nodeB);
        graph1.addNode(nodeC, nodeA);
        graph1.addNode(nodeE, nodeB);
        graph1.addNode(nodeD, nodeA);
        graph1.addNode(nodeD, nodeB);

        //Graph2 - Directed sample with edges
        Workspace workspace2 = pc.newWorkspace(pc.getCurrentProject());
        pc.openWorkspace(workspace2);
        Lookup.getDefault().lookup(AttributeController.class).getModel();
        nodeMap2 = new HashMap<String, Node>();
        DhnsGraphController controller2 = new DhnsGraphController();
        dhns2 = new Dhns(controller2, workspace2);
View Full Code Here

Examples of org.gephi.project.api.Workspace

            DHNSSerializer dHNSSerializer = new DHNSSerializer();
            StringWriter stringWriter = new StringWriter();
            dHNSSerializer.writeDhns(createWriter(stringWriter), dhns2);
            String s1 = stringWriter.toString();
            ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
            Workspace workspace3 = pc.newWorkspace(pc.getCurrentProject());
            pc.openWorkspace(workspace3);
            Lookup.getDefault().lookup(AttributeController.class).getModel();
            Dhns d2 = new Dhns(new DhnsGraphController(), workspace3);
            StringReader stringReader = new StringReader(s1);
            dHNSSerializer.readDhns(createReader(stringReader), d2);
View Full Code Here

Examples of org.gephi.project.api.Workspace

            }
        }
    }

    public AttributeModel getModel() {
        Workspace workspace = projectController.getCurrentWorkspace();
        if (workspace != null) {
            AttributeModel model = workspace.getLookup().lookup(AttributeModel.class);
            if (model != null) {
                return model;
            }
            model = new IndexedAttributeModel();
            workspace.add(model);
            return model;
        }
        return null;
    }
View Full Code Here

Examples of org.globus.workspace.client_core.repr.Workspace

        if (this.isGroupRequest) {
            throw new IllegalStateException(
                    "group requests should have been rejected already");
        }

        final Workspace workspace = new Workspace();

        workspace.setEpr(this.epr);
        workspace.setCurrentState(new State());

        this.workspaces = new Workspace[1];
        this.workspaces[0] = workspace;
    }
View Full Code Here

Examples of org.hibernate.search.backend.Workspace

    this.queue = queue;
    this.searchFactoryImplementor = searchFactoryImplementor;
  }

  public void run() {
    Workspace workspace;
    LuceneWorker worker;
    workspace = new Workspace( searchFactoryImplementor );
    worker = new LuceneWorker( workspace );
    try {
      List<LuceneWorker.WorkWithPayload> queueWithFlatDPs = new ArrayList<LuceneWorker.WorkWithPayload>( queue.size()*2 );
      for ( LuceneWork work : queue ) {
        DocumentBuilder documentBuilder = searchFactoryImplementor.getDocumentBuilders().get( work.getEntityClass() );
        IndexShardingStrategy shardingStrategy = documentBuilder.getDirectoryProviderSelectionStrategy();

        if ( PurgeAllLuceneWork.class.isAssignableFrom( work.getClass() ) ) {
          /***********hibernate search code**********
          DirectoryProvider[] providers = shardingStrategy.getDirectoryProvidersForDeletion(
              work.getEntityClass(),
              work.getId(),
              work.getIdInString()
          );
           *****************************************/
         
          /****************changed by Jerry*************/
          DirectoryProvider[] providers = shardingStrategy.getDirectoryProvidersForDeletion(
              work.getEntityClass(),
              work.getId(),
              work.getIdInString(),
              work.getDocument()
          );
          /*****************************************/
          for (DirectoryProvider provider : providers) {
            queueWithFlatDPs.add( new LuceneWorker.WorkWithPayload( work, provider ) );
          }
        }
        else if ( AddLuceneWork.class.isAssignableFrom( work.getClass() ) ) {
          DirectoryProvider provider = shardingStrategy.getDirectoryProviderForAddition(
              work.getEntityClass(),
              work.getId(),
              work.getIdInString(),
              work.getDocument()
          );
          queueWithFlatDPs.add( new LuceneWorker.WorkWithPayload(work, provider) );
        }
        else if ( DeleteLuceneWork.class.isAssignableFrom( work.getClass() ) ) {
          /***********hibernate search code**********
          DirectoryProvider[] providers = shardingStrategy.getDirectoryProvidersForDeletion(
              work.getEntityClass(),
              work.getId(),
              work.getIdInString()
          );
           *****************************************/
         
          /****************changed by Jerry*************/
          DirectoryProvider[] providers = shardingStrategy.getDirectoryProvidersForDeletion(
              work.getEntityClass(),
              work.getId(),
              work.getIdInString(),
              work.getDocument()
          );
          /*****************************************/
          for (DirectoryProvider provider : providers) {
            queueWithFlatDPs.add( new LuceneWorker.WorkWithPayload(work, provider) );
          }
        }
        else if ( OptimizeLuceneWork.class.isAssignableFrom( work.getClass() ) ) {
          DirectoryProvider[] providers = shardingStrategy.getDirectoryProvidersForAllShards();
          for (DirectoryProvider provider : providers) {
            queueWithFlatDPs.add( new LuceneWorker.WorkWithPayload(work, provider) );
          }
        }
        else {
          throw new AssertionFailure( "Unknown work type: " + work.getClass() );
        }
      }
      deadlockFreeQueue(queueWithFlatDPs, searchFactoryImplementor);
      checkForBatchIndexing(workspace);   
      for ( LuceneWorker.WorkWithPayload luceneWork : queueWithFlatDPs ) {
        worker.performWork( luceneWork );
      }
    }
    finally {
      workspace.clean();
      queue.clear();
    }
  }
View Full Code Here

Examples of org.jboss.bpm.console.client.Workspace

        {
          public void onTreeItemSelected(TreeItem treeItem)
          {
            if("Processes".equals(treeItem.getText()))
            {
              Workspace workspace = appContext.getWorkpace();
              workspace.showEditor(ReportEditor.ID);
            }
          }

          public void onTreeItemStateChanged(TreeItem treeItem)
          {
View Full Code Here

Examples of org.jboss.dashboard.workspace.Workspace

            StringBuffer urlprefix = new StringBuffer("http://" + request.getServerName());
            if (request.getServerPort() != 80)
                urlprefix.append(":").append(request.getServerPort());
            urlprefix.append(request.getContextPath());
            urlprefix.append("/workspace/&lt;lang&gt;/");
            Workspace currentWorkspace = getSectionPropertiesHandler().getWorkspace();
            String friendlyUrl = currentWorkspace.getFriendlyUrl();
            friendlyUrl = StringUtils.defaultIfEmpty(friendlyUrl, currentWorkspace.getId());
            urlprefix.append(friendlyUrl).append("/");

            setAttribute("urlPreffix", urlprefix.toString());
            setAttribute("value", getSectionPropertiesHandler().getUrl());
            setAttribute("error", getSectionPropertiesHandler().hasError("url"));
View Full Code Here

Examples of org.jboss.dna.graph.Workspace

    @Test
    public void shouldReturnListOfWorkspacesMatchingRepositoryURLs() throws Exception {
        // The the actual names of the workspaces ...
        Set<String> workspaceNames = new HashSet<String>();
        for (String workspaceName : graph.getWorkspaces()) {
            Workspace workspace = graph.useWorkspace(workspaceName);
            workspaceNames.add(workspace.getName());
        }

        assertThat(workspaceNames.remove(repositoryRootURL + "trunk"), is(true));
        assertThat(workspaceNames.remove(repositoryRootURL + "tags"), is(true));
        assertThat(workspaceNames.isEmpty(), is(true));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.