Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.jboogie.model_management

Class DiFactory

com.gentleware.jboogie.model_management.DiFactory

public class DiFactory


Factory methods to create graph model (DI) element (structures).

The factory ensures that Points, Dimensions and Strings held by model elements are non-null.

Created : kelvin, 2002-12-10 11:01:00


 Association Summary
private DiagramInterchangePackage  _diPackage
 
private Project  _project
 
public ProjectImpl  projectImpl
 
arrow_up
 

 Constructor Summary
public   DiFactory(Project project)
Creates a ModelElementFactory  
arrow_up
 

 Method Summary
public double   calculateHorizontalCenterLeft(double containerWidth, double containedWidth)
Calculate the left position of a rectangle which horizontically centered rectangle. 
public BezierPoint   createBezierPoint(double baseX, double baseY, double controlAX, double controlAY, double controlBX, double controlBY)
Create a bezier point Because BezierPoint is a model (MDR) class it has reference semantic, so do not reuse the same instance. 
public BezierPoint   createBezierPoint(Point base, Point controlA, Point controlB)
Create a bezier point Because BezierPoint is a model (MDR) class it has reference semantic, so do not reuse the same instance. 
public BezierPoint   createBezierPoint(Point base)
 
public BezierPoint   createBezierPoint(double x, double y)
 
public BezierPoint   createBezierPoint(Point2D value)
 
public EllipseImpl   createCircle(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radius)
 
public DiagramImpl   createDiagram(DiId id, RefObject namespace, SimpleTypeInfo typeInfo)
Creates a diagram with default attribute values: null container, visible, empty (non-null) name, zoom 1, position and viewport at origin, default size  
public DiagramImpl   createDiagram(DiId id, RefObject namespace, SimpleTypeInfo typeInfo, GraphElement container)
Creates a diagram that has the given container and default attribute values: visible, empty (non-null) name, zoom 1, position and viewport at origin, default size  
public DiagramImpl   createDiagram(DiId id, RefObject namespace, SimpleTypeInfo typeInfo, GraphElement container, String name)
Creates a diagram with the given name and other attributes set to defaults: visible, position and viewport at origin, zoom 1, defbault size  
public DiagramImpl   createDiagram(DiId id, RefObject namespace, SimpleTypeInfo typeInfo, GraphElement container, String name, double width, double height)
Creates a diagram with the given name and size and other attributes set to defaults: visible, position and viewport at origin, zoom 1  
public DiagramImpl   createDiagram(DiId id, RefObject namespace, SimpleTypeInfo typeInfo, GraphElement container, String name, Dimension size)
Creates a diagram with the given name and size and other attributes set to defaults: visible, position and viewport at origin, zoom 1  
public Dimension   createDimension(double width, double height)
Create a dimension object. 
public EllipseImpl   createEllipse(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radiusX, double radiusY, double rotation, double startAngle, double endAngle)
 
public EllipseImpl   createEllipse(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radiusX, double radiusY, double rotation, double startAngle)
 
public EllipseImpl   createEllipse(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radiusX, double radiusY, double rotation)
 
public EllipseImpl   createEllipse(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radiusX, double radiusY)
 
public EllipseImpl   createEllipse(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radius)
 
public GraphConnectorImpl   createGraphConnector(DiId id, GraphElement graphElement)
Creates a connector at a graphElement. 
public GraphConnectorImpl   createGraphConnector(DiId id, GraphElement graphElement, double x, double y)
Creates a connector, i.e. 
public GraphConnectorImpl   createGraphConnector(DiId id, GraphElement graphElement, Point position)
Creates a connector, i.e. 
public GraphEdgeImpl   createGraphEdge(DiId id, GraphElement container)
Creates an edge with default attributes: visible, positon at the origin and no way points  
public GraphEdgeImpl   createGraphEdge(DiId id, GraphElement container, SimpleTypeInfo simpleTypeInfo)
 
public GraphEdgeImpl   createGraphEdge(DiId id, GraphElement container, RefObject modelElement)
 
public GraphNodeImpl   createGraphNode(DiId id, RefObject element)
Creates a node with default properties: visible, position at origin, zero dimension  
public GraphNodeImpl   createGraphNode(DiId id, SimpleTypeInfo typeInfo)
 
