com.tensegrity.generic.attribute
Class AttributePersistenceUtilities

java.lang.Object
  extended bycom.tensegrity.generic.attribute.AttributePersistenceUtilities

public class AttributePersistenceUtilities
extends java.lang.Object

The AttributePersistenceUtilities class provides some functionalities used for serializing and building attributes.

Version:
$Id: AttributePersistenceUtilities.java,v 1.6 2006/01/26 17:15:08 MichaelKegel Exp $
Author:
MKegel

Field Summary
static java.lang.String CUSTOM_ATTGENERATORKEY
          Constants holding unique names for the various custom attribute properties.
static java.lang.String CUSTOM_ATTNAME
          Constants holding unique names for the various custom attribute properties.
static java.lang.String CUSTOM_ATTREPRESENTATION
          Constants holding unique names for the various custom attribute properties.
static java.lang.String CUSTOM_ATTSETNAME
          Constants holding unique names for the various custom attribute properties.
static java.lang.String CUSTOM_SETNAME
          Constants holding unique names for the various custom attribute properties.
 
Method Summary
static AttributeList convertCustomAttributes(AttributeFactory aFactory, AttributeSet customAttributes)
          Converts the custom attributes within the AttributeSet given by customAttributes into an AttributeList that can be serialized.
static AttributeSet createCustomAttributes(AttributeList graphobjectlist)
          Creates an AttributeSet holding custom Attributes from the AttributeList of serialized Attributes given by graphobjectlist.
static Attribute serializeAttribute(Attribute attribute)
          Adds the given Attribute to an AttributeSet and then wraps it in an Attribute so that it's ready for serialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM_SETNAME

public static final java.lang.String CUSTOM_SETNAME
Constants holding unique names for the various custom attribute properties.

See Also:
Constant Field Values

CUSTOM_ATTSETNAME

public static final java.lang.String CUSTOM_ATTSETNAME
Constants holding unique names for the various custom attribute properties.

See Also:
Constant Field Values

CUSTOM_ATTNAME

public static final java.lang.String CUSTOM_ATTNAME
Constants holding unique names for the various custom attribute properties.

See Also:
Constant Field Values

CUSTOM_ATTREPRESENTATION

public static final java.lang.String CUSTOM_ATTREPRESENTATION
Constants holding unique names for the various custom attribute properties.

See Also:
Constant Field Values

CUSTOM_ATTGENERATORKEY

public static final java.lang.String CUSTOM_ATTGENERATORKEY
Constants holding unique names for the various custom attribute properties.

See Also:
Constant Field Values
Method Detail

convertCustomAttributes

public static final AttributeList convertCustomAttributes(AttributeFactory aFactory,
                                                          AttributeSet customAttributes)
Converts the custom attributes within the AttributeSet given by customAttributes into an AttributeList that can be serialized.

Parameters:
aFactory - an instance of an AttributeFactory
customAttributes - the AttributeSet that holds the custom attributes currently assigned to the Node
Returns:
AttributeList the AttributeList with the custom attributes of the Node

createCustomAttributes

public static final AttributeSet createCustomAttributes(AttributeList graphobjectlist)
                                                 throws BuildException
Creates an AttributeSet holding custom Attributes from the AttributeList of serialized Attributes given by graphobjectlist.

Parameters:
graphobjectlist - the AttributeList of serialized graph model object.
Returns:
the AttributeSet that contains the deserialized custom Attributes.
Throws:
BuildException, - if an error occurs.
BuildException

serializeAttribute

public static final Attribute serializeAttribute(Attribute attribute)
Adds the given Attribute to an AttributeSet and then wraps it in an Attribute so that it's ready for serialization.

Parameters:
attribute - the Attribute to serialize.
Returns:
an Attribute holding an AttributeSet.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.