PHP_UML
[ class tree: PHP_UML ] [ index: PHP_UML ] [ all elements ]

Class: PHP_UML_Output_Xmi_AbstractBuilder

Source Location: /PHP_UML-1.6.2/UML/Output/Xmi/AbstractBuilder.php

Class Overview


Abstract class to generate UML elements in XMI code.


Author(s):

Variables

Methods


Child classes:

PHP_UML_Output_Xmi_BuilderImpl1
Implementation class to create XMI in version 1
PHP_UML_Output_Xmi_BuilderImpl2
Implementation class to create XMI in version 2
PHP_UML_Output_Eclipse_AbstractBuilder
Extended abstract class to generate a UML model that can be imported into Eclipse

Inherited Variables

Inherited Methods


Class Details

[line 30]
Abstract class to generate UML elements in XMI code.

To deal with the two different versions of XMI (1.4 and 2.1), you must use one of the two specialized versions: PHP_UML_Output_Xmi_BuilderImpl1, or PHP_UML_Output_Xmi_BuilderImpl2



[ Top ]


Class Variables

$allExtensions = array(''=>'File', 'php'=>self::PHP_FILE)

[line 36]

  • Access: protected

Type:   mixed


[ Top ]

$allStereotypes = array('File', self::PHP_FILE)

[line 35]

  • Access: protected

Type:   mixed


[ Top ]

$componentView =  false

[line 43]

  • Access: protected

Type:   mixed


[ Top ]

$deploymentView =  false

[line 42]

  • Access: protected

Type:   mixed


[ Top ]

$encoding =  'iso-8859-1'

[line 40]

  • Access: protected

Type:   mixed


[ Top ]

$logicalView =  true

[line 41]

  • Access: protected

Type:   mixed


[ Top ]

$stereotypes =  false

[line 44]

  • Access: protected

Type:   mixed


[ Top ]

$xmiVersion =  2

[line 38]

  • Access: protected

Type:   mixed


[ Top ]



Method Detail

getAllComponents   [line 210]

string getAllComponents( PHP_UML_Metamodel_Package $package)

Get all components, with its provided classes PHP_UML considers each logical package as a component, and each owned class as a provided class.
  • Return: XMI code
  • Access: protected

Parameters:

PHP_UML_Metamodel_Package   $package   —  Package to map to a component

[ Top ]

getAllPackages   [line 149]

string getAllPackages( PHP_UML_Metamodel_Package $package)

Get all packages, recursively, with all the objects they contain Initially called by generateXmi() on the root package
  • Return: XMI code
  • Access: protected

Parameters:

PHP_UML_Metamodel_Package   $package   —  Base package

[ Top ]

getInstance   [line 131]

PHP_UML_Output_Xmi_Builder getInstance( float $version)

Factory method. Retrieves a proper implementation class, matching the XMI version.
  • Return: An XMI builder object

Overridden in child classes as:

PHP_UML_Output_Eclipse_AbstractBuilder::getInstance()
Factory method. Retrieves a proper implementation class, matching the XMI version.

Parameters:

float   $version   —  XMI version

[ Top ]

getOwnedElements   [line 173]

string getOwnedElements( PHP_UML_Metamodel_Package $package)

Get the different types owned by a package
  • Return: XMI code
  • Access: protected

Parameters:

PHP_UML_Metamodel_Package   $package   —  Package to get the types of

[ Top ]

getUID   [line 105]

string getUID( [string $prefix = null])

Generates an ID for an element. A partial identifier can be provided (used for classes and their idrefs)
  • Return: ID
  • Access: protected

Parameters:

string   $prefix   —  Prefix

[ Top ]

getXmiDocument   [line 238]

PHP_UML_Output_XmiDocument getXmiDocument( PHP_UML_Metamodel_Superstructure $structure)

Return the full serialized XMI metamodel of a given Superstructure.
  • Return: The serialized metamodel, as an XmiDocument
  • Access: public

Parameters:

PHP_UML_Metamodel_Superstructure   $structure   —  Full metamodel

[ Top ]

getXmlHeader   [line 118]

string getXmlHeader( )

Gets an XML header for the XMI file
  • Access: protected

[ Top ]

setComponentView   [line 81]

void setComponentView( boolean $value)

Enables the inclusion of a component view in the serialized model
  • Access: public

Parameters:

boolean   $value   —  True/False

[ Top ]

setDeploymentView   [line 71]

void setDeploymentView( boolean $value)

Enables the inclusion of a deployment view in the serialized model
  • Access: public

Parameters:

boolean   $value   —  True/False

[ Top ]

setEncoding   [line 51]

void setEncoding( string $encoding)

Sets the XML encoding
  • Access: public

Parameters:

string   $encoding   —  Encoding

[ Top ]

setLogicalView   [line 61]

void setLogicalView( boolean $value)

Enables the inclusion of a logical view in the serialized model
  • Access: public

Parameters:

boolean   $value   —  True/False

[ Top ]

setStereotypes   [line 91]

void setStereotypes( boolean $value)

Enables the inclusion of the stereotypes in the serialized model
  • Access: public

Parameters:

boolean   $value   —  True/False

[ Top ]


Documentation generated on Mon, 11 Mar 2019 16:01:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.