public GraphNodeImpl   createGraphNode(DiId id, GraphElement container, SimpleTypeInfo typeInfo)
Creates a node with default properties: visible, position at origin, zero dimension  
public GraphNodeImpl   createGraphNode(DiId id, RefObject element, SemanticModelBridgePresentation presentation)
Creates a node with default properties: visible, position at origin, zero dimension  
public GraphNodeImpl   createGraphNode(DiId id, GraphElement container)
Creates a node with default properties: visible, position at origin, zero dimension  
public GraphNodeImpl   createGraphNode(DiId id, GraphElement container, double x, double y, double width, double height)
Creates a node that is initially visible  
public GraphNodeImpl   createGraphNode(DiId id, GraphElement container, Point position, Dimension size)
Creates a node that is initially visible  
public GraphNodeImpl   createGraphNode(DiId id, GraphElement container, RefObject element)
 
public GraphNodeImpl   createGraphNode(DiId id, GraphElement container, RefObject element, SemanticModelBridgePresentation presentation)
 
public Point   createPoint(double x, double y)
Create a point Because Point is a model (MDR) class it has reference semantic, so do not reuse the same instance. 
public Point   createPoint(Point2D value)
Create a point Because Point is a model (MDR) class it has reference semantic, so do not reuse the same instance. 
public PolylineImpl   createPolyline(DiId polylineDiId, GraphElement container, Point2D[] waypoints, boolean closed)
 
public Property   createProperty(DiagramElement diagramElement, String key, String value)
Creates a property and attaches it to a diagram element  
public Property   createProperty(String key, String value)
Creates a property  
public PolylineImpl   createRectangle(DiId rectangleDiId, GraphElement container, double x, double y, double width, double height)
 
private void   createSimpleTypeInfo(GraphElement graphElement, SimpleTypeInfo typeInfo)
 
public SemanticModelBridge   createSmElement(GraphElementImpl graphElement, RefObject model)
 
public SemanticModelBridge   createSmElement(GraphElementImpl graphElement, RefObject model, SemanticModelBridgePresentation presentation)
Create an UML 1 semantic model bridge. 
public TextElementImpl   createTextElement(DiId id, GraphElement container)
Creates a text element that is initially visible using an empty string  
public TextElementImpl   createTextElement(DiId id, GraphElement container, String text)
Creates a text element that is initially visible using the given text  
public GraphNodeImpl   createTextElementNode(DiId id, GraphElement container, SimpleTypeInfo typeInfo, DiId textId)
 
public GraphNodeImpl   createTextElementNode(DiId id, GraphElement container, RefObject element, String text, DiId textId)
Produces a TextElement with a Uml14 model bridge. 
public GraphNodeImpl   createTextElementNode(DiId id, GraphElement container, SimpleTypeInfo typeInfo, String text, DiId textId)
Produces a TextElement with a simple semantic model bridge. 
arrow_up
 

Tagged Values
static false
gentleware-imported-line-number 26
gentleware-imported-package-statement-line-number 5
 

 Association Detail

_diPackage

private DiagramInterchangePackage _diPackage

arrow_up


_project

private Project _project

arrow_up


projectImpl

public ProjectImpl projectImpl

arrow_up
 Constructor Detail

DiFactory

public com.gentleware.jboogie.model_management.DiFactory DiFactory(Project project)


Creates a ModelElementFactory  
Parameters:
project - the current project.
Returns:
arrow_up
 Method Detail

calculateHorizontalCenterLeft

public double calculateHorizontalCenterLeft(double containerWidth, double containedWidth)


Calculate the left position of a rectangle which horizontically centered rectangle.  
Parameters:
containerWidth -
containedWidth -
Returns:
The left position.
arrow_up


createBezierPoint

public BezierPoint createBezierPoint(double baseX, double baseY, double controlAX, double controlAY, double controlBX, double controlBY)


Create a bezier point Because BezierPoint is a model (MDR) class it has reference semantic, so do not reuse the same instance.  
Parameters:
baseX -
baseY -
controlAX -
controlAY -
controlBX -
controlBY -
Returns:
a new bezier point
arrow_up


createBezierPoint

public BezierPoint createBezierPoint(Point base, Point controlA, Point controlB)


Create a bezier point Because BezierPoint is a model (MDR) class it has reference semantic, so do not reuse the same instance.  
Parameters:
base - Must not be null.
controlA - Must not be null.
controlB - Must not be null.
Returns:
a new bezier point
arrow_up


createBezierPoint

