be.ac.vub.cocompose.io.xmi
Class XMIElementAttributesWriter

java.lang.Object
  extended bybe.ac.vub.cocompose.lang.DefaultModelVisitor
      extended bybe.ac.vub.cocompose.lang.DefaultSuperModelVisitor
          extended bybe.ac.vub.cocompose.io.xmi.XMIElementAttributesWriter
All Implemented Interfaces:
ModelVisitor

public class XMIElementAttributesWriter
extends DefaultSuperModelVisitor

Retrieves the XMI attributes for each model element.

Since:
0.2.0
Version:
0.2.9, 28/04/2004
Author:
Dennis Wagelaar

Field Summary
 
Fields inherited from class be.ac.vub.cocompose.lang.DefaultModelVisitor
current
 
Constructor Summary
XMIElementAttributesWriter()
           
 
Method Summary
 Attributes getAttributes()
          Gets the XMI attributes for the visited element.
 Attributes getRootAttributes()
          Gets the root attributes to add to the first element.
 void setRootAttributes(Attributes rootAttributes)
          Sets the root attributes to add to the first element.
 void setStacked(ModelVisitor stacked)
          Sets a stacked visitor for this and the contained visitors.
 void visit(VisitedElement visitedElement)
          Starts the visitor.
 void visitConstraint(Constraint constraint)
          Visits a Constraint.
 void visitImplementationPattern(ImplementationPattern implementationPattern)
          Visits an ImplementationPattern.
 void visitModel(Model model)
          Visits a Model.
 void visitModelElement(ModelElement modelElement)
          Visits a ModelElement.
 void visitMultiplicity(Multiplicity multiplicity)
          Visits a Multiplicity.
 void visitRefinedElement(RefinedElement refinedElement)
          Visits a RefinedElement.
 
Methods inherited from class be.ac.vub.cocompose.lang.DefaultSuperModelVisitor
visitAndConstraint, visitCompositeConstraint, visitConcept, visitElementConstraint, visitImplementationGenerator, visitImplementationRolePart, visitModelProperty, visitModelTransformation, visitNamespace, visitOrConstraint, visitProperty, visitRefinement, visitRelationElement, visitRelationship, visitRole, visitSimpleProperty, visitSolutionPattern
 
Methods inherited from class be.ac.vub.cocompose.lang.DefaultModelVisitor
getStacked
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMIElementAttributesWriter

public XMIElementAttributesWriter()
Method Detail

visitModelElement

public void visitModelElement(ModelElement modelElement)
                       throws ModelElementException
Visits a ModelElement.

Specified by:
visitModelElement in interface ModelVisitor
Overrides:
visitModelElement in class DefaultModelVisitor
Parameters:
modelElement - - the element to visit.
Throws:
ModelElementException

visitRefinedElement

public void visitRefinedElement(RefinedElement refinedElement)
                         throws ModelElementException
Visits a RefinedElement.

Specified by:
visitRefinedElement in interface ModelVisitor
Overrides:
visitRefinedElement in class DefaultSuperModelVisitor
Parameters:
refinedElement - - the element to visit.
Throws:
ModelElementException

visitModel

public void visitModel(Model model)
                throws ModelElementException
Visits a Model.

Specified by:
visitModel in interface ModelVisitor
Overrides:
visitModel in class DefaultSuperModelVisitor
Parameters:
model - - the element to visit.
Throws:
ModelElementException

visitImplementationPattern

public void visitImplementationPattern(ImplementationPattern implementationPattern)
                                throws ModelElementException
Visits an ImplementationPattern.

Specified by:
visitImplementationPattern in interface ModelVisitor
Overrides:
visitImplementationPattern in class DefaultSuperModelVisitor
Parameters:
implementationPattern - - the element to visit.
Throws:
ModelElementException

visitConstraint

public void visitConstraint(Constraint constraint)
                     throws ModelElementException
Visits a Constraint.

Specified by:
visitConstraint in interface ModelVisitor
Overrides:
visitConstraint in class DefaultSuperModelVisitor
Parameters:
constraint - - the element to visit.
Throws:
ModelElementException

visitMultiplicity

public void visitMultiplicity(Multiplicity multiplicity)
                       throws ModelElementException
Visits a Multiplicity.

Specified by:
visitMultiplicity in interface ModelVisitor
Overrides:
visitMultiplicity in class DefaultSuperModelVisitor
Parameters:
multiplicity - - the element to visit.
Throws:
ModelElementException

getAttributes

public Attributes getAttributes()
Gets the XMI attributes for the visited element.

Returns:
the XMI attributes.

visit

public void visit(VisitedElement visitedElement)
           throws ModelElementException
Starts the visitor.

Specified by:
visit in interface ModelVisitor
Overrides:
visit in class DefaultModelVisitor
Parameters:
visitedElement - - the element to start visiting at.
Throws:
ModelElementException

getRootAttributes

public Attributes getRootAttributes()
Gets the root attributes to add to the first element.

Returns:
the root attributes.

setRootAttributes

public void setRootAttributes(Attributes rootAttributes)
Sets the root attributes to add to the first element.

Parameters:
rootAttributes - - the root attributes.

setStacked

public void setStacked(ModelVisitor stacked)
Sets a stacked visitor for this and the contained visitors.

Specified by:
setStacked in interface ModelVisitor
Overrides:
setStacked in class DefaultModelVisitor
Parameters:
stacked - - the stacked visitor.