Examples of BaseNode


Examples of com.frovi.ss.Tree.BaseNode

  {
    ContentVO vo =null;
    try
    {
      vo = ContentControllerProxy.getController().getRootContentVO(repositoryId, userName);
      BaseNode rootNode =  new ContentNodeImpl();
      rootNode.setChildren(true);
      rootNode.setId(vo.getId());
      rootNode.setTitle(vo.getName());
      rootNode.setContainer(vo.getIsBranch().booleanValue())
      setRootNode(rootNode);
    }
    catch (ConstraintException e)
    {
    }
View Full Code Here

Examples of com.frovi.ss.Tree.BaseNode

    while(i.hasNext())
    {
      ContentVO vo = (ContentVO) i.next();
      if (vo.getIsBranch().booleanValue())
      {
        BaseNode node =  new ContentNodeImpl();
        node.setId(vo.getId());
        node.setContainer(true);
       
        node.setChildren((vo.getChildCount().intValue() > 0)); //
       
        node.setTitle(vo.getName());
       
        ret.add(node);
      }
    }
    i = l.iterator();
    while(i.hasNext())
    {
      ContentVO vo = (ContentVO) i.next();
      if (!vo.getIsBranch().booleanValue())
      {
        // Betrakta dessa som container nodes
       
        BaseNode node =  new ContentNodeImpl();
        node.setId( new Integer(- vo.getId().intValue()) );
        node.setContainer(true);
        node.setTitle(vo.getName());
        node.setChildren((vo.getChildCount().intValue() > 0));
        ret.add(node);       
      }
    }
   
    return ret;
View Full Code Here

Examples of com.frovi.ss.Tree.BaseNode

    try
    {
      if(repositoryId != null && repositoryId.intValue() > 0)
      {
        vo = ucc.getRootSiteNode(repositoryId, infoGluePrincipal);
        BaseNode rootNode =  new SiteNodeNodeImpl();
        rootNode.setChildren(true);
        rootNode.setId(vo.getId());
        rootNode.setTitle(vo.getName());
        rootNode.setContainer(vo.getIsBranch().booleanValue())
       
        setRootNode(rootNode);
      }
    }
    catch (ConstraintException e)
View Full Code Here

Examples of com.frovi.ss.Tree.BaseNode

        if(useAccessRightsOnStructureTreeString != null && useAccessRightsOnStructureTreeString.equalsIgnoreCase("true"))
          hasUserPageAccess = getHasUserPageAccess(this.infogluePrincipal, vo.getId());
       
        if(hasUserPageAccess)
        {
          BaseNode node =  new SiteNodeNodeImpl();
          node.setId(vo.getId());
          node.setTitle(vo.getName());
         
          Boolean isLanguageAvailable = SiteNodeController.getController().getIsLanguageAvailable(vo.getId(), this.sortLanguageId, db, this.infogluePrincipal);
          node.getParameters().put("isLanguageAvailable", "" + isLanguageAvailable);
         
          ContentVersionVO cvVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(vo.getMetaInfoContentId(), this.sortLanguageId, db);
          if(cvVO != null)
          {
            node.getParameters().put("isLocalized", "true");
            String navigationTitle = ContentVersionController.getContentVersionController().getAttributeValue(cvVO, "NavigationTitle", true);
            node.setLocalizedTitle(navigationTitle);
          }
          else
          {
            node.getParameters().put("isLocalized", "false");
            if(this.sortLanguageId != null && masterLanguageVO.getId().intValue() != this.sortLanguageId.intValue())
            {
              ContentVersionVO masterCVVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(vo.getMetaInfoContentId(), masterLanguageVO.getId(), db);
              if(masterCVVO != null)
              {
                String navigationTitle = ContentVersionController.getContentVersionController().getAttributeValue(masterCVVO, "NavigationTitle", true);
                node.setLocalizedTitle(navigationTitle);
              }
            }
          }
         
          if(vo.getIsHidden() != null)
            node.getParameters().put("isHidden", "" + vo.getIsHidden());

          if(vo.getStateId() != null)
          {
            if(vo.getStateId() != SiteNodeVersionVO.PUBLISHED_STATE)
            {
              Timer t = new Timer();
              Set<SiteNodeVersionVO> siteNodeVersionVOList = new HashSet<SiteNodeVersionVO>();
              Set<ContentVersionVO> contentVersionVOList = new HashSet<ContentVersionVO>();
             
              ProcessBean processBean = ProcessBean.createProcessBean(ViewListSiteNodeVersionAction.class.getName(), "" + infogluePrincipal.getName());
              SiteNodeVersionController.getController().getSiteNodeAndAffectedItemsRecursive(vo.getId(), SiteNodeVersionVO.WORKING_STATE, siteNodeVersionVOList, contentVersionVOList, false, false, infogluePrincipal, processBean, masterLanguageVO.getLocale(), -1);
              if(siteNodeVersionVOList.size() > 0 || contentVersionVOList.size() > 0)
                node.getParameters().put("stateId", "0");
              else
                node.getParameters().put("stateId", "" + vo.getStateId());
             
              RequestAnalyser.getRequestAnalyser().registerComponentStatistics("getSiteNodeAndAffectedItemsRecursive", t.getElapsedTime());
            }
            else
            {
              node.getParameters().put("stateId", "" + vo.getStateId());
            }
          }
         
          if(vo.getIsProtected() != null && vo.getIsProtected().intValue() == SiteNodeVersionVO.YES.intValue())
            node.getParameters().put("isProtected", "true");

          if (vo.getIsBranch().booleanValue())
          {
            node.setContainer(true);
            node.setChildren((vo.getChildCount().intValue() > 0)); //
            ret.add(node);
          }
          else
          {
            node.setContainer(false);
            cacheLeafs.add(node);       
          }
        } 
               
        expectedSortOrder++;
View Full Code Here

Examples of com.frovi.ss.Tree.BaseNode

  private CategoryController controller = CategoryController.getController();

  public CategoryNodeSupplier()
  {
    BaseNode rootNode =  new ContentNodeImpl();
    rootNode.setChildren(true);
    rootNode.setId(ROOT); // There is no BASE category so make it up
    rootNode.setTitle("Categories");
    rootNode.setContainer(true);
    setRootNode(rootNode);
  }
View Full Code Here

Examples of com.vmware.bdd.placement.entity.BaseNode

      List<BaseNode> nodes = new ArrayList<BaseNode>();
      if (nodeEntities == null) {
         return nodes;
      }
      for (NodeEntity nodeEntity : nodeEntities) {
         BaseNode node = convertNode(cluster, group, nodeEntity);
         nodes.add(node);
      }
      return nodes;
   }