public BezierPoint createBezierPoint(Point base)

Parameters:
base -
Returns:
arrow_up


createBezierPoint

public BezierPoint createBezierPoint(double x, double y)

Parameters:
x -
y -
Returns:
arrow_up


createBezierPoint

public BezierPoint createBezierPoint(Point2D value)

Parameters:
value -
Returns:
arrow_up


createCircle

public EllipseImpl createCircle(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radius)

Parameters:
ellipseDiId -
container -
centerX -
centerY -
radius -
Returns:
arrow_up


createDiagram

public DiagramImpl createDiagram(DiId id, RefObject namespace, SimpleTypeInfo typeInfo)


Creates a diagram with default attribute values: null container, visible, empty (non-null) name, zoom 1, position and viewport at origin, default size  
Parameters:
id -
namespace -
typeInfo -
Returns:
a new diagram
arrow_up


createDiagram

public DiagramImpl createDiagram(DiId id, RefObject namespace, SimpleTypeInfo typeInfo, GraphElement container)


Creates a diagram that has the given container and default attribute values: visible, empty (non-null) name, zoom 1, position and viewport at origin, default size  
Parameters:
id -
namespace -
typeInfo -
container - the container that the diagram is in
Returns:
a new diagram
arrow_up


createDiagram

public DiagramImpl createDiagram(DiId id, RefObject namespace, SimpleTypeInfo typeInfo, GraphElement container, String name)


Creates a diagram with the given name and other attributes set to defaults: visible, position and viewport at origin, zoom 1, defbault size  
Parameters:
id -
namespace -
typeInfo -
container - the container for this diagram. Can be null.
name - name of the new diagram. Must not be null.
Returns:
a new diagram
arrow_up


createDiagram

public DiagramImpl createDiagram(DiId id, RefObject namespace, SimpleTypeInfo typeInfo, GraphElement container, String name, double width, double height)


Creates a diagram with the given name and size and other attributes set to defaults: visible, position and viewport at origin, zoom 1  
Parameters:
id -
namespace -
typeInfo -
container - the container for this diagram. Can be null.
name - name of the new diagram. Must not be null.
width -
height -
Returns:
a new diagram
arrow_up


createDiagram

public DiagramImpl createDiagram(DiId id, RefObject namespace, SimpleTypeInfo typeInfo, GraphElement container, String name, Dimension size)


Creates a diagram with the given name and size and other attributes set to defaults: visible, position and viewport at origin, zoom 1  
Parameters:
id -
namespace -
typeInfo -
container - the container for this diagram. Can be null.
name - name of the new diagram. Must not be null.
size - size of the new diagram. Must not be null.
Returns:
a new diagram
arrow_up


createDimension

public Dimension createDimension(double width, double height)


Create a dimension object. Because Dimension is a model (MDR) class it has reference semantic, so do not reuse the same instance.  
Parameters:
width -
height -
Returns:
a new dimension
arrow_up


createEllipse

public EllipseImpl createEllipse(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radiusX, double radiusY, double rotation, double startAngle, double endAngle)

Parameters:
ellipseDiId -
container -
centerX -
centerY -
radiusX -
radiusY -
rotation -
startAngle -
endAngle -
Returns:
arrow_up


createEllipse

public EllipseImpl createEllipse(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radiusX, double radiusY, double rotation, double startAngle)

Parameters:
ellipseDiId -
container -
centerX -
centerY -
radiusX -
radiusY -
rotation -
startAngle -
Returns:
arrow_up


createEllipse

public EllipseImpl createEllipse(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radiusX, double radiusY, double rotation)

Parameters:
ellipseDiId -
container -
centerX -
centerY -
radiusX -
radiusY -
rotation -
Returns:
arrow_up


createEllipse

public EllipseImpl createEllipse(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radiusX, double radiusY)

Parameters:
ellipseDiId -
container -
centerX -
centerY -
radiusX -
radiusY -
Returns:
arrow_up


createEllipse

public EllipseImpl createEllipse(DiId ellipseDiId, GraphElement container, double centerX, double centerY, double radius)

Parameters:
ellipseDiId -
container -
centerX -
centerY -
radius -
Returns:
arrow_up


createGraphConnector

public GraphConnectorImpl createGraphConnector(DiId id, GraphElement graphElement)


Creates a connector at a graphElement.  
Parameters:
id -
graphElement -
Returns:
arrow_up


