Log4j 1.1

pl.psnc.expres.model.resource.helper
Class ResourceHelper

java.lang.Object
  extended by pl.psnc.expres.model.resource.helper.ResourceHelper

public abstract class ResourceHelper
extends java.lang.Object

ResourceHelper class - set of utility methods for resource objects

Author:
Dominik Stoklosa (~osa~)
Email address
osa@man.poznan.pl

Constructor Summary
ResourceHelper()
           
 
Method Summary
static
<T> java.util.List<ResourceValue>
getConcreteTypes(java.util.List<ResourceValue> resourceList, java.lang.Class<T> concreteType)
          Get a list of resources with a given type from the resource list
static java.util.List<ResourceValue> getCorrelatorNodeList(java.util.List<ResourceValue> resourceList)
          Get list of correlator nodes from the given resource list
static java.util.List<ResourceValue> getFileServerList(java.util.List<ResourceValue> resourceList)
          Get list of file servers from the given resource list
static java.util.List<ResourceValue> getRadioTelescopeList(java.util.List<ResourceValue> resourceList)
          Get list of radio telescopes from the given resource list
static ResourceValue getResource(int id, java.util.List<ResourceValue> resourceList)
          Get instance of resource value by the given resource identifier or null if resource was not found.
static ResourceValue getResourceByAbbr(java.lang.String abbr, java.util.List<ResourceValue> resourceList)
          Get instance of resource value by the given resource abbreviation or null if resource was not found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceHelper

public ResourceHelper()
Method Detail

getConcreteTypes

public static <T> java.util.List<ResourceValue> getConcreteTypes(java.util.List<ResourceValue> resourceList,
                                                                 java.lang.Class<T> concreteType)
Get a list of resources with a given type from the resource list

Type Parameters:
T - resource type
Parameters:
resourceList - resource list
concreteType - class instance of the given resource type
Returns:

getRadioTelescopeList

public static java.util.List<ResourceValue> getRadioTelescopeList(java.util.List<ResourceValue> resourceList)
Get list of radio telescopes from the given resource list

Parameters:
resourceList - resource list
Returns:
list of radio telescopes from the given resource list

getFileServerList

public static java.util.List<ResourceValue> getFileServerList(java.util.List<ResourceValue> resourceList)
Get list of file servers from the given resource list

Parameters:
resourceList - resource list
Returns:
list of file servers from the given resource list

getCorrelatorNodeList

public static java.util.List<ResourceValue> getCorrelatorNodeList(java.util.List<ResourceValue> resourceList)
Get list of correlator nodes from the given resource list

Parameters:
resourceList - resource list
Returns:
list of correlator nodes from the given resource list

getResourceByAbbr

public static ResourceValue getResourceByAbbr(java.lang.String abbr,
                                              java.util.List<ResourceValue> resourceList)
Get instance of resource value by the given resource abbreviation or null if resource was not found.

Parameters:
abbr - resource abbreviation
resourceList - list of resources, instance of ResourceValue

getResource

public static ResourceValue getResource(int id,
                                        java.util.List<ResourceValue> resourceList)
Get instance of resource value by the given resource identifier or null if resource was not found.

Parameters:
id - resource identifier
resourceList - list of resources, instance of ResourceValue

Log4j 1.1

Copyright 2007-2008 by VLAB