Gets the fields which should be displayed for a single resource.<p>

@param resource the resource for which we should fetch the fields

@return a string array containing the information for the given resource
976131
public String[] getResourceInfo(CmsResource resource) {

        String rootPath = resource.getRootPath();
        String title = "-";

        try {
            CmsProperty titleProp = m_adminCms.readPropertyObject(
                resource,
                CmsPropertyDefinition.PROPERTY_TITLE,
                false);
            if (!titleProp.isNullProperty()) {
                title = titleProp.getValue();
            }
        } catch (CmsException e) {
            // ignore
        }
        return new String[] {rootPath, title};
    }
889936
public CmsRelationFilter filterResource(CmsResource resource) {

        CmsRelationFilter filter = filterStructureId(resource.getStructureId());
        filter = filterPath(resource.getRootPath());
        return filter;
    }
606183
@SuppressWarnings("unchecked")
    private Set<String> getResourcePaths() {

        Set<String> resources = new HashSet<String>();
        for (Component c : m_resources) {
            if (c instanceof CmsRemovableFormRow<?>) {
                String value = ((CmsRemovableFormRow<CmsPathSelectField>)c).getInput().getValue();
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                    resources.add(value);
                }
            }
        }
        return resources;
    }
970518
private String getResourceField(int key)
   {
      String result = null;

      if (key > 0 && key < m_resourceNames.length)
      {
         result = m_resourceNames[key];
      }

      return (result);
   }
635366
public static boolean isXmlContent(CmsResource resource) {

        boolean result = false;
        if (resource != null) {
            // avoid array index out of bound exception:
            if (!resource.isFolder()) {
                result = OpenCms.getResourceManager().getResourceType(resource) instanceof CmsResourceTypeXmlContent;
            }
        }
        return result;
    }
139477
public Set<ResourceMethod> getMethods(final String resource) {
        return Collections.unmodifiableSet(resources.get(resource));
    }
689619
public ResourceMetaData getResourceMetaData(Resource resource)
    {
        Object o=resource.getAssociate();
        if (o instanceof ResourceMetaData)
            return (ResourceMetaData)o;
        return new ResourceMetaData(resource);
    }
21276
public Resource.Iterator get(Resource resource) {
		Integer key = Integer.valueOf(System.identityHashCode(resource));
		return map.get(key);
	}
294207
public static String readFromResource(String resource) throws IOException {

        InputStream in = getResourceAsStream(resource);
        if (in == null) {
            return null;
        }
        try {
            return read(in);
        } finally {
            closeQuietly(in);
        }
    }
1082713
def _fields(self, resource):
        """"""
        datasource = self.get_datasource(resource)
        keys = datasource[2].keys()
        return ','.join(keys) + ','.join([config.LAST_UPDATED, config.DATE_CREATED])
719978
private static String getResourceLookup(Resource resource) // F743-16274.1
    {
        if (svResourceLookupMethod == null)
        {
            return "";
        }

        try
        {
            return (String) svResourceLookupMethod.invoke(resource, (Object[]) null);
        } catch (Exception ex)
        {
            throw new IllegalStateException(ex);
        }
    }
580437
public static List<CmsContainerElementBean> loadInheritContainerElements(CmsObject cms, CmsResource resource) {

        CmsInheritanceReferenceParser parser = new CmsInheritanceReferenceParser(cms);
        try {
            parser.parse(resource);
            CmsInheritanceReference ref = parser.getReference(cms.getRequestContext().getLocale());
            if (ref != null) {
                String name = ref.getName();
                CmsADEManager adeManager = OpenCms.getADEManager();
                CmsInheritedContainerState result = adeManager.getInheritedContainerState(
                    cms,
                    cms.getRequestContext().getRootUri(),
                    name);
                return result.getElements(false);
            }
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
        return Collections.emptyList();
    }
1549
public function indexFields(Resource $resource): array
    {
        return $this->resourceFields($resource)->map(function (Field $field) {
            if (!$field->computed()) {
                return $field->attribute;
            }

            return $field->name;
        })->unique()->all();
    }
142041
private String getRootPath(Object resource) {

        if (resource instanceof CmsResource) {
            return ((CmsResource)resource).getRootPath();
        }
        if (resource instanceof CmsPublishedResource) {
            return ((CmsPublishedResource)resource).getRootPath();
        }
        throw new IllegalArgumentException("wrong format of resources"); //should never happen
    }
62543
protected List<String> getResourceNamesFromParam(Map<String, String> params) {

        String resourcesParam = "/";
        if (params.containsKey(I_CmsListResourceCollector.PARAM_RESOURCES)) {
            resourcesParam = params.get(I_CmsListResourceCollector.PARAM_RESOURCES);
        }
        if (resourcesParam.length() == 0) {
            return Collections.emptyList();
        }
        return CmsStringUtil.splitAsList(resourcesParam, "#");
    }
40129
@Pure
	protected String formatResource(XtextResource resource) {
		assert resource != null;
		try {
			final ITextRegionAccess regionAccess = this.regionAccessBuilder.get().forNodeModel(resource).create();
			final FormatterRequest formatterRequest = new FormatterRequest();
			formatterRequest.setAllowIdentityEdits(false);
			formatterRequest.setTextRegionAccess(regionAccess);
			final IPreferenceValues preferenceValues = FormatterFacade.this.configurationProvider
					.getPreferenceValues(resource);
			formatterRequest.setPreferences(TypedPreferenceValues.castOrWrap(preferenceValues));
			final List<ITextReplacement> replacements = this.formatter.format(formatterRequest);
			return regionAccess.getRewriter().renderToString(replacements);
		} catch (Exception exception) {
			throw Exceptions.sneakyThrow(exception);
		}
	}
1374432
protected String getRequestString(List<CmsResource> resources) {

        String res = "?";

        for (CmsResource resource : resources) {
            res += "resources=" + resource.getStructureId().getStringValue() + "&";
        }
        return res.substring(0, res.length() - 1); //Remove last "&"
    }