createGraphConnector

public GraphConnectorImpl createGraphConnector(DiId id, GraphElement graphElement, double x, double y)


Creates a connector, i.e. an point within a graph element where an edge can connect  
Parameters:
id -
graphElement - the graph element that holds the connector
x -
y -
Returns:
a new connector
arrow_up


createGraphConnector

public GraphConnectorImpl createGraphConnector(DiId id, GraphElement graphElement, Point position)


Creates a connector, i.e. an point within a graph element where an edge can connect  
Parameters:
id -
graphElement - the graph element that holds the connector
position - the position of the connector relative to the graph element's position
Returns:
a new connector
arrow_up


createGraphEdge

public GraphEdgeImpl createGraphEdge(DiId id, GraphElement container)


Creates an edge with default attributes: visible, positon at the origin and no way points  
Parameters:
id -
container - the container for the new edge. Must not be null.
Returns:
a new graph edge that is visible, with zero x and y, and no way points
arrow_up


createGraphEdge

public GraphEdgeImpl createGraphEdge(DiId id, GraphElement container, SimpleTypeInfo simpleTypeInfo)

Parameters:
id -
container -
simpleTypeInfo -
Returns:
arrow_up


createGraphEdge

public GraphEdgeImpl createGraphEdge(DiId id, GraphElement container, RefObject modelElement)

Parameters:
id -
container -
modelElement -
Returns:
arrow_up


createGraphNode

public GraphNodeImpl createGraphNode(DiId id, RefObject element)


Creates a node with default properties: visible, position at origin, zero dimension  
Parameters:
id -
element -
Returns:
a new graph node that is visible, with zero x, y, width and height
arrow_up


createGraphNode

public GraphNodeImpl createGraphNode(DiId id, SimpleTypeInfo typeInfo)

Parameters:
id -
typeInfo -
Returns:
arrow_up


createGraphNode

public GraphNodeImpl createGraphNode(DiId id, GraphElement container, SimpleTypeInfo typeInfo)


Creates a node with default properties: visible, position at origin, zero dimension  
Parameters:
id -
container -
typeInfo -
Returns:
a new graph node that is visible, with zero x, y, width and height
arrow_up


createGraphNode

public GraphNodeImpl createGraphNode(DiId id, RefObject element, SemanticModelBridgePresentation presentation)


Creates a node with default properties: visible, position at origin, zero dimension  
Parameters:
id -
element -
presentation -
Returns:
a new graph node that is visible, with zero x, y, width and height
arrow_up


createGraphNode

public GraphNodeImpl createGraphNode(DiId id, GraphElement container)


Creates a node with default properties: visible, position at origin, zero dimension  
Parameters:
id -
container - the container for this graph node. Must not be null.
Returns:
a new graph node that is visible, with zero x, y, width and height
arrow_up


createGraphNode

public GraphNodeImpl createGraphNode(DiId id, GraphElement container, double x, double y, double width, double height)


Creates a node that is initially visible  
Parameters:
id -
container - the container for this graph node. Must not be null.
x -
y -
width -
height -
Returns:
a new graph node that is visible and has the given container, position and size
arrow_up


createGraphNode

public GraphNodeImpl createGraphNode(DiId id, GraphElement container, Point position, Dimension size)


Creates a node that is initially visible  
Parameters:
id -
container - the container for this graph node. Must not be null. @todo: must not be null!? even this class has several calls to this method with a null container!!
position - the position of the new node relative to the container's position. Must not be null.
size - the size of the new node. Must not be null.
Returns:
a new graph node that is visible and has the given container, position and size
arrow_up


createGraphNode

public GraphNodeImpl createGraphNode(DiId id, GraphElement container, RefObject element)

Parameters:
id -
container -
element -
Returns:
arrow_up


createGraphNode

public GraphNodeImpl createGraphNode(DiId id, GraphElement container, RefObject element, SemanticModelBridgePresentation presentation)

Parameters:
id -
container -
element -
presentation -
Returns:
arrow_up


createPoint

public Point createPoint(double x, double y)


Create a point Because Point is a model (MDR) class it has reference semantic, so do not reuse the same instance.  
Parameters:
x -
y -
Returns:
a new point
arrow_up


createPoint

public Point createPoint(Point2D value)


Create a point Because Point is a model (MDR) class it has reference semantic, so do not reuse the same instance.  
Parameters:
value -
Returns:
a new point
arrow_up


