ist.palcom.contingency.manager.helpers
Class ResourceHelper

java.lang.Object
  extended by ist.palcom.contingency.manager.helpers.ResourceHelper

public class ResourceHelper
extends java.lang.Object

Auxiliary mehtods.


Constructor Summary
ResourceHelper()
           
 
Method Summary
static ServiceDeclList getHostedServices(PRDAssemblyVer ai, DeviceDecl device)
          Returns a list of services hosted on the particular device specified by its declaration.
static ServiceDeclList getHostedServices(PRDAssemblyVer ai, Identifier deviceID)
          Returns a list of devices hosted on the device specified by its assembly identifier.
static URN getHostingDevice(PRDAssemblyVer ai, SingleServiceDecl hostedService)
           
static java.util.List<PRDData> getResources(DeviceDeclList devices)
           
static java.util.List<PRDData> getResources(PRDAssemblyVer ai)
           
static java.util.List<PRDData> getResources(ServiceDeclList services)
           
static URN getURN(DeviceDecl device)
           
static URN getURN(PRDAssemblyVer ai, PRDData info)
           
static URN getURN(URN deviceURN, ServiceDecl service)
           
static boolean isDevice(URN urn)
           
static boolean isSameType(URN urn1, URN urn2)
           
static boolean isService(URN urn)
           
static boolean sameURN(URN urn1, URN urn2)
           
 
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

isDevice

public static boolean isDevice(URN urn)

isService

public static boolean isService(URN urn)

isSameType

public static boolean isSameType(URN urn1,
                                 URN urn2)

getHostingDevice

public static URN getHostingDevice(PRDAssemblyVer ai,
                                   SingleServiceDecl hostedService)

getResources

public static java.util.List<PRDData> getResources(PRDAssemblyVer ai)

getResources

public static java.util.List<PRDData> getResources(DeviceDeclList devices)

getResources

public static java.util.List<PRDData> getResources(ServiceDeclList services)

sameURN

public static boolean sameURN(URN urn1,
                              URN urn2)

getHostedServices

public static ServiceDeclList getHostedServices(PRDAssemblyVer ai,
                                                DeviceDecl device)
Returns a list of services hosted on the particular device specified by its declaration.

Parameters:
ai - - A description of an assembly the device is a constituent of.
device - - A declaration of the device, services of which are requested.
Returns:
List of services hosted on the device.

getHostedServices

public static ServiceDeclList getHostedServices(PRDAssemblyVer ai,
                                                Identifier deviceID)
Returns a list of devices hosted on the device specified by its assembly identifier.

Parameters:
ai - - An assembly description the device is a constituent of.
deviceID - - An identifier defining the device in the given assembly.
Returns:
List of services hosted on the device.

getURN

public static URN getURN(URN deviceURN,
                         ServiceDecl service)

getURN

public static URN getURN(DeviceDecl device)

getURN

public static URN getURN(PRDAssemblyVer ai,
                         PRDData info)