gr.uoa.di.madgik.execution.datatype
Class DataTypeResultSet

java.lang.Object
  extended by gr.uoa.di.madgik.execution.datatype.DataTypeResultSet
All Implemented Interfaces:
IDataType

public class DataTypeResultSet
extends Object
implements IDataType

This class represents data type with a URI proxy locator payload


Nested Class Summary
 
Nested classes/interfaces inherited from interface gr.uoa.di.madgik.execution.datatype.IDataType
IDataType.DataTypes
 
Constructor Summary
DataTypeResultSet()
           
 
Method Summary
 boolean CanSuggestDataTypeClass()
          Always returns true
 void FromXML(Element XML)
          Parses the xml serialization of the data type as retrieved by IDataType.ToXML()
 void FromXML(String XML)
          Parses the xml serialization of the data type as retrieved by IDataType.ToXML()
 Class<?> GetDataTypeClass()
          Returns IProxyLocator#class
 IDataType.DataTypes GetDataTypeEnum()
          Returns IDataType.DataTypes.ResultSet
 String GetStringValue()
          Returns IProxyLocator#ToXML() or an empty string if the value is null
 Object GetValue()
          Returns the actual payload
 void SetStringValue(String val)
          If the supplied value is null or an empty string, null is set as the payload.
 void SetValue(Object Value)
          Sets the provided payload using DataTypeUtils.GetValueAsProxyLocator(Object) if the the provided value is not null and is either a String or an instance of a IProxyLocator.
 String ToXML()
          The payload of the data type is stored using IProxyLocator#ToXML() after escaping special characters using XMLUtils.DoReplaceSpecialCharachters(String)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTypeResultSet

public DataTypeResultSet()
Method Detail

CanSuggestDataTypeClass

public boolean CanSuggestDataTypeClass()
Always returns true

Specified by:
CanSuggestDataTypeClass in interface IDataType
Returns:
true, if it can
See Also:
IDataType.CanSuggestDataTypeClass()

GetDataTypeClass

public Class<?> GetDataTypeClass()
Returns IProxyLocator#class

Specified by:
GetDataTypeClass in interface IDataType
Returns:
the run time type
See Also:
IDataType.GetDataTypeClass()

GetDataTypeEnum

public IDataType.DataTypes GetDataTypeEnum()
Returns IDataType.DataTypes.ResultSet

Specified by:
GetDataTypeEnum in interface IDataType
Returns:
the data type
See Also:
IDataType.GetDataTypeEnum()

GetStringValue

public String GetStringValue()
                      throws ExecutionSerializationException
Returns IProxyLocator#ToXML() or an empty string if the value is null

Specified by:
GetStringValue in interface IDataType
Returns:
the string representation of the value
Throws:
ExecutionSerializationException - A serialization error occurred
See Also:
IDataType.GetStringValue()

GetValue

public Object GetValue()
Returns the actual payload

Specified by:
GetValue in interface IDataType
Returns:
the value
See Also:
IDataType.GetValue()

SetStringValue

public void SetStringValue(String val)
                    throws ExecutionValidationException,
                           ExecutionSerializationException
If the supplied value is null or an empty string, null is set as the payload. Otherwise DataTypeUtils.GetValueAsProxyLocator(Object) is used

Specified by:
SetStringValue in interface IDataType
Parameters:
val - the value to set
Throws:
ExecutionValidationException - A validation error occurred
ExecutionSerializationException - A serialization error occurred
See Also:
IDataType.SetStringValue(java.lang.String)

SetValue

public void SetValue(Object Value)
              throws ExecutionValidationException
Sets the provided payload using DataTypeUtils.GetValueAsProxyLocator(Object) if the the provided value is not null and is either a String or an instance of a IProxyLocator. If the value is null, then null is set for the value

Specified by:
SetValue in interface IDataType
Parameters:
Value - the value to set
Throws:
ExecutionValidationException - A validation error occurred
See Also:
IDataType.SetValue(java.lang.Object)

FromXML

public void FromXML(String XML)
             throws ExecutionSerializationException
Description copied from interface: IDataType
Parses the xml serialization of the data type as retrieved by IDataType.ToXML()

Specified by:
FromXML in interface IDataType
Parameters:
XML - the XML serialization
Throws:
ExecutionSerializationException - A serialization error occurred

FromXML

public void FromXML(Element XML)
             throws ExecutionSerializationException
Description copied from interface: IDataType
Parses the xml serialization of the data type as retrieved by IDataType.ToXML()

Specified by:
FromXML in interface IDataType
Parameters:
XML - The root element of the serialization
Throws:
ExecutionSerializationException - A validation error occurred

ToXML

public String ToXML()
             throws ExecutionSerializationException
The payload of the data type is stored using IProxyLocator#ToXML() after escaping special characters using XMLUtils.DoReplaceSpecialCharachters(String)

Specified by:
ToXML in interface IDataType
Returns:
the XML serialization
Throws:
ExecutionSerializationException - a serialization error occurred
See Also:
IDataType.ToXML()


Copyright © 2012. All Rights Reserved.