/* (non-Javadoc)
@see org.apereo.portal.url.IPortletUrlBuilder#getResourceId()
435612
@Override
    public String getResourceId() {
        Preconditions.checkArgument(
                this.urlType == UrlType.RESOURCE,
                "UrlType must be %s but was %s",
                UrlType.RESOURCE,
                this.urlType);
        return this.resourceId;
    }
400105
public static URL getResourceURL(String resource) throws IOException {
    URL url = null;
    ClassLoader loader = ResourcesUtils.class.getClassLoader();
    if (loader != null) {
      url = loader.getResource(resource);
    }
    if (url == null) {
      url = ClassLoader.getSystemResource(resource);
    }
    if (url == null) {
      throw new IOException("Could not find resource " + resource);
    }
    return url;
  }
903249
public URL getResource(String resourceName, BeanContextChild child)
	{
		if (resourceName == null || child == null)
		{
			throw new NullPointerException();
		}
		if (!contains(child))
		{
			throw new IllegalArgumentException(Messages.getString("beans.6D"));
		}

		return ClassLoader.getSystemResource(resourceName);
	}
700054
@Override
  public URL getResource(String name) {

    URL result = null;

    if (bestCandidate != null) {
      result = bestCandidate.getResource(name);
      if (result == null) {
        bestCandidate = null;
      }
    }

    ClassLoadHelper loadHelper = null;

    Iterator<ClassLoadHelper> iter = loadHelpers.iterator();
    while (iter.hasNext()) {
      loadHelper = iter.next();

      result = loadHelper.getResource(name);
      if (result != null) {
        break;
      }
    }

    bestCandidate = loadHelper;
    return result;
  }
764440
public static String relativePathFromResourceId(String id) {
        if (id == null) {
            return null;
        }
        String[] paths = id.split("/providers/" + resourceProviderFromResourceId(id) + "/", 2);
        if (paths.length == 1) {
            return "";
        } else {
            return paths[1];
        }
    }
1117233
public static Uri getUriForResourceId(int resourceId) {
    return new Uri.Builder()
        .scheme(LOCAL_RESOURCE_SCHEME)
        .path(String.valueOf(resourceId))
        .build();
  }
1148059
public String getId()
  {
    String returnValue = _targetStream.getID();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getId", returnValue);
    return returnValue;
  }
355550
def get_resource_id(self):
        
        # Implemented from template for osid.resource.Resource.get_avatar_id_template
        if not bool(self._my_map['resourceId']):
            raise errors.IllegalState('this Authorization has no resource')
        else:
            return Id(self._my_map['resourceId'])
526774
public java.lang.String getProducerProjectId() {
    java.lang.Object ref = producerProjectId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      producerProjectId_ = s;
      return s;
    }
  }
213994
public static String groupFromResourceId(String id) {
        return (id != null) ? ResourceId.fromString(id).resourceGroupName() : null;
    }
695316
public static String getPathForResource(final String resourcePath) {
        URL path = ResourceUtil.class.getResource(resourcePath);
        if (path == null) {
            path = ResourceUtil.class.getResource("/");
            File tmpFile = new File(path.getPath(), resourcePath);
            return tmpFile.getPath();
        }

        return path.getPath();
    }
564893
public static URL getResource(String ref) {

		URL url = null;
		
		for (int i=0;i<locations.size();i++) {
			ResourceLocation location = (ResourceLocation) locations.get(i);
			url = location.getResource(ref);
			if (url != null) {
				break;
			}
		}
		
		if (url == null)
		{
			throw new RuntimeException("Resource not found: "+ref);
		}
			
		return url;
	}
439484
public String getResourceType() {
        if (resourceType == null) {
            resourceType = "";
            String type = resource.getResourceType();
            if (StringUtils.isBlank(type) || getPrimaryType().equals(type)) {
                Resource contentResource = getContentResource();
                if (contentResource != null) {
                    type = contentResource.getResourceType();
                    if (StringUtils.isNotBlank(type)) {
                        ResourceHandle handle = ResourceHandle.use(contentResource);
                        if (type.equals(handle.getPrimaryType())) {
                            type = null;
                        }
                    }
                }
            }
            if (StringUtils.isNotBlank(type)) {
                // check for a real existing resource type
                if (!Resource.RESOURCE_TYPE_NON_EXISTING.equals(type)) {
                    resourceType = type;
                }
            }
        }
        return resourceType;
    }
466361
@Override
  public Collection<Block> getByResourceId(String resourceId) {
    ensureSorted();

    // prepare resourceId for binary search
    resourceIds[size] = resourceId;
    resourceIdsIndex[size] = size;

    int index = DataUtils.binarySearch(byResourceId);

    List<Block> result = new ArrayList<>();
    int realIndex = resourceIdsIndex[index];
    while (index < size && FastStringComparator.INSTANCE.compare(resourceIds[realIndex], resourceId) == 0) {
      result.add(getBlock(realIndex, resourceId));

      index++;
      realIndex = resourceIdsIndex[index];
    }
    return result;
  }
1217788
@Override
    public IPortletUrlBuilder getPortletUrlBuilder(IPortletWindowId portletWindowId) {
        IPortletUrlBuilder portletUrlBuilder;

        synchronized (this.portletUrlBuilders) {
            portletUrlBuilder = this.portletUrlBuilders.get(portletWindowId);
            if (portletUrlBuilder == null) {
                portletUrlBuilder = new FailSafePortletUrlBuilder(portletWindowId, this);
                this.portletUrlBuilders.put(portletWindowId, portletUrlBuilder);
            }
        }

        return portletUrlBuilder;
    }
420220
public final int getAttributeResourceID(int index) {
        int resourceIndex=getAttribute(index).name;
        if (m_resourceIDs==null ||
                resourceIndex<0 || resourceIndex>=m_resourceIDs.length)
        {
            return 0;
        }
        return m_resourceIDs[resourceIndex];
    }
133766
public static String getResourceUri(String resourceName) {

        StringBuffer result = new StringBuffer(256);
        result.append(getSkinUri());
        result.append(resourceName);
        return result.toString();
    }