private void parseResource(final Element resourceElement,final Collection<Resource> resources){
  final String tagName=resourceElement.getTagName();
  final String uri=resourceElement.getTextContent();
  if (TAG_GROUP_REF.equals(tagName)) {
    resources.addAll(getResourcesForGroup(uri));
  }
  if (getResourceType(resourceElement) != null) {
    final Resource resource=createResource(resourceElement);
    LOG.debug("\t\tadding resource: {}",resource);
    resources.add(resource);
  }
}

private void parseResource ( final Element resourceElement , final Collection < Resource > resources ) { final String tagName = resourceElement . getTagName ( ) ; final String uri = resourceElement . getTextContent ( ) ; if ( TAG_GROUP_REF . equals ( tagName ) ) { resources . addAll ( getResourcesForGroup ( uri ) ) ; } if ( getResourceType ( resourceElement ) != null ) { final Resource resource = createResource ( resourceElement ) ; LOG . debug ( "\t\tadding resource: {}" , resource ) ; resources . add ( resource ) ; } }
creates a resource from a given resourceelement . it can be css , js . if resource tag name is group - ref , the method will start a recursive computation .