View Full Code Here

Examples of nz.govt.natlib.meta.ui.tree.BaseNode

  void exit_actionPerformed(ActionEvent e) {
    exit();
  }

  protected void add() {
    BaseNode selected = (BaseNode) fileTree.getSelectionPath()
        .getLastPathComponent();
    openFiles(selected);
    resetStatus();
  }
View Full Code Here

Examples of org.adjective.syntactic.parser.node.BaseNode

    {
        if (output.isDirectory())
        {
            output = new File(output, source.getName());
        }
        BaseNode ast = parse(source);
        if (ast == null)
        {
            return;
        }
        PrintStream out = new PrintStream(new FileOutputStream(output));
        try
        {
            final Convert8To7Visitor converter = new Convert8To7Visitor();
            if (_classpath != null)
            {
                converter.setClassPath(new ClassPath(_classpath));
            }
            ast.jjtAccept(converter, null);
            ast.jjtAccept(new PrintSourceVisitor(), out);
        }
        finally
        {
            out.close();
        }
View Full Code Here

Examples of org.drools.common.BaseNode

     * @return the actual attached node that may be the one given as parameter
     *         or eventually one that was already in the cache if sharing is enabled
     */
    public BaseNode attachNode(final BuildContext context,
                               final BaseNode candidate) {
        BaseNode node = null;
        RuleBasePartitionId partition = null;
        if ( candidate.getType() == NodeTypeEnums.EntryPointNode ) {
            // entry point nodes are always shared
            node = context.getRuleBase().getRete().getEntryPointNode( ((EntryPointNode) candidate).getEntryPoint() );
            // all EntryPointNodes belong to the main partition
            partition = RuleBasePartitionId.MAIN_PARTITION;
        } else if ( candidate.getType() == NodeTypeEnums.ObjectTypeNode ) {
            // object type nodes are always shared
            Map<ObjectType, ObjectTypeNode> map = context.getRuleBase().getRete().getObjectTypeNodes( context.getCurrentEntryPoint() );
            if ( map != null ) {
                ObjectTypeNode otn = map.get( ((ObjectTypeNode) candidate).getObjectType() );
                if ( otn != null ) {
                    // adjusting expiration offset
                    otn.setExpirationOffset( Math.max( otn.getExpirationOffset(),
                                                       ((ObjectTypeNode) candidate).getExpirationOffset() ) );
                    node = otn;
                }
            }
            // all ObjectTypeNodes belong to the main partition
            partition = RuleBasePartitionId.MAIN_PARTITION;
        } else if ( isSharingEnabledForNode( context,
                                             candidate ) ) {
            if ( (context.getTupleSource() != null) && NodeTypeEnums.isLeftTupleSink( candidate ) ) {
                node = context.getTupleSource().getSinkPropagator().getMatchingNode( candidate );
            } else if ( (context.getObjectSource() != null) && NodeTypeEnums.isObjectSink( candidate ) ) {
                node = context.getObjectSource().getSinkPropagator().getMatchingNode( candidate );
            } else {
                throw new RuntimeDroolsException( "This is a bug on node sharing verification. Please report to development team." );
            }
        }

        if ( node == null ) {
            // only attach() if it is a new node
            node = candidate;

            // new node, so it must be labeled
            if ( partition == null ) {
                // if it does not has a predefined label
                if ( context.getPartitionId() == null ) {
                    // if no label in current context, create one
                    context.setPartitionId( context.getRuleBase().createNewPartitionId() );
                }
                partition = context.getPartitionId();
            }
            // set node whit the actual partition label
            node.setPartitionId( partition );
            node.attach(context);
            // adds the node to the context list to track all added nodes
            context.getNodes().add( node );
        } else {
            // shared node found
            // undo previous id assignment
            context.releaseId( candidate.getId() );
        }
        node.addAssociation( context.getRule(), context.peekRuleComponent() );
        return node;
    }
View Full Code Here

Examples of org.drools.common.BaseNode

                                                                  rule,
                                                                  subrule,
                                                                  subruleIndex,
                                                                  context );

        BaseNode baseTerminalNode = (BaseNode) terminal;
        baseTerminalNode.attach(context);            
       
        if ( context.getRuleBase().getConfiguration().isUnlinkingEnabled() && !unlinkingAllowedForRule(context.getRule() ) ) {
            setUnlinkDisabledCount( null, terminal.getLeftTupleSource()( context.getWorkingMemories().length == 0) ? null : context.getWorkingMemories() );
        }              

        baseTerminalNode.networkUpdated(new UpdateContext());

        // adds the terminal node to the list of nodes created/added by this sub-rule
        context.getNodes().add( baseTerminalNode );

        // assigns partition IDs to the new nodes
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.