createPolyline

public PolylineImpl createPolyline(DiId polylineDiId, GraphElement container, Point2D[] waypoints, boolean closed)

Parameters:
polylineDiId -
container -
waypoints -
closed -
Returns:
arrow_up


createProperty

public Property createProperty(DiagramElement diagramElement, String key, String value)


Creates a property and attaches it to a diagram element  
Parameters:
diagramElement - diagram eleent that will hold the property
key - the property's key. Must not be null.
value - the property's value. Must not be null.
Returns:
a new property with the given key and value
arrow_up


createProperty

public Property createProperty(String key, String value)


Creates a property  
Parameters:
key - the property's key. Must not be null.
value - the property's value. Must not be null.
Returns:
a new property with the given key and value
arrow_up


createRectangle

public PolylineImpl createRectangle(DiId rectangleDiId, GraphElement container, double x, double y, double width, double height)

Parameters:
rectangleDiId -
container -
x -
y -
width -
height -
Returns:
arrow_up


createSimpleTypeInfo

private void createSimpleTypeInfo(GraphElement graphElement, SimpleTypeInfo typeInfo)

Parameters:
graphElement -
typeInfo -
arrow_up


createSmElement

public SemanticModelBridge createSmElement(GraphElementImpl graphElement, RefObject model)

Parameters:
graphElement -
model -
Returns:
arrow_up


createSmElement

public SemanticModelBridge createSmElement(GraphElementImpl graphElement, RefObject model, SemanticModelBridgePresentation presentation)


Create an UML 1 semantic model bridge.

SemanticModelBridge.presentation
To achieve the standard visualization of an element, presentation must be set to "", the empty string. For a non-standard treatment, it must be set to "UserDefined". This means that it is shown exactly as specified through the DiagramElements contained in the GraphElement associated with the Element. As most elements have exactly one standard presentation, the following table lists only those explicitly which have more than one. The others are collected under the term [Single Presentation].

ElementSemanticModelBridge.presentation
[Single Presentation]"" (Default), "UserDefined"
Actor"" = "Stickman", "Rectangle", "UserDefined"
Interface"" = "Rectangle", "Circle", "Lollipop", "UserDefined"
Permissible values for SemanticModelBridge.presentation
 

Parameters:
graphElement - The graphElement which owns a bridge to the semantic model. May be null.
model - The semantic model element.
presentation - The presentation which is to be used for this model element.
Returns:
arrow_up


createTextElement

public TextElementImpl createTextElement(DiId id, GraphElement container)


Creates a text element that is initially visible using an empty string  
Parameters:
id -
container - the container for the new text element. Must not be null.
Returns:
a new text element that is visible and has an empty string
arrow_up


createTextElement

public TextElementImpl createTextElement(DiId id, GraphElement container, String text)


Creates a text element that is initially visible using the given text  
Parameters:
id -
container - the container for the new text element. Must not be null.
text - text that this element represents. Must not be null.
Returns:
a new text element that is visible and has the given text
arrow_up


createTextElementNode

public GraphNodeImpl createTextElementNode(DiId id, GraphElement container, SimpleTypeInfo typeInfo, DiId textId)

Parameters:
id -
container -
typeInfo -
textId -
Returns:
arrow_up


createTextElementNode

public GraphNodeImpl createTextElementNode(DiId id, GraphElement container, RefObject element, String text, DiId textId)


Produces a TextElement with a Uml14 model bridge. The TextElement is wrapped in a GraphNode that has the given UML element as semantic element. The TextElement itself does not have a direct reference to the UML element.  
Parameters:
id -
container - The DI parent element.
element - The UML 14 element that is the semantic counterpart.
text - The text of the element.
textId -
Returns:
The new node trhat contains the text element
arrow_up


createTextElementNode

public GraphNodeImpl createTextElementNode(DiId id, GraphElement container, SimpleTypeInfo typeInfo, String text, DiId textId)


Produces a TextElement with a simple semantic model bridge. The TextElement is wrapped in a GraphNode that has the given element as semantic element. That is, the semantic element has the given typeInfo string.  
Parameters:
id -
container - The parent of the text element (or rather, of the GraphNode that wraps the return value).
typeInfo - The typeInfo String.
text - The text of the TextElement.
textId -
Returns:
The new node trhat contains the text element
arrow_up
Created  2004 - 12 - 1

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.