org.eclipse.higgins.user.idas.util
Class IdasUtils

java.lang.Object
  extended by org.eclipse.higgins.user.idas.util.IdasUtils

public final class IdasUtils
extends Object

Class with helper routines for IdAS.

Author:
Pilipenko

Method Summary
static Object getSimpleValueData(org.eclipse.higgins.idas.api.IHasAttributes ha, URI attribute)
           
static byte[] getSimpleValueDataAsByteArray(org.eclipse.higgins.idas.api.IHasAttributes ha, URI attribure)
           
static ByteBuffer getSimpleValueDataAsByteBuffer(org.eclipse.higgins.idas.api.IHasAttributes ha, URI attribute)
           
static Map loadComplexValueMap(org.eclipse.higgins.idas.api.IAttribute complexAttr, URI keyAttr, URI valueAttr)
           
static List loadSimpleValueList(org.eclipse.higgins.idas.api.IAttribute att)
           
static Set loadSimpleValueSet(org.eclipse.higgins.idas.api.IAttribute att)
           
static void saveComplexValueMap(org.eclipse.higgins.idas.api.IAttribute complexAttr, URI keyAttr, URI valueAttr, Map map)
           
static void saveSimpleValueCollection(org.eclipse.higgins.idas.api.IAttribute att, Collection collection)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSimpleValueData

public static Object getSimpleValueData(org.eclipse.higgins.idas.api.IHasAttributes ha,
                                        URI attribute)
                                 throws org.eclipse.higgins.idas.api.IdASException
Parameters:
ha - IHasAttributes instance
attribute - URI to get a value from
Returns:
Object
Throws:
org.eclipse.higgins.idas.api.IdASException - if some errors occurs during getting data

getSimpleValueDataAsByteBuffer

public static ByteBuffer getSimpleValueDataAsByteBuffer(org.eclipse.higgins.idas.api.IHasAttributes ha,
                                                        URI attribute)
                                                 throws org.eclipse.higgins.idas.api.IdASException
Parameters:
ha - IHasAttributes instance
attribute - URI to get a value from
Returns:
ByteBuffer
Throws:
org.eclipse.higgins.idas.api.IdASException - if some errors occurs during getting data

getSimpleValueDataAsByteArray

public static byte[] getSimpleValueDataAsByteArray(org.eclipse.higgins.idas.api.IHasAttributes ha,
                                                   URI attribure)
                                            throws org.eclipse.higgins.idas.api.IdASException
Parameters:
ha - IHasAttributes instance
attribure - URI to get a value from
Returns:
byte[]
Throws:
org.eclipse.higgins.idas.api.IdASException - if some errors occurs during getting data

saveSimpleValueCollection

public static void saveSimpleValueCollection(org.eclipse.higgins.idas.api.IAttribute att,
                                             Collection collection)
                                      throws org.eclipse.higgins.idas.api.IdASException
Parameters:
att - IAttribute to which store values collection
collection - values to be stored
Throws:
org.eclipse.higgins.idas.api.IdASException - if some errors occurs during saving data

loadSimpleValueList

public static List loadSimpleValueList(org.eclipse.higgins.idas.api.IAttribute att)
                                throws org.eclipse.higgins.idas.api.IdASException
Parameters:
att - IAttribute from which get the values collection
Returns:
List
Throws:
org.eclipse.higgins.idas.api.IdASException - if some errors occurs during getting data

loadSimpleValueSet

public static Set loadSimpleValueSet(org.eclipse.higgins.idas.api.IAttribute att)
                              throws org.eclipse.higgins.idas.api.IdASException
Parameters:
att - IAttribute from which get the values collection
Returns:
Set
Throws:
org.eclipse.higgins.idas.api.IdASException - if some errors occurs during getting data

saveComplexValueMap

public static void saveComplexValueMap(org.eclipse.higgins.idas.api.IAttribute complexAttr,
                                       URI keyAttr,
                                       URI valueAttr,
                                       Map map)
                                throws org.eclipse.higgins.idas.api.IdASException
Parameters:
complexAttr - attribute with complex values to which to store data
keyAttr - simple attribute in the complexAttr containing key for map
valueAttr - simple attribute in the complexAttr containing value for map
map - containing the data to store
Throws:
org.eclipse.higgins.idas.api.IdASException - IdASException if any idas error occurs

loadComplexValueMap

public static Map loadComplexValueMap(org.eclipse.higgins.idas.api.IAttribute complexAttr,
                                      URI keyAttr,
                                      URI valueAttr)
                               throws org.eclipse.higgins.idas.api.IdASException
Parameters:
complexAttr - attribute with complex values from which to load data
keyAttr - simple attribute in the complexAttr containing key for map
valueAttr - simple attribute in the complexAttr containing value for map
Returns:
Map with loaded data
Throws:
org.eclipse.higgins.idas.api.IdASException - if any idas error occurs