com.tensegrity.composite.geometry.persistence
Class GeometryDescriptorSerializer

java.lang.Object
  extended bycom.tensegrity.composite.geometry.persistence.GeometryDescriptorSerializer
All Implemented Interfaces:
Serializer

public class GeometryDescriptorSerializer
extends java.lang.Object
implements Serializer

The GeometryDescriptorSerializer is responsible to convert a GeometryDescriptor into an AttributeList.

Version:
$Id: GeometryDescriptorSerializer.java,v 1.21 2005/07/18 10:35:31 MichaelKegel Exp $
Author:
MichaelKegel, Gilles Iachelini

Constructor Summary
GeometryDescriptorSerializer(GeometryDescriptor descriptor)
          Constructor for GeometryDescriptorSerializer.
 
Method Summary
static java.lang.String getTypeName(int type)
          This method returns the matching string constant to a given GeometryDescriptorType constant.
 AttributeList serialize()
          Translates the information of the object to be serialized into an AttributeList.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryDescriptorSerializer

public GeometryDescriptorSerializer(GeometryDescriptor descriptor)
Constructor for GeometryDescriptorSerializer.

Parameters:
descriptor - the GeometryDescriptor to serialize.
Method Detail

serialize

public AttributeList serialize()
                        throws SerializeException
Description copied from interface: Serializer
Translates the information of the object to be serialized into an AttributeList.

Specified by:
serialize in interface Serializer
Returns:
the list of translated information.
Throws:
SerializeException - is thrown whenever an error occurs while serializing the given object.

getTypeName

public static final java.lang.String getTypeName(int type)
                                          throws SerializeException
This method returns the matching string constant to a given GeometryDescriptorType constant.

Parameters:
type - the integer constant of a GeometryDescriptorType.
Returns:
the GeometryDescriptorType constant as string.
Throws:
SerializeException - thrown if the type is unknown


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