com.tensegrity.composite.persistence
Class CompositeConstants

java.lang.Object
  extended bycom.tensegrity.composite.persistence.CompositeConstants

public class CompositeConstants
extends java.lang.Object

The class CompositeConstants combines all constant string tags for the creation and parsing of composite related xml and several static methods to extract primitives from or convert them to attributeLists.

Version:
$Id: CompositeConstants.java,v 1.97 2005/12/15 16:51:45 MichaelKegel Exp $
Author:
Gilles Iachelini

Nested Class Summary
static class CompositeConstants.ListBuilderElement
          Small helper class to encapsulate an AttributeList and a Tag String.
 
Field Summary
static java.lang.String ADJUSTMENT
          various String constants for xml export.
static java.lang.String ARCHEIGHT
          various String constants for xml export.
static java.lang.String ARCWIDTH
          various String constants for xml export.
static java.lang.String BACKGROUND
          various String constants for xml export.
static java.lang.String BEAMARROWLENGTH
          various String constants for xml export.
static java.lang.String BOUNDINGBOX
          Public tag for the bounding box.
static java.lang.String CLIPPING
          various String constants for xml export.
static java.lang.String COMPOSITE
          Public tag for a composite.
static java.lang.String COMPOSITEGROUP
          Public tag for a compositegroup.
static java.lang.String COMPOSITELABEL
          Public tag for a composite label.
static java.lang.String COMPOSITELINE
          Public tag for a compositeline.
static java.lang.String COMPOSITELINES
          Public tag for list of CompositeLinbes.
static java.lang.String COMPOSITES
          Public tag for list of Composites.
static java.lang.String COMPOSITESWIMLANE
          Public tag for the compositeswimlane
static java.lang.String COMPOSITESWIMLANEPOOL
          Public tag for the compositeswimlanepool
static java.lang.String COMPOSITETABLE
          Public tag for the compositetable
static java.lang.String COORDINATE
          various String constants for xml export.
static java.lang.String COORDINATES
          various String constants for xml export.
static java.lang.String EDITABLE
          various String constants for xml export.
static java.lang.String ENABLEFIRSTWORDWRAP
          various String constants for xml export.
static java.lang.String ENABLESHORTENING
          various String constants for xml export.
static java.lang.String ENABLEWORDWRAP
          various String constants for xml export.
static java.lang.String ENDCOORD
          various String constants for xml export.
static java.lang.String FOLDEDSTATE_GEOMETRY
          Public tag for the FoldedState attribute.
static java.lang.String GEOMETRYITEMNAME
          various String constants for xml export.
static java.lang.String GEOMETRYNAME
          various String constants for xml export.
static java.lang.String HORIZONTALALIGNMENT
          various String constants for xml export.
static java.lang.String HORIZONTALCONTENT
          public tags for horizontal content border.
static java.lang.String ISEDITABLE
          Public tag for the visibility of a label.
static java.lang.String ISVISIBLE
          Public tag for the visibility of a label.
static java.lang.String LABEL
          various String constants for xml export.
static java.lang.String LABELPOSITION
          various String constants for xml export.
static java.lang.String LENGTH
          various String constants for xml export.
static java.lang.String LINETYPE
          various String constants for xml export.
static java.lang.String POINTINTERACTION
          various String constants for xml export.
static java.lang.String RADIUSX
          various String constants for xml export.
static java.lang.String RADIUSY
          various String constants for xml export.
static java.lang.String REFCOORDINATES
          various String constants for xml export.
static java.lang.String SEGMENTTYPES
          various String constants for xml export.
static java.lang.String SIGN_ANCHOR
          various String constants for xml export.
static java.lang.String SIGN_PLACEMENT
          various String constants for xml export.
static java.lang.String SIZEADJUSTMENT
          Public tag for the size adjustment.
static java.lang.String STARTCOORD
          various String constants for xml export.
static java.lang.String STYLE
          various String constants for xml export.
static java.lang.String STYLEINFONAME
          various String constants for xml export.
static java.lang.String STYLEITEMNAME
          various String constants for xml export.
static java.lang.String STYLENAME
          various String constants for xml export.
static java.lang.String TEXTFORMATTER
          various String constants for xml export.
static java.lang.String TYPE
          Public tag for the Type field like in CompositeLine.
