Helper method for creating a VFS tree item widget from a VFS entry bean.<p>

@param vfsEntry the VFS entry bean

@return the tree item widget
544866
protected CmsLazyTreeItem createItem(final CmsVfsEntryBean vfsEntry) {

        String name = null;
        String rootPath = vfsEntry.getRootPath();
        if (rootPath.equals("/") || rootPath.equals("")) {
            name = "/";
        } else {
            name = CmsResource.getName(vfsEntry.getRootPath());

            if (name.endsWith("/")) {
                name = name.substring(0, name.length() - 1);
            }
        }
        CmsDataValue dataValue = new CmsDataValue(
            600,
            3,
            vfsEntry.getSmallIconClasses(),
            name,
            vfsEntry.getDisplayName());
        if (vfsEntry.isSearchMatch()) {
            dataValue.setSearchMatch(true);
        }
        dataValue.setUnselectable();
        if (vfsEntry.isEditable()) {
            dataValue.addButton(createUploadButtonForTarget(vfsEntry.getRootPath(), true));
        }
        CmsLazyTreeItem result;
        SelectionHandler selectionHandler;
        CmsCheckBox checkbox = null;
        if (isIncludeFiles()) {
            checkbox = new CmsCheckBox();
            result = new CmsLazyTreeItem(checkbox, dataValue, true);
            selectionHandler = new SelectionHandler(vfsEntry, checkbox);
            checkbox.addClickHandler(selectionHandler);
            dataValue.addClickHandler(selectionHandler);
            dataValue.addButton(createSelectButton(selectionHandler));
        } else {
            result = new CmsLazyTreeItem(dataValue, true);
            selectionHandler = new SelectionHandler(vfsEntry, null);
        }
        // we need this in a final variable to access it in the click handler
        if (getTabHandler().hasSelectResource()) {
            String selectPath = m_tabHandler.getSelectPath(vfsEntry);
            dataValue.addButton(
                createSelectResourceButton(
                    selectPath,
                    vfsEntry.getStructureId(),
                    vfsEntry.getDisplayName(),
                    I_CmsGalleryProviderConstants.RESOURCE_TYPE_FOLDER));
        }
        result.setData(vfsEntry);
        m_itemsByPath.put(vfsEntry.getRootPath(), result);
        result.setLeafStyle(false);
        result.setSmallView(true);
        m_treeItems.add(result);
        if (vfsEntry.getChildren() != null) {
            for (CmsVfsEntryBean child : vfsEntry.getChildren()) {
                result.addChild(createItem(child));
            }
            result.onFinishLoading();
            result.setOpen(true, false);
            if (vfsEntry.getChildren().isEmpty()) {
                result.setLeafStyle(true);
            }
        }

        return result;
    }
1079757
static <K,V> Map.Entry<K,V> exportEntry(TreeMapEntry<K,V> e) {
        return (e == null) ? null :
            new AbstractMap.SimpleImmutableEntry<>(e);
    }
1340339
private CmsTreeItem buildTreeItem(CmsCategoryTreeEntry category, Collection<String> selectedCategories) {

        // generate the widget that should be shown in the list
        CmsDataValue dataValue = new CmsDataValue(
            600,
            3,
            CmsCategoryBean.SMALL_ICON_CLASSES,
            true,
            category.getTitle(),
            "rtl:" + category.getPath(),
            "hide:" + category.getSitePath());

        // create the check box for this item
        CmsCheckBox checkBox = new CmsCheckBox();
        // if it has to be selected, select it
        boolean isPartofPath = false;
        Iterator<String> it = selectedCategories.iterator();
        while (it.hasNext()) {
            String path = it.next();
            if (path.startsWith(category.getPath()) || path.contains("/" + category.getPath())) {
                isPartofPath = true;
            }
        }
        if (isPartofPath) {
            checkBox.setChecked(true);
        }
        if (!isEnabled()) {
            checkBox.disable(m_disabledReason);
        }
        if (category.getPath().isEmpty()) {
            checkBox.setVisible(false);
        }
        // bild the CmsTreeItem out of the widget and the check box
        CmsTreeItem treeItem = new CmsTreeItem(true, checkBox, dataValue);
        // abb the handler to the check box
        dataValue.addClickHandler(new DataValueClickHander(treeItem));

        checkBox.addValueChangeHandler(new CheckBoxValueChangeHandler(treeItem));

        // set the right style for the small view
        treeItem.setSmallView(true);
        treeItem.setId(category.getPath());
        // add it to the list of all categories
        m_categories.put(treeItem.getId(), treeItem);
        return treeItem;
    }
