eu.xtreemos.xosd.utilities.resmng
Class ResourceDescriptorRecordHelper

java.lang.Object
  extended by eu.xtreemos.xosd.utilities.resmng.ResourceDescriptorRecordHelper

public class ResourceDescriptorRecordHelper
extends java.lang.Object


Field Summary
(package private) static org.apache.log4j.Logger logger
           
 
Constructor Summary
ResourceDescriptorRecordHelper()
           
 
Method Summary
static java.util.ArrayList<ResourceDescriptorRecord> extractGLUE(java.util.Hashtable<java.lang.String,java.lang.Object> glue, CommunicationAddress communicationAddress)
          Extracts the selected substructures from a hashtable representing an XML formatted according to the GLUE v1.2 schema.
protected static java.lang.String trimString(java.lang.String value)
          Remove all trailing and preceding whitespaces(tabs, spaces, carriage returns and line feeds).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger
Constructor Detail

ResourceDescriptorRecordHelper

public ResourceDescriptorRecordHelper()
Method Detail

extractGLUE

public static java.util.ArrayList<ResourceDescriptorRecord> extractGLUE(java.util.Hashtable<java.lang.String,java.lang.Object> glue,
                                                                        CommunicationAddress communicationAddress)
Extracts the selected substructures from a hashtable representing an XML formatted according to the GLUE v1.2 schema. Currently these refer to operating system name, CPU architecture, processor model, processor clock speed and main memory RAM size of the Site / Host XML node.

Parameters:
glue - The structure describing an instance of an XML structured according to the GLUE v1.2 schema.
communicationAddress - The communication address of the node we received the resources from.
Returns:
An ArrayList of descriptors as extracted from the GLUE. Currently the returned collection will contain up to one record.

trimString

protected static java.lang.String trimString(java.lang.String value)
Remove all trailing and preceding whitespaces(tabs, spaces, carriage returns and line feeds).

Parameters:
value - The string to trim.
Returns:
A string with no whitespaces before or after the non-whitespace characters.