static java.lang.String TYPECOMPOSITELABEL
          various String constants for xml export.
static java.lang.String TYPEELLIPSE
          various String constants for xml export.
static java.lang.String TYPELABEL
          various String constants for xml export.
static java.lang.String TYPELINE
          various String constants for xml export.
static java.lang.String TYPEPOLYGON
          various String constants for xml export.
static java.lang.String TYPEPOLYLINE
          various String constants for xml export.
static java.lang.String TYPERECT
          various String constants for xml export.
static java.lang.String VERTICALCONTENT
          public tags for vertical content border.
static java.lang.String VERTICALIGNMENT
          various String constants for xml export.
static java.lang.String WEIGHT
          various String constants for xml export.
 
Method Summary
static void addFormat(AttributeCollection col, java.lang.String name, Format format)
          Adds the Format format to the given AttributeCollection, where name is the name of the newly created Attribute.
static void addTransform(Transform2D transform, AttributeList list)
          Adds the Transform2D transform to the given AttributeList.
static int[] getComponents(java.lang.String values)
          Method getComponents returns an array of int's from the given comma- separated values of the parameter string.
static CompositeConstants.ListBuilderElement getCompositeGroupListAndTag(AttributeList list)
          Returns a tuple containing the CompositeGroup AttributeList which is within the given AttributeList and the tag field of that specific Group.
static java.lang.String getCompositeGroupTag(CompositeGroup group)
          Returns an appropriate tag to be used when serializing Compositegroup instances.
static double[] getDoubleComponents(java.lang.String values)
          Method getComponents returns an array of int's from the given comma- separated values of the parameter string.
static CompositeSerializer getSerializer(Composite composite)
          Returns the appropriate Serializer for the given Composite.
static CompositeGroupSerializer getSerializer(CompositeGroup group)
          Returns the appropriate Serializer for a given CompositeGroup by checking against the current inheritance tree of CompositeGroup implementations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPOSITES

public static final java.lang.String COMPOSITES
Public tag for list of Composites.

See Also:
Constant Field Values

COMPOSITELINES

public static final java.lang.String COMPOSITELINES
Public tag for list of CompositeLinbes.

See Also:
Constant Field Values

COMPOSITE

public static final java.lang.String COMPOSITE
Public tag for a composite.

See Also:
Constant Field Values

COMPOSITELINE

public static final java.lang.String COMPOSITELINE
Public tag for a compositeline.

See Also:
Constant Field Values

COMPOSITELABEL

public static final java.lang.String COMPOSITELABEL
Public tag for a composite label.

See Also:
Constant Field Values

COMPOSITEGROUP

public static final java.lang.String COMPOSITEGROUP
Public tag for a compositegroup.

See Also:
Constant Field Values

COMPOSITESWIMLANE

public static final java.lang.String COMPOSITESWIMLANE
Public tag for the compositeswimlane

See Also:
Constant Field Values

COMPOSITESWIMLANEPOOL

public static final java.lang.String COMPOSITESWIMLANEPOOL
Public tag for the compositeswimlanepool

See Also:
Constant Field Values

COMPOSITETABLE

public static final java.lang.String COMPOSITETABLE
Public tag for the compositetable

See Also:
Constant Field Values

BOUNDINGBOX

public static final java.lang.String BOUNDINGBOX
Public tag for the bounding box.

See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
Public tag for the Type field like in CompositeLine.

See Also:
Constant Field Values

ISVISIBLE

public static final java.lang.String ISVISIBLE
Public tag for the visibility of a label.

See Also:
Constant Field Values

ISEDITABLE

public static final java.lang.String ISEDITABLE
Public tag for the visibility of a label.

See Also:
Constant Field Values

FOLDEDSTATE_GEOMETRY

public static final java.lang.String FOLDEDSTATE_GEOMETRY
Public tag for the FoldedState attribute.

See Also:
Constant Field Values

VERTICALCONTENT

public static final java.lang.String VERTICALCONTENT
public tags for vertical content border.

See Also:
Constant Field Values

HORIZONTALCONTENT

public static final java.lang.String HORIZONTALCONTENT
public tags for horizontal content border.

See Also:
Constant Field Values

SIZEADJUSTMENT

public static final java.lang.String SIZEADJUSTMENT
Public tag for the size adjustment.