1095691
@Override
    public FatLfnDirectoryEntry getEntry(String name) {
        name = name.trim().toLowerCase(Locale.ROOT);
        
        final FatLfnDirectoryEntry entry = longNameIndex.get(name);
        
        if (entry == null) {
            if (!ShortName.canConvert(name)) return null;
            return shortNameIndex.get(ShortName.get(name));
        } else {
            return entry;
        }
    }
366858
public WorkspaceEntry getWorkspaceEntry(String wsName)
   {
      for (WorkspaceEntry entry : config.getWorkspaceEntries())
      {
         if (entry.getName().equals(wsName))
            return entry;
      }
      return null;
   }
1117023
public void buildCategoryTree(List<CmsCategoryTreeEntry> treeEntries, Collection<String> selectedCategories) {

        m_valuesSet = 0;
        m_allSidePath.clear();
        m_categories.removeFromParent();
        m_categories.clear();

        if ((treeEntries != null) && !treeEntries.isEmpty()) {
            // add the first level and children
            for (CmsCategoryTreeEntry category : treeEntries) {
                // set the category tree item and add to list
                CmsTreeItem treeItem;
                boolean hasSelectedChildren = hasSelectedChildren(category.getChildren(), selectedCategories);
                if (!category.getPath().isEmpty() || hasSelectedChildren) {
                    if (m_selectParent || !hasSelectedChildren) {
                        treeItem = buildTreeItem(category, selectedCategories, false);
                        if (treeItem.isOpen()) {
                            m_allSidePath.add(category.getSitePath());
                        }
                    } else {
                        treeItem = buildTreeItem(category, selectedCategories, true);
                    }
                    if (treeItem.isOpen()) {
                        m_singleSidePath = category.getSitePath();

                        m_valuesSet++;
                        addChildren(treeItem, category.getChildren(), selectedCategories);
                    }
                }
            }
        }
        m_scrollPanel.add(m_categories);
        m_scrollPanel.onResizeDescendant();

    }
76787
public synchronized TreeEntry<K, V> ceilingEntry(final K key) {
		// Retorna la clave mas cercana mayor o igual a la clave indicada
		return getRoundEntry(key, true, true);
	}
1212285
public String getIconForEntry(CmsClientSitemapEntry entry) {

        String result;
        if (isNavigationMode()) {
            if (m_controller.isDetailPage(entry.getId())) {
                result = m_controller.getDetailPageInfo(entry.getId()).getIconClasses();
            } else {
                result = entry.getNavModeIcon();
            }
        } else {
            result = entry.getVfsModeIcon();
        }
        return result;
    }
111648
public String createInsertBeforeStr4ModelEntry(Map dbColMap0,Map<String,MicroDbModelEntry> modelEntryMap){
		if(dbColMap0==null){
			return null;
		}
		
		//add 201902 ning
		Map dbColMap=new CaseInsensitiveKeyMap();
		if(dbColMap0!=null){
			dbColMap.putAll(dbColMap0);
		}
		
		Cobj crealValues=Cutil.createCobj();
		Map metaMap=new HashMap();
		Iterator it=dbColMap.keySet().iterator();
		Set<String> metaFlagSet=new TreeSet();
		while(it.hasNext()){
			String key=(String) it.next();
			String value=(String) dbColMap.get(key);

			MicroDbModelEntry modelEntry=modelEntryMap.get(key);
			if(modelEntry==null){
				continue;
			}
			if(CheckModelTypeUtil.isRealCol(modelEntry)==false){
				if(value!=null){
					String metaName=modelEntry.getMetaContentId();
					metaFlagSet.add(metaName);
				}
			}else {
				crealValues.append(key,value!=null);
			}
		}

		for(String metaName:metaFlagSet){
			crealValues.append(metaName);
		}
		
		return crealValues.getStr();
	}
1356557
public com.ibm.websphere.cache.CacheEntry getEntry(com.ibm.websphere.cache.EntryInfo ei) {
        return getEntry(ei, true);
    }
