Returns the big icon resource for the given resource.<p>

@param explorerType the resource explorer type settings
@param resourceName the resource name

@return the icon resource
340669
public static Resource getBigIconResource(CmsExplorerTypeSettings explorerType, String resourceName) {

        if (explorerType == null) {
            explorerType = OpenCms.getWorkplaceManager().getExplorerTypeSetting(
                (resourceName == null) && !CmsResource.isFolder(resourceName)
                ? CmsResourceTypeUnknownFile.RESOURCE_TYPE_NAME
                : CmsResourceTypeUnknownFolder.RESOURCE_TYPE_NAME);
        }
        if (!explorerType.getIconRules().isEmpty() && (resourceName != null)) {
            String extension = CmsResource.getExtension(resourceName);
            if (extension != null) {
                CmsIconRule rule = explorerType.getIconRules().get(extension);
                if ((rule != null) && (rule.getBigIconStyle() != null)) {
                    return new CmsCssIcon(rule.getBigIconStyle());
                }
            }
        }
        if (explorerType.getBigIconStyle() != null) {
            return new CmsCssIcon(explorerType.getBigIconStyle());
        } else if (explorerType.getBigIcon() != null) {
            return new ExternalResource(
                CmsWorkplace.getResourceUri(CmsWorkplace.RES_PATH_FILETYPES + explorerType.getBigIcon()));
        } else {
            return new CmsCssIcon(CmsExplorerTypeSettings.ICON_STYLE_DEFAULT_BIG);
        }
    }
773991
public ResourceRefType<ApplicationType<T>> getOrCreateResourceRef()
   {
      List<Node> nodeList = childNode.get("resource-ref");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ResourceRefTypeImpl<ApplicationType<T>>(this, "resource-ref", childNode, nodeList.get(0));
      }
      return createResourceRef();
   }
451071
public void setType(String typeName) {

        try {
            try {
                m_resourceBuilder.setType(OpenCms.getResourceManager().getResourceType(typeName));
            } catch (@SuppressWarnings("unused") CmsLoaderException e) {
                // TODO: what happens if the resource type is a specialized folder and is not configured??
                try {
                    m_resourceBuilder.setType(
                        OpenCms.getResourceManager().getResourceType(CmsResourceTypePlain.getStaticTypeName()));
                } catch (@SuppressWarnings("unused") CmsLoaderException e1) {
                    // this should really never happen
                    m_resourceBuilder.setType(
                        OpenCms.getResourceManager().getResourceType(CmsResourceTypePlain.getStaticTypeName()));
                }
            }
            if (m_resourceBuilder.getType().isFolder()) {
                // ensure folders end with a "/"
                if (!CmsResource.isFolder(m_destination)) {
                    m_destination += "/";
                }
            }
        } catch (Throwable e) {
            setThrowable(e);
        }
    }
895750
@Override
   @SuppressWarnings("unchecked")
   public <E, T extends Resource<E>> T getChildOfType(final Class<T> type, final String name) throws ResourceException
   {
      T result;
      Resource<?> child = getChild(name);
      if (type.isAssignableFrom(child.getClass()))
      {
         result = (T) child;
      }
      else if (child.exists())
      {
         throw new ResourceException("Requested resource [" + name + "] was not of type [" + type.getName()
                  + "], but was instead [" + child.getClass().getName() + "]");
      }
      else
      {
         E underlyingResource = (E) child.getUnderlyingResourceObject();
         result = getResourceFactory().create(type, underlyingResource);
      }
      return result;
   }
1103979
public <T> T getResourceAsObject(final TypeToken<T> type)
    {
        try
        {
            //noinspection unchecked
            return (T) objectMapper.readValue(((ContentRepresentation) getUnderlyingRepresentation()).getContent(), objectMapper.constructType(type.getType()));
        }
        catch (IOException e)
        {
            LOGGER.warn("failed to parse resource as object: {}", e.getMessage());
            throw new RuntimeException(e);
        }
    }
338056
public static String getExtension(String resourceName) {

        String result = null;
        if (!resourceName.endsWith("/")) {
            // folders don't have any extension
            resourceName = CmsResource.getName(resourceName);
            int index = resourceName.lastIndexOf(".") + 1;
            if ((index > 0) && (index < resourceName.length())) {
                result = resourceName.substring(index).toLowerCase();
            }
        }

        return result;
    }
1029783
@Deprecated
    public Icon getIconFile() throws IOException {
        ApkMeta apkMeta = getApkMeta();
        String iconPath = apkMeta.getIcon();
        if (iconPath == null) {
            return null;
        }
        return new Icon(iconPath, Densities.DEFAULT, getFileData(iconPath));
    }
1086418
protected CmsExplorerTypeSettings getSettingsForType(String resTypeName) {

        // get settings for resource type
        CmsExplorerTypeSettings settings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(resTypeName);
        if (!settings.hasEditOptions() && CmsStringUtil.isNotEmpty(settings.getReference())) {
            // refers to another resource type, get settings of referred type
            settings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(settings.getReference());
        }
        return settings;
    }
895207
public T simonTypeImg(SimonType simonType, String rootPath) throws IOException {
		String image = null;
		switch (simonType) {
			case COUNTER:
				image = "TypeCounter.png";
				break;
			case STOPWATCH:
				image = "TypeStopwatch.png";
				break;
			case UNKNOWN:
				image = "TypeUnknown.png";
				break;
		}
		String label = simonType.name().toLowerCase();
		doBegin("img", null, label + " icon");
		attr("src", rootPath + "resource/images/" + image);
		attr("alt", label);
		writer.write(" />");
		return (T) this;
	}
1319118
public String getIconPathResourceType() {

        if (!isEditable()) {
            return CmsWorkplace.RES_PATH_FILETYPES
                + OpenCms.getWorkplaceManager().getExplorerTypeSetting(
                    CmsResourceTypePlain.getStaticTypeName()).getIcon();
        }
        return CmsWorkplace.RES_PATH_FILETYPES
            + OpenCms.getWorkplaceManager().getExplorerTypeSetting(getResourceTypeName()).getIcon();
    }
713113
@Override
	public Reader getResource(String resourceName) throws ResourceNotFoundException {

		return getResource(null, resourceName, false);
	}
994723
public static Icon getImageIcon(UrlProvider urlProvider, String fileName) throws UrlProviderException
	{
		URL _icon = urlProvider.getUrl(fileName);
		return new ImageIcon(_icon);
	}
425983
public int getAllocatedCpuForType(ResourceType type) {
    int total = 0;

    for (ClusterNode node: nameToNode.values()) {
      synchronized (node) {
        if (node.deleted) {
          continue;
        }
        total += node.getAllocatedCpuForType(type);
      }
    }
    return total;
  }
323050
private ImageIcon retrieveIcon(IconLocationType location)
	{
		try
		{
			return myIconProvider.retrieveIcon(location);
		}
		catch (Exception _exception)
		{
			System.err.println(_exception.getMessage());
		}
		return null;
	}
133766
public static String getResourceUri(String resourceName) {

        StringBuffer result = new StringBuffer(256);
        result.append(getSkinUri());
        result.append(resourceName);
        return result.toString();
    }
669919
@Nullable
  public static IIcon get (@Nullable final EDefaultIcon eDefaultIcon)
  {
    if (eDefaultIcon == null)
      return null;
    return s_aMap.get (eDefaultIcon);
  }
339810
private CmsResource getResource(CmsObject cms, String resourcename) {

        return getResource(cms, resourcename, CmsResourceFilter.DEFAULT);
    }