See Also:
Constant Field Values

BACKGROUND

public static final java.lang.String BACKGROUND
various String constants for xml export.

See Also:
Constant Field Values

LABEL

public static final java.lang.String LABEL
various String constants for xml export.

See Also:
Constant Field Values

WEIGHT

public static final java.lang.String WEIGHT
various String constants for xml export.

See Also:
Constant Field Values

LABELPOSITION

public static final java.lang.String LABELPOSITION
various String constants for xml export.

See Also:
Constant Field Values

ADJUSTMENT

public static final java.lang.String ADJUSTMENT
various String constants for xml export.

See Also:
Constant Field Values

LENGTH

public static final java.lang.String LENGTH
various String constants for xml export.

See Also:
Constant Field Values

STYLE

public static final java.lang.String STYLE
various String constants for xml export.

See Also:
Constant Field Values

STYLENAME

public static final java.lang.String STYLENAME
various String constants for xml export.

See Also:
Constant Field Values

STYLEITEMNAME

public static final java.lang.String STYLEITEMNAME
various String constants for xml export.

See Also:
Constant Field Values

STYLEINFONAME

public static final java.lang.String STYLEINFONAME
various String constants for xml export.

See Also:
Constant Field Values

GEOMETRYNAME

public static final java.lang.String GEOMETRYNAME
various String constants for xml export.

See Also:
Constant Field Values

GEOMETRYITEMNAME

public static final java.lang.String GEOMETRYITEMNAME
various String constants for xml export.

See Also:
Constant Field Values

BEAMARROWLENGTH

public static final java.lang.String BEAMARROWLENGTH
various String constants for xml export.

See Also:
Constant Field Values

RADIUSX

public static final java.lang.String RADIUSX
various String constants for xml export.

See Also:
Constant Field Values

RADIUSY

public static final java.lang.String RADIUSY
various String constants for xml export.

See Also:
Constant Field Values

TEXTFORMATTER

public static final java.lang.String TEXTFORMATTER
various String constants for xml export.

See Also:
Constant Field Values

HORIZONTALALIGNMENT

public static final java.lang.String HORIZONTALALIGNMENT
various String constants for xml export.

See Also:
Constant Field Values

VERTICALIGNMENT

public static final java.lang.String VERTICALIGNMENT
various String constants for xml export.

See Also:
Constant Field Values

LINETYPE

public static final java.lang.String LINETYPE
various String constants for xml export.

See Also:
Constant Field Values

STARTCOORD

public static final java.lang.String STARTCOORD
various String constants for xml export.

See Also:
Constant Field Values

ENDCOORD

public static final java.lang.String ENDCOORD
various String constants for xml export.

See Also:
Constant Field Values

COORDINATES

public static final java.lang.String COORDINATES
various String constants for xml export.

See Also:
Constant Field Values

REFCOORDINATES

public static final java.lang.String REFCOORDINATES
various String constants for xml export.

See Also:
Constant Field Values

COORDINATE

public static final java.lang.String COORDINATE
various String constants for xml export.

See Also:
Constant Field Values

SEGMENTTYPES

public static final java.lang.String SEGMENTTYPES
various String constants for xml export.

See Also:
Constant Field Values

ARCWIDTH

public static final java.lang.String ARCWIDTH
various String constants for xml export.

See Also:
Constant Field Values

ARCHEIGHT

public static final java.lang.String ARCHEIGHT
various String constants for xml export.

See Also:
Constant Field Values

TYPEELLIPSE

public static final java.lang.String TYPEELLIPSE
various String constants for xml export.

See Also:
Constant Field Values

TYPELABEL

public static final java.lang.String TYPELABEL
various String constants for xml export.

See Also:
Constant Field Values

TYPECOMPOSITELABEL

public static final java.lang.String TYPECOMPOSITELABEL
various String constants for xml export.

See Also:
Constant Field Values

TYPELINE

public static final java.lang.String TYPELINE
various String constants for xml export.

See Also:
Constant Field Values

TYPEPOLYGON

public static final java.lang.String TYPEPOLYGON
various String constants for xml export.

See Also:
Constant Field Values

TYPEPOLYLINE

public static final java.lang.String TYPEPOLYLINE
various String constants for xml export.

See Also:
Constant Field Values

TYPERECT