820217
public CmsClientProperty getInheritedPropertyObject(CmsClientSitemapEntry entry, String name) {

        CmsClientSitemapEntry currentEntry = entry;
        while (currentEntry != null) {
            currentEntry = getParentEntry(currentEntry);
            if (currentEntry != null) {
                CmsClientProperty folderProp = currentEntry.getOwnProperties().get(name);
                if (!CmsClientProperty.isPropertyEmpty(folderProp)) {
                    return folderProp.withOrigin(currentEntry.getSitePath());
                }
            }
        }
        CmsClientProperty parentProp = getParentProperties().get(name);
        if (!CmsClientProperty.isPropertyEmpty(parentProp)) {
            String origin = parentProp.getOrigin();
            String siteRoot = CmsCoreProvider.get().getSiteRoot();
            if (origin.startsWith(siteRoot)) {
                origin = origin.substring(siteRoot.length());
            }
            return parentProp.withOrigin(origin);
        }
        return null;

    }
623537
public static <K, V> MapField<K, V> emptyMapField(MapEntry<K, V> defaultEntry) {
        return new MapField<K, V>(defaultEntry, StorageMode.MAP, Collections.<K, V> emptyMap(), null);
    }
977099
private List<NavigationEntryInterface> recursiveGetEntries(
      final List<NavigationEntryInterface> pnavigationEntries) {
    if (pnavigationEntries == null) {
      return Collections.emptyList();
    }
    return pnavigationEntries.stream().filter(entry -> entry.canReveal()).map(entry -> {
      if (entry instanceof NavigationEntryFolder) {
        return new NavigationEntryFolder(entry.getMenuValue(), entry.isOpenOnStartup(),
            recursiveGetEntries(((NavigationEntryFolder) entry).getSubEntries()));
      } else {
        return entry;
      }
    }).collect(Collectors.toList());
  }
876779
@XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "entry")
    public JAXBElement<EntryType> createEntry(EntryType value) {
        return new JAXBElement<EntryType>(ENTRY_QNAME, EntryType.class, null,
                value);
    }
620432
private void createMenuEntry(
        MenuItem parent,
        final CmsTreeNode<I_CmsContextMenuItem> node,
        CmsContextMenuTreeBuilder treeBuilder) {

        Command entryCommand = null;
        if (node.getChildren().size() == 0) {
            entryCommand = new Command() {

                private static final long serialVersionUID = 1L;

                public void menuSelected(MenuItem selectedItem) {

                    node.getData().executeAction(getDialogContext());
                }
            };
        }
        MenuItem entry = parent.addItem((node.getData().getTitle(A_CmsUI.get().getLocale())), entryCommand);
        for (CmsTreeNode<I_CmsContextMenuItem> child : node.getChildren()) {
            createMenuEntry(entry, child, treeBuilder);
        }
        if (treeBuilder.getVisibility(node.getData()).isInActive()) {
            entry.setEnabled(false);
        }
    }