public static final java.lang.String TYPERECT
various String constants for xml export.

See Also:
Constant Field Values

POINTINTERACTION

public static final java.lang.String POINTINTERACTION
various String constants for xml export.

See Also:
Constant Field Values

SIGN_ANCHOR

public static final java.lang.String SIGN_ANCHOR
various String constants for xml export.

See Also:
Constant Field Values

SIGN_PLACEMENT

public static final java.lang.String SIGN_PLACEMENT
various String constants for xml export.

See Also:
Constant Field Values

EDITABLE

public static final java.lang.String EDITABLE
various String constants for xml export.

See Also:
Constant Field Values

CLIPPING

public static final java.lang.String CLIPPING
various String constants for xml export.

See Also:
Constant Field Values

ENABLESHORTENING

public static final java.lang.String ENABLESHORTENING
various String constants for xml export.

See Also:
Constant Field Values

ENABLEWORDWRAP

public static final java.lang.String ENABLEWORDWRAP
various String constants for xml export.

See Also:
Constant Field Values

ENABLEFIRSTWORDWRAP

public static final java.lang.String ENABLEFIRSTWORDWRAP
various String constants for xml export.

See Also:
Constant Field Values
Method Detail

addTransform

public static void addTransform(Transform2D transform,
                                AttributeList list)
                         throws AttributeException,
                                ConstraintViolationException
Adds the Transform2D transform to the given AttributeList.

Parameters:
transform - the Transform2D to add to the list.
list - the AttributeList to add the transform to.
Throws:
AttributeException - thrown if #makeAttribute(String, Object) throws an exception.
ConstraintViolationException - thrown if #makeAttribute(String, Object) throws an exception.

getDoubleComponents

public static double[] getDoubleComponents(java.lang.String values)
Method getComponents returns an array of int's from the given comma- separated values of the parameter string.

Parameters:
values - a String with comma separated integers
Returns:
int[] a resulting array with the int's from the string.

getComponents

public static int[] getComponents(java.lang.String values)
Method getComponents returns an array of int's from the given comma- separated values of the parameter string.

Parameters:
values - a String with comma separated integers
Returns:
int[] a resulting array with the int's from the string.

addFormat

public static void addFormat(AttributeCollection col,
                             java.lang.String name,
                             Format format)
                      throws AttributeException,
                             ConstraintViolationException
Adds the Format format to the given AttributeCollection, where name is the name of the newly created Attribute.

Parameters:
col - the AttributeCollection to add an Attribute to.
name - the name of the Attribute.
format - the Format to add.
Throws:
IllegalAttributeException - delegated from the #makeAttribute(String, Object) call.
ConstraintViolationException - delegated from the #makeAttribute(String, Object) call.
AttributeException

getSerializer

public static CompositeGroupSerializer getSerializer(CompositeGroup group)
Returns the appropriate Serializer for a given CompositeGroup by checking against the current inheritance tree of CompositeGroup implementations. This method considers CompositeGroup, VisualSubgraph, CompositeSwimLane and CompositeSwimLanePool. A special Serializer is returned for SwimLane and SwimLanePool.

Parameters:
group - the CompositeGroup to retrieve a serializer for.
Returns:
the appropriate CompositeGroupSerializer.

getSerializer

public static CompositeSerializer getSerializer(Composite composite)
Returns the appropriate Serializer for the given Composite. This method considers CompositeLabel and Composites.

Parameters:
composite - the Compsoite to retrieve a Serializer for.
Returns:
CompositeSerializer the appropriate Serializer.

getCompositeGroupTag

public static java.lang.String getCompositeGroupTag(CompositeGroup group)
Returns an appropriate tag to be used when serializing Compositegroup instances.

Parameters:
group - the Compositegroup to retrieve a tag for.
Returns:
the appropriate tag for the given CompositeGroup.

getCompositeGroupListAndTag

public static CompositeConstants.ListBuilderElement getCompositeGroupListAndTag(AttributeList list)
                                                                         throws BuildException
Returns a tuple containing the CompositeGroup AttributeList which is within the given AttributeList and the tag field of that specific Group.

Parameters:
list - the AttributeList.
Returns:
the corresponding ListBuilderElement.
Throws:
BuildException - thrown if the called BuilderUtilities methods throw an exception.


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