1022743
protected VersionRows getBundle(ImportEntry entry) throws ImportException {

        // Add module information to map for easy lookup
        Map<String, String> modMap = new HashMap<>();
        for (Module module : entry.getModules()) {
            String modId = module.getModuleId();
            String modVer = module.getModuleVersion();
            modMap.put(modId, modVer);
        }
        for (Entry<String, String> mapEntry: modMap.entrySet()) {
            log.info("Modules: '" + mapEntry.getKey() + "'\t'" + mapEntry.getValue() + "'");
        }

        // Map needed to find the correct version of each concept to load for this import entry
        Map<String, ConceptRow> conceptMap = new HashMap<>();

        // Map needed to find the correct version of each relationship to load
        // for this import entry
        Map<String, RelationshipRow> relationshipMap = new HashMap<>();

        Map<String, RefsetRow> cdMap = new HashMap<>();

        Map<String, RefsetRow> adMap = new HashMap<>();

        Map<String, RefsetRow> owlMap = new HashMap<>();

        RF2Input input = (RF2Input) entry.getInput();

        InputType inputType = input.getInputType();
        Set<String> conceptsFiles = input.getConceptsFiles();
        log.info("Reading concepts info: " + conceptsFiles.size());
        for(String conceptsFile : conceptsFiles) {
            try {
                loadConceptRows(modMap, conceptMap, input.getInputStream(conceptsFile));
            } catch (NullPointerException | IOException e) {
                final String message = StructuredLog.FileLoadFailure.error(log, "concepts", inputType, conceptsFile, e);
                throw new ImportException(message, e);
            }
        }

        // Load concrete domains refsets
        final Set<String> concreteDomainRefsetFiles = input.getConcreteDomainRefsetFiles();
        log.info("Reading concrete domains reference set info: " + concreteDomainRefsetFiles.size());
        for (String filename : concreteDomainRefsetFiles) {
            try {
                loadReferenceSet(input, filename, modMap, cdMap, IRefsetFactory.CD);
            } catch (ArrayIndexOutOfBoundsException e) {
                final String msg = StructuredLog.RefsetLoadFailure.error(log, "concrete domains", filename, e);
                throw new ImportException(msg, e);
            }
        }

        // Load attribute domains refsets
        final Set<String> attributeDomainRefsetFiles = input.getAttributeDomainRefsetFiles();
        log.info("Reading attribute domains reference set info: " + attributeDomainRefsetFiles.size());
        for (String filename : attributeDomainRefsetFiles) {
            try {
                loadReferenceSet(input, filename, modMap, adMap, IRefsetFactory.AD);
            } catch (ArrayIndexOutOfBoundsException e) {
                final String msg = StructuredLog.RefsetLoadFailure.error(log, "attribute domains", filename, e);
                throw new ImportException(msg, e);
            }
        }

        // Load OWL reference sets
        final Set<String> owlAxiomRefsetFiles = input.getOwlAxiomRefsetFiles();
        log.info("Reading OWL Axiom reference set info: " + owlAxiomRefsetFiles.size());
        for (String filename : owlAxiomRefsetFiles) {
            try {
                loadReferenceSet(input, filename, modMap, owlMap, IRefsetFactory.OWL);
            } catch (ArrayIndexOutOfBoundsException e) {
                final String msg = StructuredLog.RefsetLoadFailure.error(log, "OWL Axiom", filename, e);
                log.error(msg, e);
                throw new ImportException(msg, e);
            }
        }
        boolean hasAxioms = !owlMap.isEmpty();

        final Set<String> owlOntologyRefsetFiles = input.getOwlOntologyRefsetFiles();
        log.info("Reading OWL Ontology reference set info: " + owlOntologyRefsetFiles.size());
        for (String filename : owlOntologyRefsetFiles) {
            try {
                loadReferenceSet(input, filename, modMap, owlMap, IRefsetFactory.OWL);
            } catch (ArrayIndexOutOfBoundsException e) {
                final String msg = StructuredLog.RefsetLoadFailure.error(log, "OWL Ontology", filename, e);
                throw new ImportException(msg, e);
            }
        }

        // Load relationships
        Set<String> relationshipsFiles = input.getStatedRelationshipsFiles();
        if (relationshipsFiles == null || relationshipsFiles.isEmpty()) {
            if (!hasAxioms) {
                // FIXME - MUST not do this if we have loaded OWL Axioms !
                relationshipsFiles = input.getRelationshipsFiles();
                StructuredLog.UsingInferredRelationships.warn(log);
            }
            log.info("Reading inferred relationships info: " + relationshipsFiles.size());
        } else {
            log.info("Reading stated relationships info: " + relationshipsFiles.size());
        }

        if(!hasAxioms && (relationshipsFiles == null || relationshipsFiles.isEmpty())) {
            throw new ImportException("No relationships files was specified.");
        }

        for(String relationshipsFile : relationshipsFiles) {
            try {
                loadRelationshipRows(modMap, relationshipMap, input.getInputStream(relationshipsFile));
            } catch (NullPointerException | IOException e) {
                final String message = StructuredLog.FileLoadFailure.error(log, "relationships", inputType, relationshipsFile, e);
                throw new ImportException(message, e);
            }
        }

        VersionRows vr = new VersionRows(conceptMap.values(), relationshipMap.values(), cdMap.values(), adMap.values(), owlMap.values());

        conceptMap = null;
        relationshipMap = null;
        cdMap = null;
        adMap = null;
        owlMap = null;

        return vr;
    }
925416
public Entry getEntry(String fsid) throws Exception {
        if (fsid.endsWith(".media-link")) {
            fsid = fsid.substring(0, fsid.length() - ".media-link".length());
        }

        final String entryPath = getEntryPath(fsid);

        checkExistence(entryPath);
        final InputStream in = FileStore.getFileStore().getFileInputStream(entryPath);

        final Entry entry;
        final File resource = new File(fsid);
        if (resource.exists()) {
            entry = loadAtomResourceEntry(in, resource);
            updateMediaEntryAppLinks(entry, fsid, true);
        } else {
            entry = loadAtomEntry(in);
            updateEntryAppLinks(entry, fsid, true);
        }
        return entry;
    }